Thank you Thomas for your answer.
I'm trying to write a Docky which should display a led on or off.
Upon reception of DOCKYSET_Screen I'm executing the following statements:
Code: Select all
pCtxt->Screen = (struct Screen*)msgData;
pCtxt->dri = IIntuition->GetScreenDrawInfo(pCtxt->Screen);
pCtxt->ledImage = IIntuition->NewObject(pCtxt->BitmapClass, NULL,
BITMAP_SourceFile, "TBImages:list_ledred_s",
BITMAP_DisabledSourceFile, "TBImages:list_ledred",
BITMAP_Screen, pCtxt->Screen,
BITMAP_Masking, TRUE,
TAG_END);
Note that pCtxt->BitmapClass is obtained at docky initialization by the following
Code: Select all
pCtxt->BitmapClassLib = IIntuition->OpenClass("images/bitmap.image", 52, &(pCtxt->BitmapClass);
Then upon DOCKYSET_RedrawNow I'm doing:
Code: Select all
IGraphics->Move(pCtxt->rp, 10,10);
IIntuition->DrawImageState(pCtxt->rp, (struct Image*)pCtxt->ledImage, 0, 0, pCtxt->Activated?IDS_NORMAL:IDS_DISABLED, pCtxt->dri);
EDIT: Okay the problem was caused by the 'BITMAP_Masking', if I remove it everything works as expected. Now I'm trying to figure out how I can draw this bitmap without seeing this dark background... Probably something to do with the DOCKYGET_RenderMode but as soon as I put something different from DOCKYRENDERMODE_RPPA the AmiDock refuses to load it
