klinikaxp |
Posted - Oct 26 2020 : 03:56:42 I create a line with ruler to measure distance (I set: IE.MouseInteractGeneral := [miMeasureLength]). The font is automatically adjusted: when the line is short, the font is small. When user moves then mouse and the line becomes longer, the font is increased. It is very useful. But the line disappears after MouseUp event.
I want to leave the line, so I create it this way: IE.MouseInteractGeneral := []; IE.MouseInteractLayers := [mlClickCreateLineLayers];
and OnNewLayer I specify: TIELineLayer (ImageVect.CurrentLayer).IsRuler := True; TIELineLayer (ImageVect.CurrentLayer).LabelFont.Size := 40; TIELineLayer (ImageVect.CurrentLayer).LabelFillColor := clNone; TIELineLayer (ImageVect.CurrentLayer).LabelPosition := ielpAutoAbove; TIELineLayer (ImageVect.CurrentLayer).LabelFont.Size := RULER_FONT_SIZE;
And now I have got two questions: 1. How can I modify LabelFont size according to line length? I tried to set it using OnMeasure, OnMouseMove events, but it was not working well.
2. Is it possible to ignore units in Ruler Text? All measurement is made in mm, so I would like to display on the ruler only "12.34" instead of "12.34 mm". Can I configure something to reduce it?
|