ImageEn, unit iexLayers

TIELayer.RulerUnits

TIELayer.RulerUnits


Declaration

property RulerUnits: TIEUnits;


Description

Specifies the units when a RulerMode is specified.

Note:
 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)


Examples

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



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

// Add a measure box layer showing rectangular area sizes in CM (to one decimal place)
ImageEnView1.LayersAdd( ielkText , 100, 100, 250, 250 );
ImageEnView1.CurrentLayer.RulerMode  := iermLabel;
ImageEnView1.CurrentLayer.RulerUnits := ieuCentimeters;
IEGlobalSettings().MeasureDecimalPlaces := 1;
ImageEnView1.Update();

// Add a measure box layer showing elliptical area sizes in inches
ImageEnView1.LayersAdd( ielkText , 100, 100, 250, 250 );
ImageEnView1.CurrentLayer.RulerMode  := iermLabel;
ImageEnView1.CurrentLayer.RulerUnits := ieuInches;
TIETextLayer( ImageEnView1.CurrentLayer).BorderShape := iesEllipse;
ImageEnView1.Update();


See Also

 MeasureDecimalPlaces
 MeasureUnits
 RulerMode
 RulerValue
 SetScale
 Dpi