The GridConfig class encapsulates a Krita Guides configuration.
Methods
Member documentation
Returns status of "Aspect locked" property for angles values (mean, left and right angles values are linked to keep ratio) AngleAspectLocked value is used for grid type "isometric" and "isometric_legacy".
Return
If locked, return True. |
Returns left angle (in degrees) of isometric grid for document. AngleLeft value is used for grid type "isometric".
Return
A positive decimal value, in range [0.00 - 89.00] |
Returns if left angle grid is active. Spacing value is used for grid type "isometric".
Return
a boolean which indicate if left angle grid is active or not |
Returns right angle (in degrees) of isometric grid for document. AngleRight value is used for grid type "isometric".
Return
A positive decimal value, in range [0.00 - 89.00] |
Returns if right angle grid is active. Spacing value is used for grid type "isometric".
Return
a boolean which indicate if right angle grid is active or not |
Returns grid cell border size (in pixels) for document. Cell spacing value is used for grid type "isometric".
Return
A positive integer value, in range [10 - 1000] |
Returns grid cell spacing (in pixels) for document. Cell spacing value is used for grid type "isometric_legacy".
Return
A positive integer value, minimum value is 10 |
Returns grid subdivision line color ColorSubdivision value is used for grid type "rectangular".
Return
The color for grid subdivision line |
Returns grid vertical line color ColorSubdivision value is used for grid type "isometric".
Return
The color for grid vertical line |
Load grid definition from an XML document
Parameters
xmlContent | xml content provided as a string |
Return
True if xml content is valid and grid has been loaded, otherwise False |
Returns grid main line type
Return
The main line type for grid in current document Can be: - "solid" - "dashed" - "dotted" |
Returns grid subdivision line type
Return
The subdivision line type for grid in current document Can be: - "solid" - "dashed" - "dotted" LineTypeSubdivision value is used for grid type "rectangular". |
Returns grid vertical line type
Return
The vertical line type for grid in current document Can be: - "solid" - "dashed" - "dotted" - "none" LineTypeVertical value is used for grid type "isometric". |
Returns grid offset (in pixels, from origin) for document.
Return
A QPoint that define X and Y offset. |
Returns status of "Aspect locked" property for offset values (X and Y values are linked to keep ratio)
Return
If locked, return True. |
Set status of "Aspect locked" property for angles values (left and right angles values are linked to keep ratio) AngleAspectLocked value is used for grid type "isometric" and "isometric_legacy".
Parameters
angleAspectLocked | Set to True lock aspect. |
Set left angle (in degrees) of isometric grid for document. AngleLeft value is used for grid type "isometric".
Parameters
angleLeft | A positive decimal value, in range [0.00 - 89.00] |
Set left angle grid active. Spacing value is used for grid type "isometric".
Parameters
active | True to activate left angle grid, False to deactivate it. |
Set right angle (in degrees) of isometric grid for document. AngleRight value is used for grid type "isometric".
Parameters
angleRight | A positive decimal value, in range [0.00 - 89.00] |
Set right angle grid active. Spacing value is used for grid type "isometric".
Parameters
active | True to activate right angle grid, False to deactivate it. |
Set grid cell size (in pixels) for document. Cell spacing value is used for grid type "isometric".
Parameters
cellSize | An integer that define cell border size. |
Set grid cell spacing for document. Cell spacing value is used for grid type "isometric_legacy".
Parameters
cellSpacing | A integer that define spacing, in range [10 - 1000] |
Set grid main line color
Parameters
colorMain | (no description provided) |
Set grid subdivision line color ColorSubdivision value is used for grid type "rectangular".
Parameters
colorSubdivision | (no description provided) |
Set grid vertical line color ColorSubdivision value is used for grid type "isometric".
Parameters
colorVertical | (no description provided) |
Set grid main line type
Parameters
lineType | The main line type to apply for grid Can be: - "solid" - "dashed" - "dotted" |
Set grid subdivision line type
Parameters
lineType | The subdivision line type to apply for grid Can be: - "solid" - "dashed" - "dotted" LineTypeSubdivision value is used for grid type "rectangular". |
Set grid vertical line type
Parameters
lineType | The vertical line type to apply for grid Can be: - "solid" - "dashed" - "dotted" - "none" LineTypeVertical value is used for grid type "isometric". |
Define grid offset (in pixels, from origin) for document.
Parameters
offset | A QPoint that define X and Y offset (X and Y in range [0 - 500]) |
Set status of "Aspect locked" property for offset values (X and Y values are linked to keep ratio)
Parameters
offsetAspectLocked | Set to True lock aspect. |
Activate or deactivate snap to grid for document
Parameters
snap | Set to True to activate snap to grid. |
Set grid spacing (in pixels) for document. Spacing value is used for grid type "rectangular".
Parameters
spacing | A QPoint that define X and Y spacing (minimum value for X and Y is 1) |
Set horizontal grid spacing active. Spacing value is used for grid type "rectangular".
Parameters
active | True to activate horizontal spacing, False to deactivate it. |
Set vertical grid spacing active. Spacing value is used for grid type "rectangular".
Parameters
active | True to activate vertical spacing, False to deactivate it. |
Set status of "Aspect locked" property for spacing values (X and Y values are linked to keep ratio) SpacingAspectLocked value is used for grid type "rectangular".
Parameters
spacingAspectLocked | Set to True lock aspect. |
Set number of grid subdivision for document. Subdivision value is used for grid type "rectangular".
Parameters
subdivision | A positive integer value, in range [1 - 10] |
Set current grid type applied for document.
Parameters
gridType | The grid type can be: - "rectangular" - "isometric" - "isometric_legacy" |
Set grid visibility for document.
Parameters
visible | (no description provided) |
Returns snap to grid status for document.
Return
If snap to grid is active on document, return True. |
Returns grid spacing (in pixels) for document. Spacing value is used for grid type "rectangular".
Return
A QPoint that define X and Y spacing. |
Returns if horizontal grid spacing is active. Spacing value is used for grid type "rectangular".
Return
a boolean which indicate if horizontal grid is active or not |
Returns if vertical grid spacing is active. Spacing value is used for grid type "rectangular".
Return
a boolean which indicate if vertical grid is active or not |
Returns status of "Aspect locked" property for spacing values (mean, X and Y values are linked to keep ratio) SpacingAspectLocked value is used for grid type "rectangular".
Return
If locked, return True. |
Returns number of grid subdivision for document. Subdivision value is used for grid type "rectangular".
Return
A positive integer value, starting from 1 |
Save grid definition as an XML document
Return
A string with xml content |
Returns current grid type applied for document.
Return
The grid type can be: - "rectangular" - "isometric" - "isometric_legacy" |
Returns grid visibility for document.
Return
If grid is visible, return True. |