ImageEn, unit iexLayers

TIELineLayer.RulerUnits

TIELineLayer.RulerUnits


Declaration


property RulerUnits: TIEUnits;


Description


Specifies the units when IsRuler is enabled.

Notes:
- Use MeasureDecimalPlaces to specify the number of decimal places
- Unit text can be edited with MeasureUnits
- Use TImageEnView.SetScale to adjust the scale of units

Default: Specified by DefaultMeasureUnit (Defaults to ieuPixels)


Example


// Set ruler units to MM
TIELineLayer( ImageEnView1.CurrentLayer).RulerUnits := ieuMillimeters;



// Add a ruler layer showing lengths in CM (to one decimal place)
ImageEnView1.LayersAdd( ielkLine , 100, 100, 250, 250 );
TIELineLayer( ImageEnView1.CurrentLayer).IsRuler := True;
TIELineLayer( ImageEnView1.CurrentLayer).RulerUnits := ieuCentimeters;
IEGlobalSettings().MeasureDecimalPlaces := 1;
TIELineLayer( ImageEnView1.CurrentLayer).LabelPosition := ielpAutoAbove;
TIELineLayer( ImageEnView1.CurrentLayer).StartShape := ieesBar;
TIELineLayer( ImageEnView
1.CurrentLayer).EndShape := ieesBar;
ImageEnView1.Update();


See Also


- MeasureDecimalPlaces
- MeasureUnits
- IsRuler
- RulerValue
- SetScale
- Dpi