[Solved] drawlist.image - no image drawn
Posted: Fri Jul 11, 2025 3:36 pm
How does drawlist.image work? I'm trying to create a custom drawlist image with the following code:
obj is then attached to a button using GA_Image, obj
I added LINESIZE and LINEPAT later in case it defaulted to invisible. I've also tried all different pens from 0-3.
However no matter what I do, I'm getting a blank image on my button.
Is there something obvious I've done wrong, or should this work? I've been looking for drawlist.image examples but I can't find any indication that anybody has ever tried to use it (apart from @xenic, and of course glyph.image)
Code: Select all
struct DrawList opendrawer[] = {
{DLST_LINESIZE, 0, 0, 0, 0, 0xff},
{DLST_LINEPAT, 0, 0, 0, 0, 0xff},
{DLST_LINE, 90, 60, 90, 90, 1},
{DLST_LINE, 90, 90, 10, 90, 1},
{DLST_LINE, 10, 90, 10, 60, 1},
{DLST_LINE, 10, 60, 90, 60, 1},
{DLST_LINE, 90, 60, 70, 30, 1},
{DLST_LINE, 70, 30, 30, 30, 1},
{DLST_LINE, 30, 30, 10, 60, 1},
{DLST_LINE, 30, 30, 20, 30, 1},
{DLST_LINE, 20, 30, 20, 50, 1},
{DLST_LINE, 70, 30, 80, 30, 1},
{DLST_LINE, 80, 30, 80, 50, 1},
{DLST_END, 0, 0, 0, 0, 0},
};
obj = NewObject(DrawListClass, NULL,
DRAWLIST_Directives, &opendrawer,
DRAWLIST_RefHeight, 100,
DRAWLIST_RefWidth, 100,
End;
I added LINESIZE and LINEPAT later in case it defaulted to invisible. I've also tried all different pens from 0-3.
However no matter what I do, I'm getting a blank image on my button.
Is there something obvious I've done wrong, or should this work? I've been looking for drawlist.image examples but I can't find any indication that anybody has ever tried to use it (apart from @xenic, and of course glyph.image)