QGIS API Documentation  2.17.0-Master (00653d2)
Public Member Functions | List of all members
QgsSymbolV2RenderContext Class Reference

#include <qgssymbolv2.h>

Public Member Functions

 QgsSymbolV2RenderContext (QgsRenderContext &c, QgsSymbolV2::OutputUnit u, qreal alpha=1.0, bool selected=false, int renderHints=0, const QgsFeature *f=nullptr, const QgsFields *fields=nullptr, const QgsMapUnitScale &mapUnitScale=QgsMapUnitScale())
 
 ~QgsSymbolV2RenderContext ()
 
qreal alpha () const
 Get alpha transparency 1 for opaque, 0 for invisible. More...
 
QgsExpressionContextScopeexpressionContextScope ()
 This scope is always available when a symbol of this type is being rendered. More...
 
const QgsFeaturefeature () const
 Current feature being rendered - may be null. More...
 
const QgsFieldsfields () const
 Fields of the layer. More...
 
int geometryPartCount () const
 Part count of current geometry. More...
 
int geometryPartNum () const
 Part number of current geometry. More...
 
QgsMapUnitScale mapUnitScale () const
 
QgsSymbolV2RenderContextoperator= (const QgsSymbolV2RenderContext &)
 
double outputLineWidth (double width) const
 
double outputPixelSize (double size) const
 
QgsSymbolV2::OutputUnit outputUnit () const
 
QgsRenderContextrenderContext ()
 
const QgsRenderContextrenderContext () const
 
int renderHints () const
 
bool selected () const
 
void setAlpha (qreal alpha)
 Set alpha transparency 1 for opaque, 0 for invisible. More...
 
void setExpressionContextScope (QgsExpressionContextScope *contextScope)
 Set an expression scope for this symbol. More...
 
void setFeature (const QgsFeature *f)
 
void setGeometryPartCount (int count)
 Sets the part count of current geometry. More...
 
void setGeometryPartNum (int num)
 Sets the part number of current geometry. More...
 
void setMapUnitScale (const QgsMapUnitScale &scale)
 
void setOriginalValueVariable (const QVariant &value)
 Sets the original value variable value for data defined symbology. More...
 
void setOutputUnit (QgsSymbolV2::OutputUnit u)
 
void setRenderHints (int hints)
 
void setSelected (bool selected)
 

Detailed Description

Definition at line 350 of file qgssymbolv2.h.

Constructor & Destructor Documentation

§ QgsSymbolV2RenderContext()

QgsSymbolV2RenderContext::QgsSymbolV2RenderContext ( QgsRenderContext c,
QgsSymbolV2::OutputUnit  u,
qreal  alpha = 1.0,
bool  selected = false,
int  renderHints = 0,
const QgsFeature f = nullptr,
const QgsFields fields = nullptr,
const QgsMapUnitScale mapUnitScale = QgsMapUnitScale() 
)

Definition at line 1032 of file qgssymbolv2.cpp.

§ ~QgsSymbolV2RenderContext()

QgsSymbolV2RenderContext::~QgsSymbolV2RenderContext ( )

Definition at line 1047 of file qgssymbolv2.cpp.

Member Function Documentation

§ alpha()

qreal QgsSymbolV2RenderContext::alpha ( ) const
inline

Get alpha transparency 1 for opaque, 0 for invisible.

Definition at line 373 of file qgssymbolv2.h.

§ expressionContextScope()

QgsExpressionContextScope * QgsSymbolV2RenderContext::expressionContextScope ( )

This scope is always available when a symbol of this type is being rendered.

Returns
An expression scope for details about this symbol

Definition at line 1077 of file qgssymbolv2.cpp.

§ feature()

const QgsFeature* QgsSymbolV2RenderContext::feature ( ) const
inline

Current feature being rendered - may be null.

Definition at line 385 of file qgssymbolv2.h.

§ fields()

const QgsFields* QgsSymbolV2RenderContext::fields ( ) const
inline

Fields of the layer.

Currently only available in startRender() calls to allow symbols with data-defined properties prepare the expressions (other times fields() returns null)

Note
added in 2.4

Definition at line 391 of file qgssymbolv2.h.

§ geometryPartCount()

int QgsSymbolV2RenderContext::geometryPartCount ( ) const
inline

Part count of current geometry.

Note
added in QGIS 2.16

Definition at line 396 of file qgssymbolv2.h.

§ geometryPartNum()

int QgsSymbolV2RenderContext::geometryPartNum ( ) const
inline

Part number of current geometry.

Note
added in QGIS 2.16

Definition at line 405 of file qgssymbolv2.h.

§ mapUnitScale()

QgsMapUnitScale QgsSymbolV2RenderContext::mapUnitScale ( ) const
inline

Definition at line 369 of file qgssymbolv2.h.

§ operator=()

QgsSymbolV2RenderContext & QgsSymbolV2RenderContext::operator= ( const QgsSymbolV2RenderContext )

Definition at line 1067 of file qgssymbolv2.cpp.

§ outputLineWidth()

double QgsSymbolV2RenderContext::outputLineWidth ( double  width) const

Definition at line 1057 of file qgssymbolv2.cpp.

§ outputPixelSize()

double QgsSymbolV2RenderContext::outputPixelSize ( double  size) const

Definition at line 1062 of file qgssymbolv2.cpp.

§ outputUnit()

QgsSymbolV2::OutputUnit QgsSymbolV2RenderContext::outputUnit ( ) const
inline

Definition at line 366 of file qgssymbolv2.h.

§ renderContext() [1/2]

QgsRenderContext& QgsSymbolV2RenderContext::renderContext ( )
inline

Definition at line 356 of file qgssymbolv2.h.

§ renderContext() [2/2]

const QgsRenderContext& QgsSymbolV2RenderContext::renderContext ( ) const
inline

Definition at line 357 of file qgssymbolv2.h.

§ renderHints()

int QgsSymbolV2RenderContext::renderHints ( ) const
inline

Definition at line 380 of file qgssymbolv2.h.

§ selected()

bool QgsSymbolV2RenderContext::selected ( ) const
inline

Definition at line 377 of file qgssymbolv2.h.

§ setAlpha()

void QgsSymbolV2RenderContext::setAlpha ( qreal  alpha)
inline

Set alpha transparency 1 for opaque, 0 for invisible.

Definition at line 375 of file qgssymbolv2.h.

§ setExpressionContextScope()

void QgsSymbolV2RenderContext::setExpressionContextScope ( QgsExpressionContextScope contextScope)

Set an expression scope for this symbol.

Will take ownership.

Parameters
contextScopeAn expression scope for details about this symbol

Definition at line 1082 of file qgssymbolv2.cpp.

§ setFeature()

void QgsSymbolV2RenderContext::setFeature ( const QgsFeature f)
inline

Definition at line 383 of file qgssymbolv2.h.

§ setGeometryPartCount()

void QgsSymbolV2RenderContext::setGeometryPartCount ( int  count)
inline

Sets the part count of current geometry.

Note
added in QGIS 2.16

Definition at line 400 of file qgssymbolv2.h.

§ setGeometryPartNum()

void QgsSymbolV2RenderContext::setGeometryPartNum ( int  num)
inline

Sets the part number of current geometry.

Note
added in QGIS 2.16

Definition at line 409 of file qgssymbolv2.h.

§ setMapUnitScale()

void QgsSymbolV2RenderContext::setMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 370 of file qgssymbolv2.h.

§ setOriginalValueVariable()

void QgsSymbolV2RenderContext::setOriginalValueVariable ( const QVariant value)

Sets the original value variable value for data defined symbology.

Parameters
valuevalue for original value variable. This usually represents the symbol property value before any data defined overrides have been applied.
Note
added in QGIS 2.12

Definition at line 1052 of file qgssymbolv2.cpp.

§ setOutputUnit()

void QgsSymbolV2RenderContext::setOutputUnit ( QgsSymbolV2::OutputUnit  u)
inline

Definition at line 367 of file qgssymbolv2.h.

§ setRenderHints()

void QgsSymbolV2RenderContext::setRenderHints ( int  hints)
inline

Definition at line 381 of file qgssymbolv2.h.

§ setSelected()

void QgsSymbolV2RenderContext::setSelected ( bool  selected)
inline

Definition at line 378 of file qgssymbolv2.h.


The documentation for this class was generated from the following files: