Latest changes in GTK2 changed drawing rules
Original Reporter info from Mantis: Dibo
-
Reporter name: Krzysztof Dibowski
Original Reporter info from Mantis: Dibo
- Reporter name: Krzysztof Dibowski
Description:
Are some serious changes implementing in GTK interface right now? I'm
the author and maintainer of BGRA Controls package which are using
BGRA Bitmap package for drawing. Issues:
- First, I can't compile BGRA Bitmap package without comment line:
{ifdef LCL_GTK2}
type TGtkDeviceContext = TGtk2DeviceContext;
{$endif}
What happened with TGtk2DeviceContext? This same with other non-BGRA
controls like VirtualTreeView (but there is more GTK errors than only
TGtk2DeviceContext )
- BGRA Controls are using simple BGRA Bitmap api for drawing:
BGRABitmap.Draw(Canvas, 0,0,false). This code worked from a several
years, but now seems that GTK coordinates are different. If I drag (or
in runtime) some BGRA Control on center of the form, I don't see what
is drawed, just transparent frame, but If I move control to left-top
corner then I see control body. Seems that GTK is starting drawing
from form canvas, not control.
I notified this a few days ago, I thought that this is some temporary
issue, but with today trunk is the same problem.
Regards, Dibo
Additional information:
I attached simple demo:
- You must install BGRA Bitmap package first (tested on version 6.1 and oldes) from https://sourceforge.net/projects/lazpaint/files/src/
- Run attached demo
- You will see small rectangle in top-left corner. This is paint box.
- Now got to design form and move paint box to the center of the form and run program. Rectangle is now unvisible
Ubuntu 12.10 64bit GTK (Unity), Lazarus from svn trunk, fpc 2.6.0
Mantis conversion info:
- Mantis ID: 23168
- Version: 1.0.3 (SVN)
- Fixed in version: 1.2.0