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
DrawIconStateA -- Draw an icon as if it were an image (V44)
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,...);
This function will draw an icon as if it were an image; if a label is provided, it will be printed below it.
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
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.
/* 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);
<workbench/icon.h>, <workbench/workbench.h>, <intuition/imageclass.h>, <intuition/screens.h>, intuition.library/DrawImageState(), icon.library/GetIconRectangleA(), icon.library/IconControlA()
|