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.
list[eVision._eVision.EFrame] CreateFramesOnGrid (self, eVision.EFramesOrientation orientation)
 Create one eVision.EFrame for each enabled cell of the eVision.EGrid.
list[eVision._eVision.EFrame] CreateFramesOnGrid (self)
 Create one eVision.EFrame for each enabled cell of the eVision.EGrid.

Properties

 NumRows = property(_NumRows__getter, None)
 Returns the number of rows in the grid.
 NumCols = property(_NumCols__getter, None)
 Returns the number of columns in the grid.
 EnableAll = property(None, _EnableAll__setter)
 Enable/Disable all cells.
 Area = property(_Area__getter, _Area__setter)
 Returns the area of an eVision.EGrid object.
 Extension = property(_Extension__getter, _Extension__setter)
 Returns the extension of an eVision.EGrid object.
 EditionMode = property(_EditionMode__getter, _EditionMode__setter)
 Graphical edition mode.

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

◆ CreateFramesOnGrid() [1/2]

list[eVision._eVision.EFrame] eVision.EGrid.CreateFramesOnGrid ( self)

Create one eVision.EFrame for each enabled cell of the eVision.EGrid.

Remarks:

Use eVision.EShape.CreateFramesOnShape to Create Frames on the perimeter of a eVision.EShape.

◆ CreateFramesOnGrid() [2/2]

list[eVision._eVision.EFrame] eVision.EGrid.CreateFramesOnGrid ( self,
eVision.EFramesOrientation orientation )

Create one eVision.EFrame for each enabled cell of the eVision.EGrid.

Remarks:

Use eVision.EShape.CreateFramesOnShape to Create Frames on the perimeter of a eVision.EShape.

Parameters
orientationWhether each frame keeps the grid's base angle (eVision.EFramesOrientation.AlignedOnShape and eVision.EFramesOrientation.AlignedLocally) or uses an angle of 0° (eVision.EFramesOrientation.Fixed). Defaults to eVision.EFramesOrientation.Fixed.

◆ 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.

◆ 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.

◆ 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

◆ Area

eVision.EGrid.Area = property(_Area__getter, _Area__setter)
static

Returns the area of an eVision.EGrid object.

◆ EditionMode

eVision.EGrid.EditionMode = property(_EditionMode__getter, _EditionMode__setter)
static

Graphical edition mode.

◆ EnableAll

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

Enable/Disable all cells.

Remarks:

By default, all grid cells are enabled.

◆ Extension

eVision.EGrid.Extension = property(_Extension__getter, _Extension__setter)
static

Returns the extension of an eVision.EGrid object.

◆ NumCols

eVision.EGrid.NumCols = property(_NumCols__getter, None)
static

Returns the number of columns in the grid.

◆ NumRows

eVision.EGrid.NumRows = property(_NumRows__getter, None)
static

Returns the number of rows in the grid.