Welcome, Guest. Please login or register.

Author Topic: WA_BackFill on a Reaction Window  (Read 2187 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: WA_BackFill on a Reaction Window
« on: March 27, 2007, 10:05:49 PM »
Quote

--- backfill hook:
Code: [Select]

{
 SetAPen( rp, 3 );
 RectFill( rp, 1, 1, WIDTH-1, HEIGHT-1 );
 ....
}



This is deadly wrong:

1. your must not use the RastPort given. It is for information only. You may only use rp->BitMap for rendering. If you need a RastPort, create your own one or copy the one given and move NULL to temp_rp->Layer.

2. you must respect the bounds given in the message. If you always fill the entire window, you overwrite everything including gadgets already drawn.

See Intuition/OpenWindow autodocs for a description of WA_BackFill and follow its link to layers/InstallLayerHook autodocs to read the essential hints.

Bye,
Thomas