eVision Python 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:

Public Member Functions

None __init__ (self)
 Constructs a eVision.EGrid object.
None __init__ (self, int numCellsX, int numCellsY, eVision.ERectangle area, float extension)
 Constructs a eVision.EGrid object.
None __init__ (self, eVision.EGrid other)
 Constructs a eVision.EGrid object.
None SetEnableRow (self, int row, bool enable)
 Enable/Disable Row.
None SetEnableColumn (self, int column, bool enable)
 Enable/Disable Column.
None SetEnableCell (self, int column, int row, bool enable)
 Enable/Disable Cell.
bool GetCellEnabled (self, int column, int row)
 Returns true if Cell is enabled and false otherwise.
eVision.ERegion GetCellRegion (self, int column, int row)
 Returns the region of a grid cell given its indices in an eVision.EGrid object.
None DrawGrid (self, eVision.EDrawAdapter|None drawAdapter, eVision.EGridDrawOptions options, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the grid.
None DrawGrid (self, eVision.EDrawAdapter|None drawAdapter, eVision.EGridDrawOptions options, float zoomX, float zoomY, float panX, float panY)
 Draws the grid.
eVision.EEditionMode HitTest (self, 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 (self, 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.
None Drag (self, 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.
None Drag (self, 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.
None Drag (self, 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.
None Drag (self, 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.
None Drag (self, int x, int y, eVision.EFrame frame)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
None Drag (self, 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.
None Drag (self, 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.
None Drag (self, int x, int y, float zoomX, float zoomY)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
None Drag (self, int x, int y, float zoomX)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
None Drag (self, int x, int y)
 Moves the specified handle to a new position and updates all placement parameters of the grid.
None Load (self, str path)
 Load the eVision.EGrid configuration.
None Load (self, eVision.ESerializer|None serializer)
 Load the eVision.EGrid configuration.
None Save (self, str path)
 Save the eVision.EGrid configuration.
None Save (self, eVision.ESerializer|None serializer)
 Save the eVision.EGrid configuration.
int NumRows (self)
 Returns the number of rows in the grid.
int NumCols (self)
 Returns the number of columns in the grid.
eVision.ERectangle Area (self)
 Returns the area of an eVision.EGrid object.
 Area (self, eVision.ERectangle value)
 Returns the area of an eVision.EGrid object.
float Extension (self)
 Returns the extension of an eVision.EGrid object.
 Extension (self, float value)
 Returns the extension of an eVision.EGrid object.
eVision.EEditionMode EditionMode (self)
 Graphical edition mode.
 EditionMode (self, eVision.EEditionMode value)
 Graphical edition mode.

Protected Member Functions

 _EnableAll__setter (self, bool value)
 Enable/Disable all cells.

Properties

 EnableAll

Detailed Description

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

Remarks:

An eVision.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

◆ __init__() [1/3]

None eVision.EGrid.__init__ ( self)

Constructs a eVision.EGrid object.

◆ __init__() [2/3]

None eVision.EGrid.__init__ ( self,
int numCellsX,
int numCellsY,
eVision.ERectangle area,
float extension )

Constructs a eVision.EGrid object.

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

◆ __init__() [3/3]

None eVision.EGrid.__init__ ( self,
eVision.EGrid other )

Constructs a eVision.EGrid object.

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

Member Function Documentation

◆ _EnableAll__setter()

eVision.EGrid._EnableAll__setter ( self,
bool value )
protected

Enable/Disable all cells.

Remarks:

By default, all grid cells are enabled.

◆ Area() [1/2]

eVision.ERectangle eVision.EGrid.Area ( self)

Returns the area of an eVision.EGrid object.

◆ Area() [2/2]

eVision.EGrid.Area ( self,
eVision.ERectangle value )

Returns the area of an eVision.EGrid object.

◆ Drag() [1/10]

None eVision.EGrid.Drag ( self,
int x,
int y )

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

Remarks:

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

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

◆ Drag() [2/10]

None eVision.EGrid.Drag ( self,
int x,
int y,
eVision.EFrame frame )

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

Remarks:

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

Parameters
xx-coordinate of the mouse cursor.
yy-coordinate of the mouse cursor.
frameFrame to transform coordinates with.

◆ Drag() [3/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ Drag() [4/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ Drag() [5/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ Drag() [6/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ Drag() [7/10]

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

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

Remarks:

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

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

◆ Drag() [8/10]

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

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

Remarks:

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

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.

◆ Drag() [9/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ Drag() [10/10]

None eVision.EGrid.Drag ( self,
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.

Remarks:

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

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.

◆ DrawGrid() [1/2]

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

Draws the grid.

Remarks:

The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

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.

◆ DrawGrid() [2/2]

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

Draws the grid.

Remarks:

The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

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.

◆ EditionMode() [1/2]

eVision.EEditionMode eVision.EGrid.EditionMode ( self)

Graphical edition mode.

◆ EditionMode() [2/2]

eVision.EGrid.EditionMode ( self,
eVision.EEditionMode value )

Graphical edition mode.

◆ Extension() [1/2]

float eVision.EGrid.Extension ( self)

Returns the extension of an eVision.EGrid object.

◆ Extension() [2/2]

eVision.EGrid.Extension ( self,
float value )

Returns the extension of an eVision.EGrid object.

◆ GetCellEnabled()

bool eVision.EGrid.GetCellEnabled ( self,
int column,
int row )

Returns true if Cell is enabled and false otherwise.

Remarks:

By default, all grid cells are enabled.

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

◆ GetCellRegion()

eVision.ERegion eVision.EGrid.GetCellRegion ( self,
int column,
int row )

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

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

◆ HitTest() [1/2]

eVision.EEditionMode eVision.EGrid.HitTest ( self,
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.

Remarks:

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

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.

◆ HitTest() [2/2]

eVision.EEditionMode eVision.EGrid.HitTest ( self,
int x,
int y,
float zoomX,
float zoomY,
float panX,
float panY )

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

Remarks:

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

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.

◆ Load() [1/2]

None eVision.EGrid.Load ( self,
eVision.ESerializer | None serializer )

Load the eVision.EGrid configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.EGrid.Load ( self,
str path )

Load the eVision.EGrid configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ NumCols()

int eVision.EGrid.NumCols ( self)

Returns the number of columns in the grid.

◆ NumRows()

int eVision.EGrid.NumRows ( self)

Returns the number of rows in the grid.

◆ Save() [1/2]

None eVision.EGrid.Save ( self,
eVision.ESerializer | None serializer )

Save the eVision.EGrid configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ Save() [2/2]

None eVision.EGrid.Save ( self,
str path )

Save the eVision.EGrid configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ SetEnableCell()

None eVision.EGrid.SetEnableCell ( self,
int column,
int row,
bool enable )

Enable/Disable Cell.

Remarks:

By default, all grid cells are enabled.

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.

◆ SetEnableColumn()

None eVision.EGrid.SetEnableColumn ( self,
int column,
bool enable )

Enable/Disable Column.

Remarks:

By default, all grid cells are enabled.

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

◆ SetEnableRow()

None eVision.EGrid.SetEnableRow ( self,
int row,
bool enable )

Enable/Disable Row.

Remarks:

By default, all grid cells are enabled.

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

Property Documentation

◆ EnableAll

eVision.EGrid.EnableAll
static
Initial value:
= property(None, _EnableAll__setter, None,
)