BackFill hooks and DoHookClipRects() are bugged by offscreen repair.
This is now clear: OS3.2.3 (I tested 3 configs, with P96 and not) layers.library, DoHookClipRects(), and the whole "BackFill Hook/EraseRect()" are bugged when repairing obscured bitmaps. Anything I do using DoHookClipRects() have that bug, and I've just verified that the "Backfill example" of the NDK3.20 has it too. You can just do it at home:
- Get example "BackFill" of the NDK3.20, and feed it an image. move it at center, if window coord is 0,0 bug will not appear.
- place another window (any) upon it so that it obscure a part of the backfill pattern.
- keep the obscuring window front, and resize the backfill example window of just a few pixels, so it forces rendering while obscured.
- close or move the obscuring window. It will "repair" the backfill... except that ... not.
Bing ! the repair works for everything except the backfill. (and actually any call done by DoHookClipRects() ). The image of the backfill is not contiguous on the "ancient borders of the obscuring window". Don't search: it's shifted by the coordinates of the window itelf.
Also, as the code in the hook for that example is just tiling the pattern, you'll always see the pattern, But DoHookClipect has also that bug, on native and rtg, and when I use it for my drawing primitives, I would draw just an element, and you see clearly everything is shifted . As my current application relies on backfill and DoHookClipRects() and has many external windows, when I close them, it reveals the main window badly blitted.
Note graphics BlBltBitMapRastPort functions does not have the bug.
Important: I use a WFLG_SMART_REFRESH window
unrelated but 've just seen:
getcolor.gadget , changing the color from extenal code with:
SetGadgetAttrs(getcolorToSync, window, NULL, GETCOLOR_Color, rrggbb, TAG_END);
... does not update the drawing, it needs a :
RefreshGList(getcolorToSync,window,NULL,1);
... to have its displayed color synchronized
Online Status
ah: no bug with WFLG_SIMPLE_REFRESH