ImageEn, unit imageenview

TImageEnView.OnMeasure

TImageEnView.OnMeasure


Declaration


property OnMeasure: TIEMeasureEvent;


Description


Occurs whenever the user is measuring using miMeasureLength. It is useful to assign styling to the ruler layer.


Example


procedure Tfmain.ImageEnView1Measure(Sender: TObject; MeasureType: TIEMeasureType; MeasureLayer: TIELayer; Len: Double; var Units: TIEUnits);
begin
  // MEASURE LENGTHS
  if MeasureLayer is TIELineLayer then
    with TIELineLayer( MeasureLayer ) do
    begin
      LineColor := clWhite;
      LineWidth := 3;
      LabelFont.Color := clBlue;
    end
  else
  // MEASURE AREAS
  if MeasureLayer is TIETextLayer then
    with TIETextLayer( MeasureLayer ) do
    begin
      BorderColor := clBlack;
      BorderWidth := 3;
      FillColor := clSilver;
      Font.Color := clBlue;
      Transparency := 128;
    end;
end;


See Also


- MouseInteractGeneral
- SetScale