Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 4, 2016
1 parent 4f3564c commit c40d6d3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
17 changes: 16 additions & 1 deletion python/core/symbology-ng/qgssymbolv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,21 @@ class QgsSymbolV2
//! delete layer at specified index and set a new one
bool changeSymbolLayer( int index, QgsSymbolLayerV2 *layer /Transfer/ );

/** Begins the rendering process for the symbol. This must be called before renderFeature(),
* and should be followed by a call to stopRender().
* @param context render context which symbol will be drawn using
* @param fields fields for features to be rendered (usually the associated
* vector layer's fields). Required for correct calculation of data defined
* overrides.
* @see stopRender()
*/
void startRender( QgsRenderContext& context, const QgsFields& fields = QgsFields() );

/** Ends the rendering process. This should be called after rendering all desired features.
* @param context render context, must match the context specified when startRender()
* was called.
* @see startRender()
*/
void stopRender( QgsRenderContext& context );

void setColor( const QColor& color );
Expand Down Expand Up @@ -205,7 +219,8 @@ class QgsSymbolV2
const QgsVectorLayer* layer() const;

/**
* Render a feature.
* Render a feature. Before calling this the startRender() method should be called to initialise
* the rendering process. After rendering all features stopRender() must be called.
*/
void renderFeature( const QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false, int currentVertexMarkerType = 0, int currentVertexMarkerSize = 0 );

Expand Down
17 changes: 16 additions & 1 deletion src/core/symbology-ng/qgssymbolv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,21 @@ class CORE_EXPORT QgsSymbolV2
//! delete layer at specified index and set a new one
bool changeSymbolLayer( int index, QgsSymbolLayerV2 *layer );

/** Begins the rendering process for the symbol. This must be called before renderFeature(),
* and should be followed by a call to stopRender().
* @param context render context which symbol will be drawn using
* @param fields fields for features to be rendered (usually the associated
* vector layer's fields). Required for correct calculation of data defined
* overrides.
* @see stopRender()
*/
void startRender( QgsRenderContext& context, const QgsFields& fields = QgsFields() );

/** Ends the rendering process. This should be called after rendering all desired features.
* @param context render context, must match the context specified when startRender()
* was called.
* @see startRender()
*/
void stopRender( QgsRenderContext& context );

void setColor( const QColor& color );
Expand Down Expand Up @@ -244,7 +258,8 @@ class CORE_EXPORT QgsSymbolV2
const QgsVectorLayer* layer() const { return mLayer; }

/**
* Render a feature.
* Render a feature. Before calling this the startRender() method should be called to initialise
* the rendering process. After rendering all features stopRender() must be called.
*/
void renderFeature( const QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false, int currentVertexMarkerType = 0, int currentVertexMarkerSize = 0 );

Expand Down

0 comments on commit c40d6d3

Please sign in to comment.