How do I get an icon's render image copied to a bitmap?
struct DiskObject *icon = NULL;
icon = IIcon->GetIconTags(NoInfoBuffer,
ICONGETA_FailIfUnavailable, TRUE,
ICONGETA_UseFriendBitMap, TRUE,
ICONGETA_Screen, PID->Screen,
TAG_END);
PID->OrigWidth=64; // get the icon's dimensions
PID->OrigHeight=64; // not use these defaults
if (!(PID->OrigBM=IGraphics->AllocBitMapTags(PID->OrigWidth,PID->OrigHeight,32,
BMATags_PixelFormat, PIXF_A8R8G8B8,
BMATags_Clear, TRUE,
BMATags_Displayable, TRUE,
TAG_DONE)))
{
// error
}
How do I get the icon->do_Gadget.GadgetRender copied to the PID->OrigBM? I always end up with a solid grey block.
I want to use a bitmap because down the road there could be some scaling (I know it can be done above in loading).
And I want no border/text.