ImageEn, unit iexLayers

TIELayer.RulerValue

TIELayer.RulerValue


Declaration

function RulerValue(Aspect: TIERulerAspect = ierDefault): Double;


Description

Returns the current value of the ruler if a RulerMode is specified.
Measurement is only supported by TIELineLayer, TIEPolylineLayer and TIETextLayer.
For TIEAngleLayer the current angle is returned.
For other types the result will be 0.


Description

Layer Type Default (ierDefault) Supports
TIELineLayer Length ierLength
TIEPolylineLayer Length ierLength, ierArea
TIETextLayer Area ierLength (perimeter), ierArea
TIEAngleLayer Angle -
TIEImageLayer Area ierArea
TIEShapeLayer Area ierArea

The unit of RulerValue is specified by RulerUnits.


Example

// Display the current length of a line layer
lblLen.Caption := FloatToStr( ImageEnView1.CurrentLayer.RulerValue() );

// Display the area of a text layer
lblSize.Caption := FloatToStr( ImageEnView1.CurrentLayer.RulerValue() );

// Display the length of a text layer boundary (perimeter)
lblSize.Caption := FloatToStr( ImageEnView1.CurrentLayer.RulerValue( ierLength ));


See Also

- RulerMode
- RulerUnits