Skip to content

Commit b0ea27a

Browse files
author
wonder
committed
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
1 parent eecc31f commit b0ea27a

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

python/core/qgssymbol.sip

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ class QgsSymbol
3535
/**Gets a reference to m_pen. Don't use the pen to change color/style */
3636
virtual const QPen& pen() const;
3737

38+
/**Gets the path to the customs texture image*/
39+
virtual QString customTexture() const;
40+
/**Sets the path to the custom texture, and sets the brush to use TexturePattern */
41+
virtual void setCustomTexture( QString path );
42+
3843
/**Set the line (pen) style*/
3944
virtual void setLineStyle(Qt::PenStyle s);
4045
/**Set the fill (brush) style*/
4146
virtual void setFillStyle(Qt::BrushStyle s);
47+
4248
virtual void setLowerValue(QString value);
4349
virtual QString lowerValue() const;
4450
virtual void setUpperValue(QString value);
@@ -64,9 +70,14 @@ class QgsSymbol
6470
virtual QImage getPolygonSymbolAsImage();
6571

6672
/** Get QImage representation of point symbol with current settings
67-
*/
68-
virtual QImage getPointSymbolAsImage( double widthScale = 1,
69-
bool selected = false, QColor selectionColor = Qt::yellow );
73+
* and scaled (can be slow when scale != 1.0)
74+
*/
75+
virtual QImage getPointSymbolAsImage( double widthScale = 1.,
76+
bool selected = false,
77+
QColor selectionColor = Qt::yellow,
78+
double scale = 1.0,
79+
double rotation = 0.0,
80+
double rasterScaleFactor = 1.0 );
7081

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

91+
/**Returns the number of the rotation classification field*/
92+
int rotationClassificationField() const;
93+
/**Sets the number of the rotation classicifation field
94+
\param field the number of the field to classify for rotation*/
95+
void setRotationClassificationField( int field );
96+
97+
/**Returns the number of the scale classification field*/
98+
int scaleClassificationField() const;
99+
/**Sets the number of the scale classicifation field
100+
\param field the number of the field to classify for scale*/
101+
void setScaleClassificationField( int field );
102+
80103
};
81104

82105

src/core/symbology/qgssymbol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class CORE_EXPORT QgsSymbol
104104
virtual QImage getCachedPointSymbolAsImage( double widthScale = 1.,
105105
bool selected = false, QColor selectionColor = Qt::yellow );
106106

107-
/* Get QImage representation of point symbol with current settings
107+
/** Get QImage representation of point symbol with current settings
108108
* and scaled (can be slow when scale != 1.0)
109109
*/
110110
virtual QImage getPointSymbolAsImage( double widthScale = 1.,

0 commit comments

Comments
 (0)