ImageEn, unit imageenview

TImageEnView.LayersSnapDist

TImageEnView.LayersSnapDist


Declaration

property LayersSnapDist: Integer;


Description

Specifies the size (in pixels) of the grid that is drawn when DisplayGridKind = iedgSnapPoints.
If you add loSnapToPos to LayerOptions layers will automatically snap to the grid when moving or sizing.

Default: 10

Note:
 You must call Update after setting LayersSnapDist
 Minimum value is 5


Example

// 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();