Hello:
I'll go crazy. I'm writing a graphic control, and I need a clipregion to clip a bitmat drawing. I do this:
... drawing operations 1.....
r:=Rect(0,0,20,ClientHeight);
cRGN:=createRectRGN(r.left,r.top,r.Right,r.bottom);
selectClipRGN(self.canvas.Handle,cRGN);
.... drawing operations 2....
selectClipRGN(self.canvas.Handle,0);
deleteObject(cRGN);
.... drawing operations 3....
drawing operations 1, works properly, draw at properly coordinates.
drawing operations 2, doesn't work. origin of coordinates for region is parent upper-left corner (0,0) instead of upper-left corner of my control. all drawing operations, including clipping, are in parent coordinates.
drawing operations 3, works again, draw at properly coordinates.
If try to offset the rectangle in step 2. Works when my control parent is a form, but not if it is, for example, a groupBox or a panel.
Can anyone help me? PLEASE!!!!!
SVN:27367
I'll try to install an older version of lazarus.