ImageEn, unit iesettings

TIEImageEnGlobalSettings.DefaultMeasureUnit

TIEImageEnGlobalSettings.DefaultMeasureUnit


Declaration

property DefaultMeasureUnit: TIEUnits;


Description

Specifies the default units used for RulerUnits for line layers and when using miMeasureLength, miMeasureRect or miMeasureEllipse.

Default: ieuPixels

Note: This can be overridden for line layers by LayerDefaults


Examples

// Enable measuring of lengths in image (Imperial)
// Set scale of 250 pixels = one inch
ImageEnView1.SetScale( 250, 1, ieuInches );
IEGlobalSettings().DefaultMeasureUnit := ieuInches;
ImageEnView1.Update();
ImageEnView1.MouseInteractGeneral := [ miMeasureLength ];

// Enable measuring of lengths in image (Metric)
// Set 100 pixels = 4cm
ImageEnView1.SetScale( 100, 4, ieuCentimeters );
IEGlobalSettings().DefaultMeasureUnit := ieuCentimeters;
ImageEnView1.Update();
ImageEnView1.MouseInteractGeneral := [ miMeasureLength ];

// Update all layers to use the default measurement (i.e. after a change)
ImageEnView1.LayersSetProperties( LYR_ALL_LAYERS, IELP_RulerUnits, IntToStr( ord( IEGlobalSettings().DefaultMeasureUnit )));


See Also

- MeasureDecimalPlaces
- MeasureUnits
- RulerUnits
- RulerUnits
- Units
- OnMeasure