Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a bunch of missing functions in bindings for QgsSymbol.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10548 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 12, 2009
1 parent eecc31f commit b0ea27a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
29 changes: 26 additions & 3 deletions python/core/qgssymbol.sip
Expand Up @@ -35,10 +35,16 @@ class QgsSymbol
/**Gets a reference to m_pen. Don't use the pen to change color/style */
virtual const QPen& pen() const;

/**Gets the path to the customs texture image*/
virtual QString customTexture() const;
/**Sets the path to the custom texture, and sets the brush to use TexturePattern */
virtual void setCustomTexture( QString path );

/**Set the line (pen) style*/
virtual void setLineStyle(Qt::PenStyle s);
/**Set the fill (brush) style*/
virtual void setFillStyle(Qt::BrushStyle s);

virtual void setLowerValue(QString value);
virtual QString lowerValue() const;
virtual void setUpperValue(QString value);
Expand All @@ -64,9 +70,14 @@ class QgsSymbol
virtual QImage getPolygonSymbolAsImage();

/** Get QImage representation of point symbol with current settings
*/
virtual QImage getPointSymbolAsImage( double widthScale = 1,
bool selected = false, QColor selectionColor = Qt::yellow );
* and scaled (can be slow when scale != 1.0)
*/
virtual QImage getPointSymbolAsImage( double widthScale = 1.,
bool selected = false,
QColor selectionColor = Qt::yellow,
double scale = 1.0,
double rotation = 0.0,
double rasterScaleFactor = 1.0 );

/**Writes the contents of the symbol to a configuration file
@ return true in case of success*/
Expand All @@ -77,6 +88,18 @@ class QgsSymbol
/**Returns if this symbol is point/ line or polygon*/
QGis::GeometryType type() const;

/**Returns the number of the rotation classification field*/
int rotationClassificationField() const;
/**Sets the number of the rotation classicifation field
\param field the number of the field to classify for rotation*/
void setRotationClassificationField( int field );

/**Returns the number of the scale classification field*/
int scaleClassificationField() const;
/**Sets the number of the scale classicifation field
\param field the number of the field to classify for scale*/
void setScaleClassificationField( int field );

};


2 changes: 1 addition & 1 deletion src/core/symbology/qgssymbol.h
Expand Up @@ -104,7 +104,7 @@ class CORE_EXPORT QgsSymbol
virtual QImage getCachedPointSymbolAsImage( double widthScale = 1.,
bool selected = false, QColor selectionColor = Qt::yellow );

/* Get QImage representation of point symbol with current settings
/** Get QImage representation of point symbol with current settings
* and scaled (can be slow when scale != 1.0)
*/
virtual QImage getPointSymbolAsImage( double widthScale = 1.,
Expand Down

0 comments on commit b0ea27a

Please sign in to comment.