eVision .NET API
Loading...
Searching...
No Matches
eVision.EGrid Class Reference

Represents a rectangular grid, to be used by readers to read QRCodes, matrix codes, or bar codes. More...

Inheritance diagram for eVision.EGrid:
Collaboration diagram for eVision.EGrid:

Public Member Functions

 EGrid ()
 Constructs a EGrid object.
 EGrid (uint numCellsX, uint numCellsY, eVision.ERectangle area, float extension)
 Constructs a EGrid object.
 EGrid (eVision.EGrid other)
 Constructs a EGrid object.
void SetEnableRow (uint row, bool enable)
 Enable/Disable Row.
void SetEnableColumn (uint column, bool enable)
 Enable/Disable Column.
void SetEnableCell (uint column, uint row, bool enable)
 Enable/Disable Cell.
bool GetCellEnabled (uint column, uint row)
 Returns true if Cell is enabled and false otherwise.
eVision.ERegion GetCellRegion (uint column, uint row)
 Returns the region of a grid cell given its indices in an EGrid object.
void DrawGrid (eVision.EDrawAdapter drawAdapter, eVision.EGridDrawOptions options, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the grid.
void DrawGrid (eVision.EDrawAdapter drawAdapter, eVision.EGridDrawOptions options, float zoomX, float zoomY, float panX, float panY)
 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, 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 (int x, int y, 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 (int x, int y, 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 (int x, int y, 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 (int x, int y, eVision.EFrame frame, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
virtual void Drag (int x, int y, eVision.EFrame frame)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
void Drag (int x, int 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 (int x, int 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 (int x, int y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
void Drag (int x, int y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
void Drag (int x, int y)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
void Load (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 (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.

Properties

uint NumRows [get]
 Returns the number of rows in the grid.
uint NumCols [get]
 Returns the number of columns in the grid.
bool EnableAll [set]
 Enable/Disable all cells.
eVision.ERectangle Area [get, set]
 Returns the area of an EGrid object.
float Extension [get, set]
 Returns the extension of an EGrid object.
eVision.EEditionMode EditionMode [get, set]
 Graphical edition mode.

Detailed Description

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

Constructor & Destructor Documentation

◆ EGrid() [1/3]

eVision.EGrid.EGrid ( )

Constructs a EGrid object.

◆ EGrid() [2/3]

eVision.EGrid.EGrid ( uint numCellsX,
uint numCellsY,
eVision.ERectangle area,
float extension )

Constructs a EGrid object.

Parameters
numCellsXNumber of cells in column direction.
numCellsYNumber of cells in row direction.
areaArea of the grid.
extensionextension of the cells grid.

◆ EGrid() [3/3]

eVision.EGrid.EGrid ( eVision.EGrid other)

Constructs a EGrid object.

Parameters
otherAnother EGrid object to be copied in the new EGrid object.

Member Function Documentation

◆ Drag() [1/10]

void eVision.EGrid.Drag ( int x,
int y )

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

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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [2/10]

virtual void eVision.EGrid.Drag ( int x,
int y,
eVision.EFrame frame )
virtual

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame 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.

◆ Drag() [3/10]

virtual void eVision.EGrid.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX )
virtual

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame to transform coordinates with.
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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [4/10]

virtual void eVision.EGrid.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY )
virtual

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame to transform coordinates with.
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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [5/10]

virtual void eVision.EGrid.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )
virtual

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame to transform coordinates with.
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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [6/10]

virtual void eVision.EGrid.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )
virtual

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame to transform coordinates with.
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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [7/10]

void eVision.EGrid.Drag ( int x,
int y,
float zoomX )

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

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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [8/10]

void eVision.EGrid.Drag ( int x,
int y,
float zoomX,
float zoomY )

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

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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [9/10]

void eVision.EGrid.Drag ( int x,
int y,
float zoomX,
float zoomY,
float panX )

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

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 EGrid.HitTest and EGrid.Drag.

◆ Drag() [10/10]

void eVision.EGrid.Drag ( int x,
int 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.

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 EGrid.HitTest and EGrid.Drag.

◆ DrawGrid() [1/2]

void eVision.EGrid.DrawGrid ( eVision.EDrawAdapter drawAdapter,
eVision.EGridDrawOptions options,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the grid.

Parameters
drawAdapterHandle to the device context of the destination window.
optionsOptions for grid drawing.
frameFrame associated with the pattern.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical 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.

◆ DrawGrid() [2/2]

void eVision.EGrid.DrawGrid ( eVision.EDrawAdapter drawAdapter,
eVision.EGridDrawOptions options,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the grid.

Parameters
drawAdapterHandle to the device context of the destination window.
optionsOptions for grid drawing.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical 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.

◆ GetCellEnabled()

bool eVision.EGrid.GetCellEnabled ( uint column,
uint row )

Returns true if Cell is enabled and false otherwise.

Parameters
columnThe column of the cell.
rowThe row of the cell.

By default, all grid cells are enabled.

◆ GetCellRegion()

eVision.ERegion eVision.EGrid.GetCellRegion ( uint column,
uint row )

Returns the region of a grid cell given its indices in an EGrid object.

Parameters
columnThe column of the cell.
rowThe row of the cell.

◆ HitTest() [1/2]

eVision.EEditionMode eVision.EGrid.HitTest ( int x,
int y,
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 grid 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 EGrid.HitTest and EGrid.Drag.

◆ HitTest() [2/2]

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.

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 EGrid.HitTest and EGrid.Drag.

◆ Load() [1/2]

void eVision.EGrid.Load ( eVision.ESerializer serializer)

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

Parameters
serializerThe serializer.

◆ Load() [2/2]

void eVision.EGrid.Load ( string path)

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

Parameters
pathThe file path.

◆ Save() [1/2]

void eVision.EGrid.Save ( eVision.ESerializer serializer)

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

Parameters
serializerThe serializer.

◆ Save() [2/2]

void eVision.EGrid.Save ( string path)

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

Parameters
pathThe file path.

◆ SetEnableCell()

void eVision.EGrid.SetEnableCell ( uint column,
uint row,
bool enable )

Enable/Disable Cell.

Parameters
columnThe column of the cell to (dis/en)able.
rowThe row of the cell to (dis/en)able.
enableWhether to enable or disable the cell.

By default, all grid cells are enabled.

◆ SetEnableColumn()

void eVision.EGrid.SetEnableColumn ( uint column,
bool enable )

Enable/Disable Column.

Parameters
columnThe column of the cells to (dis/en)able.
enableWhether to enable or disable the cells.

By default, all grid cells are enabled.

◆ SetEnableRow()

void eVision.EGrid.SetEnableRow ( uint row,
bool enable )

Enable/Disable Row.

Parameters
rowThe row of the cells to (dis/en)able.
enableWhether to enable or disable the cells.

By default, all grid cells are enabled.

Property Documentation

◆ Area

eVision.ERectangle eVision.EGrid.Area
getset

Returns the area of an EGrid object.

◆ EditionMode

eVision.EEditionMode eVision.EGrid.EditionMode
getset

Graphical edition mode.

◆ EnableAll

bool eVision.EGrid.EnableAll
set

Enable/Disable all cells.

By default, all grid cells are enabled.

◆ Extension

float eVision.EGrid.Extension
getset

Returns the extension of an EGrid object.

◆ NumCols

uint eVision.EGrid.NumCols
get

Returns the number of columns in the grid.

◆ NumRows

uint eVision.EGrid.NumRows
get

Returns the number of rows in the grid.