[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   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