Lazarus

Programming => Graphics => Graphics and Multimedia => BGRABitmap and LazPaint => Topic started by: neseir on February 16, 2013, 08:05:01 pm

Title: BGRA Draw behaves different on Windows vs GTK (Linux)
Post by: neseir on February 16, 2013, 08:05:01 pm
Hi

Have some problem with drawing a BGRABitmap using the Draw to the canvas to display a bitmap on a Paintbox components canvas.

On windows it uses the Paintbox canvas top left corner as reference but on Linux it uses the parent canvas or client area as top left corner. E.g. adding a TPanel as parent to the paintbox solved the problem for me but still the behaviour is different from Linux GTK to Windows regarding the drawing on the Canvas (using canvas functions like Line etc. works with top left corner of the Paintbox canvas as reference).

I'm using Lazarus 32 bit 1.0.6 both on Windows (64 bit Windows 7 Pro) and Linux (Ubuntu 32 bit 12.10).

Regards
Eirik Nesje
 
Title: Re: BGRA Draw behaves different on Windows vs GTK (Linux)
Post by: circular on February 16, 2013, 11:17:35 pm
Maybe try to modify BGRAGtkBitmap unit.

gdk_pixbuf_render_to_drawable and gdk_draw_rgb_32_image are used to draw using gdk. Offsets are read from TGtkDeviceContext(ACanvas.Handle) variable.
TinyPortal © 2005-2018