Class: Qgs25DRenderer¶
- class qgis.core.Qgs25DRenderer¶
Bases:
QgsFeatureRenderer
Methods
- param visitor:
- rtype:
QgsFeatureRenderer
Try to convert from an existing renderer.
Create a new 2.5D renderer from XML
Render the
feature
with thesymbol
usingcontext
.render editing vertex marker at specified point
render editing vertex marker for a polygon
render editing vertex marker for a polyline
Gets the roof color
- param doc:
Saves generic renderer data into the specified
element
.Set the roof color
Set the shadow's color
Enable or disable the shadow
Set the shadow's spread distance in map units
Set the wall color
Set wall shading enabled
Gets the shadow's color
Is the shadow enabled
Gets the shadow's spread distance in map units
- param context:
- param context:
- param feature:
- param context:
- param context:
Gets the wall color
Gets wall shading enabled
- accept(self, visitor: QgsStyleEntityVisitorInterface) bool ¶
- Parameters:
visitor (QgsStyleEntityVisitorInterface) –
- Return type:
bool
- clone(self) QgsFeatureRenderer ¶
- Return type:
- convertFromRenderer(renderer: QgsFeatureRenderer) Qgs25DRenderer ¶
Try to convert from an existing renderer. If it is not of the same type we assume that the internals are not compatible and create a new default 2.5D renderer.
- Parameters:
renderer (QgsFeatureRenderer) –
- Return type:
- convertSymbolRotation(symbol: QgsSymbol, field: str)¶
Note
this function is used to convert old rotations expressions to symbol level DataDefined angle
- convertSymbolSizeScale(symbol: QgsSymbol, method: Qgis.ScaleMethod, field: str)¶
Note
this function is used to convert old sizeScale expressions to symbol level DataDefined size
- create(element: QDomElement, context: QgsReadWriteContext) QgsFeatureRenderer ¶
Create a new 2.5D renderer from XML
- Parameters:
element (QDomElement) – XML information
context (QgsReadWriteContext) – reading context
- Return type:
- renderFeatureWithSymbol(self, feature: QgsFeature, symbol: QgsSymbol, context: QgsRenderContext, layer: int, selected: bool, drawVertexMarker: bool)¶
Render the
feature
with thesymbol
usingcontext
. Uselayer
to specify the symbol layer,selected
to specify if it should be rendered as selected anddrawVertexMarker
to specify if vertex markers should be rendered.
- renderVertexMarker(self, pt: QPointF | QPoint, context: QgsRenderContext)¶
render editing vertex marker at specified point
- renderVertexMarkerPolygon(self, pts: QPolygonF, rings: Iterable[QPolygonF], context: QgsRenderContext)¶
render editing vertex marker for a polygon
- renderVertexMarkerPolyline(self, pts: QPolygonF, context: QgsRenderContext)¶
render editing vertex marker for a polyline
- roofColor(self) QColor ¶
Gets the roof color
- Return type:
QColor
- save(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
- Parameters:
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
QDomElement
- saveRendererData(self, doc: QDomDocument, element: QDomElement, context: QgsReadWriteContext)¶
Saves generic renderer data into the specified
element
.This method should be called in a subclass’
save()
implementation in order to store all common base class properties in the DOMelement
.New in version 3.22.
- setRoofColor(self, roofColor: QColor | Qt.GlobalColor)¶
Set the roof color
- Parameters:
roofColor (Union[QColor) –
- setShadowColor(self, shadowColor: QColor | Qt.GlobalColor)¶
Set the shadow’s color
- Parameters:
shadowColor (Union[QColor) –
- setShadowEnabled(self, value: bool)¶
Enable or disable the shadow
- Parameters:
value (bool) –
- setShadowSpread(self, shadowSpread: float)¶
Set the shadow’s spread distance in map units
- Parameters:
shadowSpread (float) –
- setWallColor(self, wallColor: QColor | Qt.GlobalColor)¶
Set the wall color
- Parameters:
wallColor (Union[QColor) –
- setWallShadingEnabled(self, enabled: bool)¶
Set wall shading enabled
- Parameters:
enabled (bool) –
- shadowColor(self) QColor ¶
Gets the shadow’s color
- Return type:
QColor
- shadowEnabled(self) bool ¶
Is the shadow enabled
- Return type:
bool
- shadowSpread(self) float ¶
Gets the shadow’s spread distance in map units
- Return type:
float
- startRender(self, context: QgsRenderContext, fields: QgsFields)¶
- Parameters:
context (QgsRenderContext) –
fields (QgsFields) –
- stopRender(self, context: QgsRenderContext)¶
- Parameters:
context (QgsRenderContext) –
- symbolForFeature(self, feature: QgsFeature, context: QgsRenderContext) QgsSymbol ¶
- Parameters:
feature (QgsFeature) –
context (QgsRenderContext) –
- Return type:
- symbols(self, context: QgsRenderContext) List[QgsSymbol] ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
List[QgsSymbol]
- usedAttributes(self, context: QgsRenderContext) Set[str] ¶
- Parameters:
context (QgsRenderContext) –
- Return type:
Set[str]
- wallColor(self) QColor ¶
Gets the wall color
- Return type:
QColor
- wallShadingEnabled(self) bool ¶
Gets wall shading enabled
- Return type:
bool