eVision C++ API 26.10.0
Loading...
Searching...
No Matches
eVision::EShape Class Referenceabstract

Base class for geometrical shapes. More...

#include <eVision/Easy/EShape.h>

Inheritance diagram for eVision::EShape:
Collaboration diagram for eVision::EShape:

Public Member Functions

virtual ~EShape () throw ()
void Load (const std::string &path)
 Load the EShape configuration. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Load the EShape configuration. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Save the EShape configuration. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Save the EShape configuration. The given ESerializer must have been created for writing.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX, float panY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY, float panX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX, float zoomY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, float zoomX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY, bool drawDiagonals) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY, float panX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX, float zoomY) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame, float zoomX) const
 Draws the EShape shape.
void Draw (eVision::EDrawAdapter *drawAdapter, const eVision::EFrame &frame) const
 Draws the EShape shape.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Detects if the cursor is placed over one of the dragging handles.
eVision::EEditionMode HitTest (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Detects if the cursor is placed over one of the dragging handles.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY, float panX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void Drag (int32_t x, int32_t y, const eVision::EFrame &frame)
 Moves the specified handle to a new position and updates all placement parameters of the region.
void SetEditionMode (eVision::EEditionMode modes)
 Current edition mode for the shape. Default: EEditionMode_None.
eVision::EEditionMode GetEditionMode () const
 Current edition mode for the shape. Default: EEditionMode_None.
virtual eVision::EEditionMode GetAvailableEditionModes () const =0
 Available edition modes for the shape.
virtual std::string GetDescription () const =0
 Textual description of the shape and its parameters.
eVision::EFrame ToFrame (bool useAngle, eVision::EFrameScaling frameScaling) const
 Converts the shape to a frame.
eVision::EFrame ToFrame (bool useAngle, eVision::EFrameScaling frameScaling, const eVision::EFrame &shapeFrame) const
 Converts the shape to a frame.
std::vector< eVision::EFrame > CreateFramesOnShape (int32_t numFrames, float startOffset, float stopOffset, eVision::EFramesOrientation orientation) const
 Distributes EFrames evenly along this shape's path or perimeter.
std::vector< eVision::EFrame > CreateFramesOnShape (int32_t numFrames, float startOffset, float stopOffset) const
 Distributes EFrames evenly along this shape's path or perimeter.
std::vector< eVision::EFrame > CreateFramesOnShape (int32_t numFrames, float startOffset) const
 Distributes EFrames evenly along this shape's path or perimeter.
std::vector< eVision::EFrame > CreateFramesOnShape (int32_t numFrames) const
 Distributes EFrames evenly along this shape's path or perimeter.
 EShape (CppWrapperInternal::InternalConstructor)

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Base class for geometrical shapes.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ ~EShape()

eVision::EShape::~EShape ( )
throw ( )
virtual

◆ EShape()

eVision::EShape::EShape ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ CreateFramesOnShape() [1/4]

std::vector< eVision::EFrame > eVision::EShape::CreateFramesOnShape ( int32_t numFrames) const

Distributes EFrames evenly along this shape's path or perimeter.

Parameters
numFramesNumber of frames to generate.

The numFrames frames are evenly distributed on the sub-path defined by startOffset and stopOffset:

  • When shape[startOffset] != shape[stopOffset]: The first frame is at startOffset * L and the last frame at stopOffset * L (where L is the total path length). The spacing between two consecutive frames is (stopOffset - startOffset) * L / (numFrames - 1).
  • When shape[startOffset] == shape[stopOffset]: The first frame is at startOffset * L and the spacing between two consecutive frames is L / numFrames (where L is the total path length).

Use EGrid::CreateFramesOnGrid to Create Frames in a grid.

◆ CreateFramesOnShape() [2/4]

std::vector< eVision::EFrame > eVision::EShape::CreateFramesOnShape ( int32_t numFrames,
float startOffset ) const

Distributes EFrames evenly along this shape's path or perimeter.

Parameters
numFramesNumber of frames to generate.
startOffsetFractional position in [0, 1] of the first frame along the path. Defaults to 0.

The numFrames frames are evenly distributed on the sub-path defined by startOffset and stopOffset:

  • When shape[startOffset] != shape[stopOffset]: The first frame is at startOffset * L and the last frame at stopOffset * L (where L is the total path length). The spacing between two consecutive frames is (stopOffset - startOffset) * L / (numFrames - 1).
  • When shape[startOffset] == shape[stopOffset]: The first frame is at startOffset * L and the spacing between two consecutive frames is L / numFrames (where L is the total path length).

Use EGrid::CreateFramesOnGrid to Create Frames in a grid.

◆ CreateFramesOnShape() [3/4]

std::vector< eVision::EFrame > eVision::EShape::CreateFramesOnShape ( int32_t numFrames,
float startOffset,
float stopOffset ) const

Distributes EFrames evenly along this shape's path or perimeter.

Parameters
numFramesNumber of frames to generate.
startOffsetFractional position in [0, 1] of the first frame along the path. Defaults to 0.
stopOffsetFractional position in [0, 1] of the last frame along the path. Must be >= startOffset. Defaults to 1.

The numFrames frames are evenly distributed on the sub-path defined by startOffset and stopOffset:

  • When shape[startOffset] != shape[stopOffset]: The first frame is at startOffset * L and the last frame at stopOffset * L (where L is the total path length). The spacing between two consecutive frames is (stopOffset - startOffset) * L / (numFrames - 1).
  • When shape[startOffset] == shape[stopOffset]: The first frame is at startOffset * L and the spacing between two consecutive frames is L / numFrames (where L is the total path length).

Use EGrid::CreateFramesOnGrid to Create Frames in a grid.

◆ CreateFramesOnShape() [4/4]

std::vector< eVision::EFrame > eVision::EShape::CreateFramesOnShape ( int32_t numFrames,
float startOffset,
float stopOffset,
eVision::EFramesOrientation orientation ) const

Distributes EFrames evenly along this shape's path or perimeter.

Parameters
numFramesNumber of frames to generate.
startOffsetFractional position in [0, 1] of the first frame along the path. Defaults to 0.
stopOffsetFractional position in [0, 1] of the last frame along the path. Must be >= startOffset. Defaults to 1.
orientationWhether each frame keeps the shape's base angle (EFramesOrientation::EFramesOrientation_AlignedOnShape), follows the local tangent of the path (EFramesOrientation::EFramesOrientation_AlignedLocally) or uses an angle of 0° (EFramesOrientation::EFramesOrientation_Fixed). Defaults to EFramesOrientation::EFramesOrientation_Fixed.

The numFrames frames are evenly distributed on the sub-path defined by startOffset and stopOffset:

  • When shape[startOffset] != shape[stopOffset]: The first frame is at startOffset * L and the last frame at stopOffset * L (where L is the total path length). The spacing between two consecutive frames is (stopOffset - startOffset) * L / (numFrames - 1).
  • When shape[startOffset] == shape[stopOffset]: The first frame is at startOffset * L and the spacing between two consecutive frames is L / numFrames (where L is the total path length).

Use EGrid::CreateFramesOnGrid to Create Frames in a grid.

◆ Drag() [1/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [2/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
const eVision::EFrame & frame )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [3/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [4/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [5/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [6/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [7/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
float zoomX )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [8/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
float zoomX,
float zoomY )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [9/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
float zoomX,
float zoomY,
float panX )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Drag() [10/10]

void eVision::EShape::Drag ( int32_t x,
int32_t y,
float zoomX,
float zoomY,
float panX,
float panY )

Moves the specified handle to a new position and updates all placement parameters of the region.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Draw() [1/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.

◆ Draw() [2/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.

◆ Draw() [3/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float zoomX ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [4/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float zoomX,
float zoomY ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [5/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [7/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY,
bool drawDiagonals ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.
drawDiagonalsIf relevant, draw the diagonals of the shape. By default, the diagonals are not drawn.

◆ Draw() [8/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
float zoomX ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [9/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [10/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY,
float panX ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [11/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY,
float panX,
float panY ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [12/12]

void eVision::EShape::Draw ( eVision::EDrawAdapter * drawAdapter,
float zoomX,
float zoomY,
float panX,
float panY,
bool drawDiagonals ) const

Draws the EShape shape.

Parameters
drawAdapterHandle of the device context on which to draw.
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.
drawDiagonalsIf relevant, draw the diagonals of the shape. By default, the diagonals are not drawn.

◆ GetAvailableEditionModes()

virtual eVision::EEditionMode eVision::EShape::GetAvailableEditionModes ( ) const
pure virtual

◆ GetDescription()

virtual std::string eVision::EShape::GetDescription ( ) const
pure virtual

Textual description of the shape and its parameters.

Implemented in eVision::ECircle, eVision::EEllipse, eVision::ELine, eVision::EPointSet, eVision::EPolygon, eVision::ERectangle, and eVision::EWedge.

◆ GetEditionMode()

eVision::EEditionMode eVision::EShape::GetEditionMode ( ) const

Current edition mode for the shape. Default: EEditionMode_None.

◆ HitTest() [1/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [2/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [3/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [4/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
const eVision::EFrame & frame,
float zoomX,
float zoomY,
float panX,
float panY )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame of reference in which the shape is defined.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [5/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
float zoomX )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [6/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
float zoomX,
float zoomY )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [7/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
float zoomX,
float zoomY,
float panX )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ HitTest() [8/8]

eVision::EEditionMode eVision::EShape::HitTest ( int32_t x,
int32_t y,
float zoomX,
float zoomY,
float panX,
float panY )

Detects if the cursor is placed over one of the dragging handles.

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

Returns an EEditionMode indicating the type of handle under the mouse.

If zooming and/or panning were used when drawing the region, the same values must be used with EShape::HitTest and EShape::Drag.

◆ Load() [1/2]

void eVision::EShape::Load ( const std::string & path)

Load the EShape configuration. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

void eVision::EShape::Load ( eVision::ESerializer * serializer)

Load the EShape configuration. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Save() [1/2]

void eVision::EShape::Save ( const std::string & path)

Save the EShape configuration. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

void eVision::EShape::Save ( eVision::ESerializer * serializer)

Save the EShape configuration. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ SetEditionMode()

void eVision::EShape::SetEditionMode ( eVision::EEditionMode modes)

Current edition mode for the shape. Default: EEditionMode_None.

Parameters
modesNew edition modes

◆ ToFrame() [1/2]

eVision::EFrame eVision::EShape::ToFrame ( bool useAngle,
eVision::EFrameScaling frameScaling ) const

Converts the shape to a frame.

Parameters
useAngleWhether to use the angle of the shape as the orientation of the frame
frameScalingHow to change the scaling of the frame.

◆ ToFrame() [2/2]

eVision::EFrame eVision::EShape::ToFrame ( bool useAngle,
eVision::EFrameScaling frameScaling,
const eVision::EFrame & shapeFrame ) const

Converts the shape to a frame.

Parameters
useAngleWhether to use the angle of the shape as the orientation of the frame
frameScalingHow to change the scaling of the frame.
shapeFrameThe frame in which the shape is defined

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::EShape::wrappedClass_