Gauge Manipulation: Draw, Drag, Plot, Group

EasyGauge provides means to graphically interact with gauges to place and size them, combine them as a hierarchy of grouped items, and store/retrieve them and all working parameters to/from model files.

Draw

Draw gives a graphical representation of a gauge. Drawing is done with the current pen in the device context associated with the desired window. Depending on the operation, handles may be displayed.

Drag

An operator can drag a gauge interactively over an image. Several dragging handles are available.

HitTest determines when the mouse cursor is over a handle. When it is, the cursor shape should be changed for feedback, and a drag can take place.
Drag moves the handle and the corresponding gauge accordingly.

In addition, if you are interacting with a polygon gauge, you can:

Use the method EPolygonGauge.AddVertexAtDisplayPosition (derived from EPolygonShape.AddVertexAtDisplayPosition) to create a new vertex at a chosen position (typically at a mouse click)
Use the method EPolygonGauge.RemoveVertexAtDisplayPosition (derived from EPolygonShape.RemoveVertexAtDisplayPosition) to remove a vertex.

Plot

EasyGauge can Plot gray-level values along the sampled paths and/or its derivative - useful for parameter tuning.

Point measurement gauges can plot after calling Measure.
Model fitting gauges can plot after calling MeasureSample with an index argument that lies between 0 and GetNumSamples-1 (included).
To view the corresponding sampling path, use the method Draw with mode EDrawingMode_SampledPath.

Group

Measurement gauges can be grouped (their relative placement remains fixed) to form a dedicated tool that can be moved (translated and rotated) to follow the movement of inspected items / probes before computing measurements.

Attach associates a gauge to a mother gauge or EFrameShape object.
NumDaughters, GetDaughter, or Mother retrieves information relative to attached daughters or mother.
Detach, DetachDaughters dissociates the gauge or daughters from the mother.