When rendering inside the GM_RENDER call you recive the gprender message
/* GM_RENDER */
struct gpRender
{
ULONG MethodID;
struct GadgetInfo *gpr_GInfo; /* gadget context */
struct RastPort *gpr_RPort; /* all ready for use */
LONG gpr_Redraw; /* might be a "highlight pass" */
};
which has a Rast Port inside it. gpr_RPort;
But there is also a RastPort within the GagetInfo structure.
which one should I be using?
I have been using the gpr_RPort and all has been working okay but for some more adavanced rendering I want to set a temporary backfill hook, so did the following:
Code: Select all
oldhook = InstallLayerHook(gpr->gpr_RPort->Layer,icd->icd_TransBackFillHook);
if(topedge > ib->Top)
{
EraseRect(gpr->gpr_RPort,ib->Left,ib->Top,ib->Left + ib->Width -1 ,topedge -1 );
}
/* snip */
InstallLayerHook(gpr->gpr_RPort->Layer,oldhook);
So the question is why might the change of backfill hook not have worked in the gpReender->gp_RPort (has it even got a Layer?) and am I correct in thinking that's the one I should be using.