ImageEn, unit ieview

TIEView.DoubleBuffered

TIEView.DoubleBuffered

Declaration

property DoubleBuffered: Boolean;

Description

When enabled, content is rendered to an in-memory bitmap before displaying it on the screen, instead of painting directly to the window. This technique significantly reduces screen flickering and tearing during repaints, though it consumes more system memory.

Default: False

Examples

// Make a mostly transparent ruler that hovers over the image
ImageEnView1.RulerParams.Opacity   := 0.25;
ImageEnView1.RulerParams.TextColor := clDarkGray;    // Make text more visible
ImageEnView1.DoubleBuffered        := True;          // Reduce excess painting
ImageEnView1.Update();


// Draw a virtual grid of 20x20 pixels to make it easier to position and align layers
ImageEnView1.LayerOptions    := ImageEnView1.LayerOptions + [ loSnapToPos ];
ImageEnView1.DoubleBuffered  := True;    // Improve draw performance
ImageEnView1.DisplayGridKind := iedgSnapPoints;
ImageEnView1.LayersSnapDist  := 20;
ImageEnView1.Update();

// Use a PNG as a cursor
cursorBMP := TIEBitmap.Create();
cursorBMP.LoadFromFile( 'D:\MagicWand.png');
ImageEnView1.SetZoneCursorBitmap( cursorBMP );
FreeAndNil( cursorBMP );
ImageEnView1.DoubleBuffered := True;  // to reduce cursor flicker