Class: QgsLayoutItemPolygon¶
Layout item for node based polygon shapes.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
An abstract layout item that provides generic methods for node based shapes such as polygon or polylines. |
|
Base class for graphical items within a |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
|
Interface for layout objects which support undo/redo commands. |
Methods
Sets the symbol used to draw the shape. |
|
Returns the fill symbol used to draw the shape. |
Static Methods
Returns a new polygon item for the specified layout. |
- class qgis.core.QgsLayoutItemPolygon[source]¶
Bases:
QgsLayoutNodesItem- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemPolygon for the specified
layout.- Parameters:
layout (Optional[QgsLayout])
- __init__(polygon: QPolygonF, layout: QgsLayout | None)
Constructor for QgsLayoutItemPolygon for the specified
polygonandlayout.- Parameters:
polygon (QPolygonF)
layout (Optional[QgsLayout])
- static create(layout: QgsLayout | None) QgsLayoutItemPolygon | None[source]¶
Returns a new polygon item for the specified
layout.The caller takes responsibility for deleting the returned object.
- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemPolygon]
- setSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the
symbolused to draw the shape. Ownership ofsymbolis not transferred.See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- symbol(self) QgsFillSymbol | None[source]¶
Returns the fill symbol used to draw the shape.
See also
- Return type:
Optional[QgsFillSymbol]