QGIS API Documentation  2.15.0-Master (972fc9f)
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 343 of file qgssymbolv2.h.

Constructor & Destructor Documentation

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 1031 of file qgssymbolv2.cpp.

QgsSymbolV2RenderContext::~QgsSymbolV2RenderContext ( )

Definition at line 1046 of file qgssymbolv2.cpp.

Member Function Documentation

qreal QgsSymbolV2RenderContext::alpha ( ) const
inline

Get alpha transparency 1 for opaque, 0 for invisible.

Definition at line 366 of file qgssymbolv2.h.

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 1076 of file qgssymbolv2.cpp.

const QgsFeature* QgsSymbolV2RenderContext::feature ( ) const
inline

Current feature being rendered - may be null.

Definition at line 378 of file qgssymbolv2.h.

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 384 of file qgssymbolv2.h.

int QgsSymbolV2RenderContext::geometryPartCount ( ) const
inline

Part count of current geometry.

Note
added in QGIS 2.16

Definition at line 389 of file qgssymbolv2.h.

int QgsSymbolV2RenderContext::geometryPartNum ( ) const
inline

Part number of current geometry.

Note
added in QGIS 2.16

Definition at line 398 of file qgssymbolv2.h.

QgsMapUnitScale QgsSymbolV2RenderContext::mapUnitScale ( ) const
inline

Definition at line 362 of file qgssymbolv2.h.

QgsSymbolV2RenderContext & QgsSymbolV2RenderContext::operator= ( const QgsSymbolV2RenderContext )

Definition at line 1066 of file qgssymbolv2.cpp.

double QgsSymbolV2RenderContext::outputLineWidth ( double  width) const

Definition at line 1056 of file qgssymbolv2.cpp.

double QgsSymbolV2RenderContext::outputPixelSize ( double  size) const

Definition at line 1061 of file qgssymbolv2.cpp.

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

Definition at line 359 of file qgssymbolv2.h.

QgsRenderContext& QgsSymbolV2RenderContext::renderContext ( )
inline

Definition at line 349 of file qgssymbolv2.h.

const QgsRenderContext& QgsSymbolV2RenderContext::renderContext ( ) const
inline

Definition at line 350 of file qgssymbolv2.h.

int QgsSymbolV2RenderContext::renderHints ( ) const
inline

Definition at line 373 of file qgssymbolv2.h.

bool QgsSymbolV2RenderContext::selected ( ) const
inline

Definition at line 370 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setAlpha ( qreal  alpha)
inline

Set alpha transparency 1 for opaque, 0 for invisible.

Definition at line 368 of file qgssymbolv2.h.

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 1081 of file qgssymbolv2.cpp.

void QgsSymbolV2RenderContext::setFeature ( const QgsFeature f)
inline

Definition at line 376 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setGeometryPartCount ( int  count)
inline

Sets the part count of current geometry.

Note
added in QGIS 2.16

Definition at line 393 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setGeometryPartNum ( int  num)
inline

Sets the part number of current geometry.

Note
added in QGIS 2.16

Definition at line 402 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setMapUnitScale ( const QgsMapUnitScale scale)
inline

Definition at line 363 of file qgssymbolv2.h.

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 1051 of file qgssymbolv2.cpp.

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

Definition at line 360 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setRenderHints ( int  hints)
inline

Definition at line 374 of file qgssymbolv2.h.

void QgsSymbolV2RenderContext::setSelected ( bool  selected)
inline

Definition at line 371 of file qgssymbolv2.h.


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