a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 icon.library
  AddFreeList
  BumpRevision
  ChangeToSelectedIconColor
  DeleteDiskObject
  DrawIconStateA
  DupDiskObjectA
  FindToolType
  FreeDiskObject
  FreeFreeList
  GetDefDiskObject
  GetDiskObject
  GetDiskObjectNew
  GetIconRectangleA
  GetIconTagList
  IconControlA
  LayoutIconA
  MatchToolValue
  NewDiskObject
  PutDefDiskObject
  PutDiskObject
  PutIconTagList
Include
GuruMeditation
Docs » Autodocs » icon.library » DrawIconStateA

NAME

	DrawIconStateA -- Draw an icon as if it were an image (V44)

SYNOPSIS

	DrawIconStateA(rp,icon,label,leftEdge,topEdge,state,tags)
A0 A1 A2 D0 D1 D2 A3
VOID DrawIconStateA(struct RastPort *rp,struct DiskObject *icon,
STRPTR label,LONG leftEdge,LONG topEdge,
ULONG state,struct TagItem *tags);
DrawIconState(rp,icon,label,leftEdge,topEdge,state,...);
VOID DrawIconState(struct RastPort *rp,struct DiskObject *icon,
STRPTR label,LONG leftEdge,LONG topEdge,
ULONG state,...);

FUNCTION

	This function will draw an icon as if it were an image; if
a label is provided, it will be printed below it.

INPUTS

	rp -- Pointer to the RastPort to draw into; the RastPort clipping
rules, font, style, text colours and drawing mode will be used.
icon -- Pointer to a struct DiskObject.
label -- Pointer to a NUL-terminated string, or NULL if
no label text is to be printed.
leftEdge, topEdge -- Coordinates at which the icon image
should be drawn, including its border; please note that the
icon label may extend in whole or in part beyond the
leftEdge you have specified.
state -- Select how and which icon image should be drawn;
see intuition/imageclass.h for supported states.
tags -- Additional drawing options

TAGS

	ICONDRAWA_DrawInfo (struct DrawInfo *) -- Drawing information data
associated with the RastPort to draw into. The DrawInfo
contents affect the colours of the border drawn around the
icon image and also carry display aspect ratio information.
If this tag is NULL, the default rendering pens for the
screen selected via IconControl(...,ICONA_SetGlobalScreen,...)
will be used instead.
This tag defaults to NULL.
ICONDRAWA_Frameless (BOOL) -- Draw the icon without the
surrounding border.
This tag defaults to FALSE.
ICONDRAWA_Borderless (BOOL) -- Draw the icon without the
surrounding border and frame.
This tag defaults to FALSE.
ICONDRAWA_EraseBackground (BOOL) -- When drawing a frameless
icon, erase the icon background before drawing the icon.
This tag defaults to TRUE.

EXAMPLE

	/* Draw the icon in its normal state, without
* a label but including a frame.
*/
struct RastPort *rp;
struct DiskObject *icon;
DrawIconStateA(rp,icon,NULL,0,0,IDS_NORMAL,NULL);
/* The same again, but without a frame. */
DrawIconState(rp,icon,NULL,0,0,IDS_NORMAL,
ICONDRAWA_Frameless,TRUE,
TAG_DONE);
/* Draw the icon in selected state with a border; the
* frame colours come from the given DrawInfo.
*/
struct DrawInfo *drawInfo;
DrawIconState(rp,icon,NULL,0,0,IDS_SELECTED,
ICONDRAWA_DrawInfo,drawInfo,
TAG_DONE);

SEE ALSO

<workbench/icon.h>, <workbench/workbench.h>, <intuition/imageclass.h>, <intuition/screens.h>, intuition.library/DrawImageState(), icon.library/GetIconRectangleA(), icon.library/IconControlA()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Abyss

KEF
CSL
TRSI
AYS

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se