Hi Micha
Yes, it is very doable. The only difficult part is not displaying a label.
Probably what you'll want to do instead use formatted layers instead of a ruler:
- use miClickCreateLineLayer so user can add a line
- In OnNewLayer format line like like a measure, but without a label
- In OnLayerNotify event, detect end of line addition, get length and then remove line
- use miCreateShapeLayer so user can add an ellipse
- In OnNewLayer format shape layer
- In OnLayerNotify event, detect end of shape addition, get area and then remove shape
- Calculate and add to DB
Also, see these methods in iexLayers.pas. You may want to add them to your code:
function CalcRulerLength(Pt1, Pt2: TDPoint; Units: TIEUnits; DpiX, DpiY: Double): double;
function CalcRulerArea(AreaRect: TRect; Units: TIEUnits; DpiX, DpiY: Double; ZoomX, ZoomY: Double; Ellipse: Boolean = False): double;
Nigel
Xequte Software
www.imageen.com