WinCE: ClipRect of controls not working correctly
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
As seen in issue #24106 a control can draw beyond it's Canvas. To workaround this I had the idea to use Clipping and ClipRect, but that had it's one share of problems, because it seems that the clipping region is anchored on the form's upper right instead of the control's upper right (so I need to move the clipping region by the control's position to get the correct one).
Additional information:
Attached is an example which draws a red rectangle into a PaintBox surrounded by a frame. This rectangle is created by setting the ClipRect and then drawing a rectangle for the complete size of the Canvas. On Win32 this results in a rectangle that starts at 10,10 of the control and contiues to its center. On WinCE howver the control starts at 0,0 of the control and stops somewhere in between.
If you now check the CheckBox which tells the OnPaint handler to offset the clipping rect by the PaintBox's coordinates then the rectangle is drawn to the correct position.
Mantis conversion info:
- Mantis ID: 24107
- OS: WinCE
- OS Build: 6.1
- Platform: ARM
- Version: 1.0.4
- Monitored by: » zaher (Zaher Dirkey)