Represents a rectangular grid, to be used by readers to read QRCodes, matrix codes, or bar codes. More...
#include <eVision/Easy/EGrid.h>
Public Member Functions | |
| EGrid () | |
| Constructs a EGrid object. | |
| EGrid (uint32_t numCellsX, uint32_t numCellsY, const eVision::ERectangle &area, float extension) | |
| Constructs a EGrid object. | |
| EGrid (const eVision::EGrid &other) | |
| Constructs a EGrid object. | |
| virtual | ~EGrid () throw () |
| eVision::EGrid & | operator= (const eVision::EGrid &other) |
| Copies all the data from another EGrid object into the current EGrid object. | |
| uint32_t | GetNumRows () const |
| Returns the number of rows in the grid. | |
| uint32_t | GetNumCols () const |
| Returns the number of columns in the grid. | |
| void | SetEnableRow (uint32_t row, bool enable) |
| Enable/Disable Row. | |
| void | SetEnableColumn (uint32_t column, bool enable) |
| Enable/Disable Column. | |
| void | SetEnableCell (uint32_t column, uint32_t row, bool enable) |
| Enable/Disable Cell. | |
| void | SetEnableAll (bool enable) |
| Enable/Disable all cells. | |
| bool | GetCellEnabled (uint32_t column, uint32_t row) const |
| Returns true if Cell is enabled and false otherwise. | |
| eVision::ERegion | GetCellRegion (uint32_t column, uint32_t row) |
| Returns the region of a grid cell given its indices in an EGrid object. | |
| void | SetArea (const eVision::ERectangle &area) |
| Set the area of an EGrid object. | |
| eVision::ERectangle | GetArea () const |
| Returns the area of an EGrid object. | |
| void | SetExtension (float extension) |
| Set the extension of an EGrid object. | |
| float | GetExtension () const |
| Returns the extension of an EGrid object. | |
| void | DrawGrid (eVision::EDrawAdapter *drawAdapter, const eVision::EGridDrawOptions &options, const eVision::EFrame &frame, float zoomX, float zoomY, float panX, float panY) const |
| Draws the grid. | |
| void | DrawGrid (eVision::EDrawAdapter *drawAdapter, const eVision::EGridDrawOptions &options, float zoomX, float zoomY, float panX, float panY) const |
| Draws the grid. | |
| eVision::EEditionMode | HitTest (int x, int y, float zoomX, float zoomY, float panX, float panY) |
| Detects if the cursor is placed over one of the dragging handles. | |
| eVision::EEditionMode | HitTest (int x, int 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. | |
| virtual 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 grid. | |
| virtual 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 grid. | |
| virtual 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 grid. | |
| virtual 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 grid. | |
| virtual 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 grid. | |
| 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 grid. | |
| 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 grid. | |
| 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 grid. | |
| 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 grid. | |
| void | Drag (int32_t x, int32_t y) |
| Moves the specified handle to a new position and updates all placement parameters of the grid. | |
| void | SetEditionMode (eVision::EEditionMode editionMode) |
| Graphical edition mode. | |
| eVision::EEditionMode | GetEditionMode () const |
| Graphical edition mode. | |
| void | Load (const std::string &path) |
| Load the EGrid configuration. The given ESerializer must have been created for reading. | |
| void | Load (eVision::ESerializer *serializer) |
| Load the EGrid configuration. The given ESerializer must have been created for reading. | |
| void | Save (const std::string &path) |
| Save the EGrid configuration. The given ESerializer must have been created for writing. | |
| void | Save (eVision::ESerializer *serializer) |
| Save the EGrid configuration. The given ESerializer must have been created for writing. | |
| EGrid (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
Represents a rectangular grid, to be used by readers to read QRCodes, matrix codes, or bar codes.
An EGrid object only contains geometrical information, such as the area, extension, and indices of the grid. Specialized implementations can be found for QRCodes, matrix codes, and bar codes.
License(s): EasyQRCode or EasyMatrixCode or EasyBarCode
| eVision::EGrid::EGrid | ( | ) |
Constructs a EGrid object.
| eVision::EGrid::EGrid | ( | uint32_t | numCellsX, |
| uint32_t | numCellsY, | ||
| const eVision::ERectangle & | area, | ||
| float | extension ) |
Constructs a EGrid object.
| numCellsX | Number of cells in column direction. |
| numCellsY | Number of cells in row direction. |
| area | Area of the grid. |
| extension | extension of the cells grid. |
| eVision::EGrid::EGrid | ( | const eVision::EGrid & | other | ) |
|
virtual | ||||||||||||
| eVision::EGrid::EGrid | ( | CppWrapperInternal::InternalConstructor | ) |
| void eVision::EGrid::Drag | ( | int32_t | x, |
| int32_t | y ) |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
If zooming and/or panning were used when drawing the region, the same values must be used with EGrid::HitTest and EGrid::Drag.
|
virtual |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame to transform coordinates with. |
If zooming and/or panning were used when drawing the region, the same values must be used with EGrid::HitTest and EGrid::Drag.
|
virtual |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame to transform coordinates with. |
| zoomX | Horizontal 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 EGrid::HitTest and EGrid::Drag.
|
virtual |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame to transform coordinates with. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical 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 EGrid::HitTest and EGrid::Drag.
|
virtual |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame to transform coordinates with. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal 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 EGrid::HitTest and EGrid::Drag.
|
virtual |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame to transform coordinates with. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal pan offset. By default, no pan is added. |
| panY | Vertical 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::Drag | ( | int32_t | x, |
| int32_t | y, | ||
| float | zoomX ) |
Moves the specified handle to a new position and updates all placement parameters of the grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| zoomX | Horizontal 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::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 grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::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 grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::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 grid.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal pan offset. By default, no pan is added. |
| panY | Vertical 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::DrawGrid | ( | eVision::EDrawAdapter * | drawAdapter, |
| const eVision::EGridDrawOptions & | options, | ||
| const eVision::EFrame & | frame, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) const |
Draws the grid.
| drawAdapter | Handle to the device context of the destination window. |
| options | Options for grid drawing. |
| frame | Frame associated with the pattern. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| panY | Vertical panning value expressed in pixels. By default, no panning occurs. |
The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.
| void eVision::EGrid::DrawGrid | ( | eVision::EDrawAdapter * | drawAdapter, |
| const eVision::EGridDrawOptions & | options, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) const |
Draws the grid.
| drawAdapter | Handle to the device context of the destination window. |
| options | Options for grid drawing. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| panY | Vertical panning value expressed in pixels. By default, no panning occurs. |
The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.
| eVision::ERectangle eVision::EGrid::GetArea | ( | ) | const |
Returns the area of an EGrid object.
| bool eVision::EGrid::GetCellEnabled | ( | uint32_t | column, |
| uint32_t | row ) const |
Returns true if Cell is enabled and false otherwise.
| column | The column of the cell. |
| row | The row of the cell. |
By default, all grid cells are enabled.
| eVision::ERegion eVision::EGrid::GetCellRegion | ( | uint32_t | column, |
| uint32_t | row ) |
Returns the region of a grid cell given its indices in an EGrid object.
| column | The column of the cell. |
| row | The row of the cell. |
| eVision::EEditionMode eVision::EGrid::GetEditionMode | ( | ) | const |
Graphical edition mode.
| float eVision::EGrid::GetExtension | ( | ) | const |
Returns the extension of an EGrid object.
| uint32_t eVision::EGrid::GetNumCols | ( | ) | const |
Returns the number of columns in the grid.
| uint32_t eVision::EGrid::GetNumRows | ( | ) | const |
Returns the number of rows in the grid.
| eVision::EEditionMode eVision::EGrid::HitTest | ( | int | x, |
| int | 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.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| frame | Frame of reference in which the grid is defined. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal pan offset. By default, no pan is added. |
| panY | Vertical 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 EGrid::HitTest and EGrid::Drag.
| eVision::EEditionMode eVision::EGrid::HitTest | ( | int | x, |
| int | y, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) |
Detects if the cursor is placed over one of the dragging handles.
| x | x-coordinate of the mouse cursor. |
| y | y-coordinate of the mouse cursor. |
| zoomX | Horizontal zoom factor. By default, true scale is used. |
| zoomY | Vertical zoom factor. By default, true scale is used. |
| panX | Horizontal pan offset. By default, no pan is added. |
| panY | Vertical 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 EGrid::HitTest and EGrid::Drag.
| void eVision::EGrid::Load | ( | const std::string & | path | ) |
Load the EGrid configuration. The given ESerializer must have been created for reading.
| path | The file path. |
| void eVision::EGrid::Load | ( | eVision::ESerializer * | serializer | ) |
Load the EGrid configuration. The given ESerializer must have been created for reading.
| serializer | The serializer. |
| eVision::EGrid & eVision::EGrid::operator= | ( | const eVision::EGrid & | other | ) |
| void eVision::EGrid::Save | ( | const std::string & | path | ) |
Save the EGrid configuration. The given ESerializer must have been created for writing.
| path | The file path. |
| void eVision::EGrid::Save | ( | eVision::ESerializer * | serializer | ) |
Save the EGrid configuration. The given ESerializer must have been created for writing.
| serializer | The serializer. |
| void eVision::EGrid::SetArea | ( | const eVision::ERectangle & | area | ) |
Set the area of an EGrid object.
| area | The area of the cell. |
| void eVision::EGrid::SetEditionMode | ( | eVision::EEditionMode | editionMode | ) |
Graphical edition mode.
| editionMode | EEditionMode flags |
| void eVision::EGrid::SetEnableAll | ( | bool | enable | ) |
Enable/Disable all cells.
By default, all grid cells are enabled.
| void eVision::EGrid::SetEnableCell | ( | uint32_t | column, |
| uint32_t | row, | ||
| bool | enable ) |
Enable/Disable Cell.
| column | The column of the cell to (dis/en)able. |
| row | The row of the cell to (dis/en)able. |
| enable | Whether to enable or disable the cell. |
By default, all grid cells are enabled.
| void eVision::EGrid::SetEnableColumn | ( | uint32_t | column, |
| bool | enable ) |
Enable/Disable Column.
| column | The column of the cells to (dis/en)able. |
| enable | Whether to enable or disable the cells. |
By default, all grid cells are enabled.
| void eVision::EGrid::SetEnableRow | ( | uint32_t | row, |
| bool | enable ) |
Enable/Disable Row.
| row | The row of the cells to (dis/en)able. |
| enable | Whether to enable or disable the cells. |
By default, all grid cells are enabled.
| void eVision::EGrid::SetExtension | ( | float | extension | ) |
Set the extension of an EGrid object.
| extension | The extension of the cell. |
| CppWrapperInternal::WrappedClass eVision::EGrid::wrappedClass_ |