<a id="easygauge-display-graphical-manipulation"></a>

# Display and Graphical Manipulation

<a id="easygauge-drawing"></a>

## Drawing

[`EBaseGauge::Draw`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#aa8af0a9d89d6dbe0fcd676102f8876e0) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a238794f6aaf4c6af7759ed8549e8380a) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#a50c184a719e5c05380fa1ab57b54a157) gives a graphical representation of the gauge.

Use the enumerate [`EDrawingMode`](../../../doxygen_cpp/namespaceeVision.html#a46a5eff0a429fb8f7157564a9c7e620c) [<sub>.NET</sub>](../../../doxygen_cs/namespaceeVision.html#a22d98bfe7b35ea321e8d60e62e838438) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EDrawingMode.html) to specify the parts of the gauge that you want to draw:

- `EDrawingMode_Nominal` to draw the nominal shape, the gauge tolerances and the handles.
  ![Point gauge](assets/images/easygauge/edrawingmode_nominal.webp)
- `EDrawingMode_Actual` to draw the measured shape.
  ![Point gauge](assets/images/easygauge/edrawingmode_actual.webp)
- `EDrawingMode_Tolerances` to draw the tolerances around the nominal shape and its handles.
- `EDrawingMode_TransitionType` to draw the transition type of each edge of the shape.
  ![Point gauge](assets/images/easygauge/edrawingmode_transitiontype.webp)
- `EDrawingMode_SampledPaths` to draw the paths sampled along the nominal shape.
- `EDrawingMode_SampledPoints` to draw the points measured along each path sampled along the nominal shape that were used to fit the shape.
  ![Point gauge](assets/images/easygauge/edrawingmode_samplepoints.png.jpg)
- `EDrawingMode_InvalidSampledPoints` to draw the points measured along each path sampled along the nominal shape that were excluded from the shape fitting operation (outliers).
  ![Point gauge](assets/images/easygauge/edrawingmode_invalidsamplepoints.webp)
- `EDrawingMode_PointsInSkipRange` to draw the points in the skip ranges for the gauges that support skip ranges.

<a id="easygauge-graphical-manipulation"></a>

## Graphical Manipulations

* Use [`EBaseGauge::GetAvailableEditionModes`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#af0f7fc38e18ac177b387e1b454ed7eca) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a7ef109c887dc001fbb29abf468f64cc2) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#a34667e9e030a713c7a854c9873985694) to get the available graphical edition mode.
  - It returns the edition modes of the underlying nominal shape and [`EEditionMode_Tolerances`](../../../doxygen_cpp/namespaceeVision.html#a7640350ea6abaa1b8568b578bfbd6222) [<sub>.NET</sub>](../../../doxygen_cs/namespaceeVision.html#a50693d260f38bf5e424f036c09ad4a6d) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EEditionMode.html) if the gauge has tolerances.
* Use [`EBaseGauge::SetEditionMode`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#a276ae543b5e097a1c1c47d82bdc80970) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a21b9f2a46ad89240ef3da58d25d9cb8a) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#a5e4de41757586ad987cf3dae5400dbe5) to set the edition modes that you want to activate.
* Use [`EBaseGauge::HitTest`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#a72d87e6c8188b33d14b73048d717f9a9) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a47d6d14123c93c3d1fd89a19e1ec5f50) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#afbf57a187990c99768220a8225f54eb1) to determine when the mouse cursor is over a handle and get the corresponding edition mode that you can use to change the shape of the mouse.
* Use [`EBaseGauge::Drag`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#aac134c1925ed13422e37c16150cf8044) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a3ae09dec3a529e76719aa09e18b6bc71) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#aba4e2c2c2aa63f049a56c0e6afd723f4) to move the handle and the corresponding gauge accordingly.

![image](assets/images/easygauge/tolerance_graphical_manipulation.svg)

#### NOTE
With the API, you can perform graphical manipulation on the *nominal* shape and on the tolerances of the gauge. However, in **eVision Studio**, only the tolerances can be manipulated in the gauge tools.

<a id="easygauge-plot"></a>

## Plot

**EasyGauge** can plot gray-level values along the sample paths and/or its derivative. This is useful to tune the parameters.

* Use [`EBaseGauge::MeasureSamplePath`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#a675cb0d501015c87e0ec28479055bd31) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#af77230f583f0520bdcca677b1790417a) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#a19ff9fce228507c08a3f311b933f017e) to get the measured sample path for one of the sample paths of the gauge.
  - Use [`ESamplePath::Plot`](../../../doxygen_cpp/classeVision_1_1ESamplePath.html#a5f0df3c24f415d0e03b60ea470d5fa3e) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1ESamplePath.html#a565250bc0606785f67511654ff30dbb3) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1ESamplePath.html#a5ac5626792dc7280318b73409c4178df) to plot the profile and/or the derivative.
    ![Point gauge](assets/images/easygauge/esamplepath_plot.jpg)
  - Use [`ESamplePath::DrawPath`](../../../doxygen_cpp/classeVision_1_1ESamplePath.html#a85630325d6952309938389ba038deded) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1ESamplePath.html#ac65877d702eec9e70f644ef534f124d1) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1ESamplePath.html#a59b074fdfb741adeb450de31f02e0164) to draw the sample path that was measured.
    ![Point gauge](assets/images/easygauge/esamplepath_drawpath.webp)

<a id="easygauge-frame"></a>

## Frame

* When calling the drawing and graphical manipulations methods, pass the frame in which the shape is defined.
* Also pass the same frame to [`EBaseGauge::Measure`](../../../doxygen_cpp/classeVision_1_1EBaseGauge.html#a09dbcb0c1bb7681ba31870c626fd0231) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EBaseGauge.html#a3fa25d60234bce338c219c93e591626f) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EBaseGauge.html#addcbfdee6ba540ab56d43c653a06e8e2).

#### SEE ALSO
Have a look at the [differences with the old legacy API](porting_from_legacy_gauge.html.md#easygauge-difference-legacy) of **EasyGauge** and how to port your application to the new API.
