16 #ifndef QGSRENDERERV2_H
17 #define QGSRENDERERV2_H
26 #include <QDomDocument>
27 #include <QDomElement>
42 #define RENDERER_TAG_NAME "renderer-v2"
76 QString
type()
const {
return mType; }
88 virtual QList<QString> usedAttributes() = 0;
94 virtual bool renderFeature(
QgsFeature& feature,
QgsRenderContext& context,
int layer = -1,
bool selected =
false,
bool drawVertexMarker =
false );
97 virtual QString dump()
const;
102 RotationField = 1 << 1,
103 MoreSymbolsPerFeature = 1 << 2,
105 ScaleDependent = 1 << 4
122 virtual QDomElement save( QDomDocument& doc );
126 virtual QDomElement writeSld( QDomDocument& doc,
const QgsVectorLayer &layer )
const;
143 virtual void toSld( QDomDocument& doc, QDomElement &element )
const
144 { element.appendChild( doc.createComment( QString(
"FeatureRendererV2 %1 not implemented yet" ).arg( type() ) ) ); }
155 void setVertexMarkerAppearance(
int type,
int size );
179 void renderFeatureWithSymbol(
QgsFeature& feature,
184 bool drawVertexMarker );
189 void renderVertexMarkerPolyline( QPolygonF& pts,
QgsRenderContext& context );
191 void renderVertexMarkerPolygon( QPolygonF& pts, QList<QPolygonF>* rings,
QgsRenderContext& context );
193 static const unsigned char* _getPoint( QPointF& pt,
QgsRenderContext& context,
const unsigned char* wkb );
194 static const unsigned char* _getLineString( QPolygonF& pts,
QgsRenderContext& context,
const unsigned char* wkb );
195 static const unsigned char* _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes,
QgsRenderContext& context,
const unsigned char* wkb );
197 void setScaleMethodToSymbol(
QgsSymbolV2* symbol,
int scaleMethod );
209 class QgsRendererV2Widget;
211 #endif // QGSRENDERERV2_H