[Lazarus] TImage Canvas not growing with Image? GTK2
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Wed May 19 15:18:49 CEST 2010
theo schrieb:
> I saw people are using/recommending TImage.Canvas for drawing because
> drawing is non-volatile, unlike TPaintBox.
An implementation can use either a fixed-size bitmap, so that painting
is non-volatile, or recreate the bitmap with every change in size, so
that previous content is almost lost.
Fixed-size images, like bitmaps, eventually can be stretch-drawn to the
actual extent. Then one can draw into the bitmap, but only within its
fixed size.
Truly scalable (vector...) images are not based on a bitmap, and cannot
be updated by bitmap-specific graphics commands (LineTo...).
When you re-create your graphics after every change in size, it should
be possible to use any "volatile" component (TPanel...) and set its
DoubleBuffered property to True.
DoDi
More information about the Lazarus
mailing list