QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsSVGFillSymbolLayer Class Reference

A class for svg fill patterns. More...

#include <qgsfillsymbollayerv2.h>

Inheritance diagram for QgsSVGFillSymbolLayer:
Inheritance graph
[legend]

Public Member Functions

 QgsSVGFillSymbolLayer (const QString &svgFilePath="", double width=20, double rotation=0.0)
 QgsSVGFillSymbolLayer (const QByteArray &svgData, double width=20, double rotation=0.0)
 ~QgsSVGFillSymbolLayer ()
QString layerType () const
void startRender (QgsSymbolV2RenderContext &context)
void stopRender (QgsSymbolV2RenderContext &context)
QgsStringMap properties () const
QgsSymbolLayerV2clone () const
void toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const
void setSvgFilePath (const QString &svgPath)
QString svgFilePath () const
void setPatternWidth (double width)
double patternWidth () const
void setSvgFillColor (const QColor &c)
QColor svgFillColor () const
void setSvgOutlineColor (const QColor &c)
QColor svgOutlineColor () const
void setSvgOutlineWidth (double w)
double svgOutlineWidth () const
void setPatternWidthUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit patternWidthUnit () const
void setPatternWidthMapUnitScale (const QgsMapUnitScale &scale)
const QgsMapUnitScalepatternWidthMapUnitScale () const
void setSvgOutlineWidthUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit svgOutlineWidthUnit () const
void setSvgOutlineWidthMapUnitScale (const QgsMapUnitScale &scale)
const QgsMapUnitScalesvgOutlineWidthMapUnitScale () const
void setOutputUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit outputUnit () const
void setMapUnitScale (const QgsMapUnitScale &scale)
QgsMapUnitScale mapUnitScale () const
- Public Member Functions inherited from QgsImageFillSymbolLayer
 QgsImageFillSymbolLayer ()
virtual ~QgsImageFillSymbolLayer ()
void renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context)
virtual QgsSymbolV2subSymbol ()
virtual bool setSubSymbol (QgsSymbolV2 *symbol)
void setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit)
QgsSymbolV2::OutputUnit outlineWidthUnit () const
void setOutlineWidthMapUnitScale (const QgsMapUnitScale &scale)
const QgsMapUnitScaleoutlineWidthMapUnitScale () const
virtual double estimateMaxBleed () const
 Returns the estimated maximum distance which the layer style will bleed outside the drawn shape.
virtual double dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const
virtual QColor dxfColor (const QgsSymbolV2RenderContext &context) const
virtual Qt::PenStyle dxfPenStyle () const
- Public Member Functions inherited from QgsFillSymbolLayerV2
void drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size)
void setAngle (double angle)
double angle () const
- Public Member Functions inherited from QgsSymbolLayerV2
virtual QColor color () const
virtual void setColor (const QColor &color)
virtual void setOutlineColor (const QColor &color)
 Set outline color.
virtual QColor outlineColor () const
 Get outline color.
virtual void setFillColor (const QColor &color)
 Set fill color.
virtual QColor fillColor () const
 Get fill color.
virtual ~QgsSymbolLayerV2 ()
virtual QString ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const
QgsSymbolV2::SymbolType type () const
void setLocked (bool locked)
bool isLocked () const
void setRenderingPass (int renderingPass)
int renderingPass () const
virtual QSet< QString > usedAttributes () const
virtual const QgsExpressiondataDefinedProperty (const QString &property) const
virtual QString dataDefinedPropertyString (const QString &property) const
virtual void setDataDefinedProperty (const QString &property, const QString &expressionString)
virtual void removeDataDefinedProperty (const QString &property)
virtual void removeDataDefinedProperties ()
bool hasDataDefinedProperties () const
virtual bool writeDxf (QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, const QgsSymbolV2RenderContext *context, const QgsFeature *f, const QPointF &shift=QPointF(0.0, 0.0)) const
virtual QVector< qreal > dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const
virtual QColor dxfBrushColor (const QgsSymbolV2RenderContext &context) const
virtual Qt::BrushStyle dxfBrushStyle () const

Static Public Member Functions

static QgsSymbolLayerV2create (const QgsStringMap &properties=QgsStringMap())
static QgsSymbolLayerV2createFromSld (QDomElement &element)

Protected Member Functions

void applyDataDefinedSettings (const QgsSymbolV2RenderContext &context)

Protected Attributes

double mPatternWidth
 Width of the pattern (in output units)
QgsSymbolV2::OutputUnit mPatternWidthUnit
QgsMapUnitScale mPatternWidthMapUnitScale
QByteArray mSvgData
 SVG data.
QString mSvgFilePath
 Path to the svg file (or empty if constructed directly from data)
QRectF mSvgViewBox
 SVG view box (to keep the aspect ratio.
QImage * mSvgPattern
 SVG pattern image.
QColor mSvgFillColor
QColor mSvgOutlineColor
double mSvgOutlineWidth
QgsSymbolV2::OutputUnit mSvgOutlineWidthUnit
QgsMapUnitScale mSvgOutlineWidthMapUnitScale
- Protected Attributes inherited from QgsImageFillSymbolLayer
QBrush mBrush
double mNextAngle
double mOutlineWidth
 Outline width.
QgsSymbolV2::OutputUnit mOutlineWidthUnit
QgsMapUnitScale mOutlineWidthMapUnitScale
QgsLineSymbolV2mOutline
 Custom outline.
- Protected Attributes inherited from QgsFillSymbolLayerV2
double mAngle
- Protected Attributes inherited from QgsSymbolLayerV2
QgsSymbolV2::SymbolType mType
bool mLocked
QColor mColor
int mRenderingPass
QMap< QString, QgsExpression * > mDataDefinedProperties

Additional Inherited Members

- Static Protected Attributes inherited from QgsSymbolLayerV2
static const bool selectionIsOpaque = true
static const bool selectFillBorder = false
static const bool selectFillStyle = false

Detailed Description

A class for svg fill patterns.

The class automatically scales the pattern to the appropriate pixel dimensions of the output device

Constructor & Destructor Documentation

QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer ( const QString &  svgFilePath = "",
double  width = 20,
double  rotation = 0.0 
)
QgsSVGFillSymbolLayer::QgsSVGFillSymbolLayer ( const QByteArray &  svgData,
double  width = 20,
double  rotation = 0.0 
)
QgsSVGFillSymbolLayer::~QgsSVGFillSymbolLayer ( )

Member Function Documentation

void QgsSVGFillSymbolLayer::applyDataDefinedSettings ( const QgsSymbolV2RenderContext context)
protectedvirtual

Reimplemented from QgsImageFillSymbolLayer.

QgsSymbolLayerV2 * QgsSVGFillSymbolLayer::clone ( ) const
virtual

Implements QgsSymbolLayerV2.

QgsSymbolLayerV2 * QgsSVGFillSymbolLayer::create ( const QgsStringMap properties = QgsStringMap())
static
QgsSymbolLayerV2 * QgsSVGFillSymbolLayer::createFromSld ( QDomElement &  element)
static
QString QgsSVGFillSymbolLayer::layerType ( ) const
virtual

Implements QgsSymbolLayerV2.

QgsMapUnitScale QgsSVGFillSymbolLayer::mapUnitScale ( ) const
virtual

Reimplemented from QgsImageFillSymbolLayer.

QgsSymbolV2::OutputUnit QgsSVGFillSymbolLayer::outputUnit ( ) const
virtual

Reimplemented from QgsImageFillSymbolLayer.

double QgsSVGFillSymbolLayer::patternWidth ( ) const
inline
const QgsMapUnitScale& QgsSVGFillSymbolLayer::patternWidthMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsSVGFillSymbolLayer::patternWidthUnit ( ) const
inline
QgsStringMap QgsSVGFillSymbolLayer::properties ( ) const
virtual

Implements QgsSymbolLayerV2.

void QgsSVGFillSymbolLayer::setMapUnitScale ( const QgsMapUnitScale scale)
virtual

Reimplemented from QgsImageFillSymbolLayer.

void QgsSVGFillSymbolLayer::setOutputUnit ( QgsSymbolV2::OutputUnit  unit)
virtual

Reimplemented from QgsImageFillSymbolLayer.

void QgsSVGFillSymbolLayer::setPatternWidth ( double  width)
inline
void QgsSVGFillSymbolLayer::setPatternWidthMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsSVGFillSymbolLayer::setPatternWidthUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsSVGFillSymbolLayer::setSvgFilePath ( const QString &  svgPath)
void QgsSVGFillSymbolLayer::setSvgFillColor ( const QColor &  c)
inline
void QgsSVGFillSymbolLayer::setSvgOutlineColor ( const QColor &  c)
inline
void QgsSVGFillSymbolLayer::setSvgOutlineWidth ( double  w)
inline
void QgsSVGFillSymbolLayer::setSvgOutlineWidthMapUnitScale ( const QgsMapUnitScale scale)
inline
void QgsSVGFillSymbolLayer::setSvgOutlineWidthUnit ( QgsSymbolV2::OutputUnit  unit)
inline
void QgsSVGFillSymbolLayer::startRender ( QgsSymbolV2RenderContext context)
virtual

Implements QgsSymbolLayerV2.

void QgsSVGFillSymbolLayer::stopRender ( QgsSymbolV2RenderContext context)
virtual

Implements QgsSymbolLayerV2.

QString QgsSVGFillSymbolLayer::svgFilePath ( ) const
inline
QColor QgsSVGFillSymbolLayer::svgFillColor ( ) const
inline
QColor QgsSVGFillSymbolLayer::svgOutlineColor ( ) const
inline
double QgsSVGFillSymbolLayer::svgOutlineWidth ( ) const
inline
const QgsMapUnitScale& QgsSVGFillSymbolLayer::svgOutlineWidthMapUnitScale ( ) const
inline
QgsSymbolV2::OutputUnit QgsSVGFillSymbolLayer::svgOutlineWidthUnit ( ) const
inline
void QgsSVGFillSymbolLayer::toSld ( QDomDocument &  doc,
QDomElement &  element,
QgsStringMap  props 
) const
virtual

Reimplemented from QgsSymbolLayerV2.

Member Data Documentation

double QgsSVGFillSymbolLayer::mPatternWidth
protected

Width of the pattern (in output units)

QgsMapUnitScale QgsSVGFillSymbolLayer::mPatternWidthMapUnitScale
protected
QgsSymbolV2::OutputUnit QgsSVGFillSymbolLayer::mPatternWidthUnit
protected
QByteArray QgsSVGFillSymbolLayer::mSvgData
protected

SVG data.

QString QgsSVGFillSymbolLayer::mSvgFilePath
protected

Path to the svg file (or empty if constructed directly from data)

QColor QgsSVGFillSymbolLayer::mSvgFillColor
protected
QColor QgsSVGFillSymbolLayer::mSvgOutlineColor
protected
double QgsSVGFillSymbolLayer::mSvgOutlineWidth
protected
QgsMapUnitScale QgsSVGFillSymbolLayer::mSvgOutlineWidthMapUnitScale
protected
QgsSymbolV2::OutputUnit QgsSVGFillSymbolLayer::mSvgOutlineWidthUnit
protected
QImage* QgsSVGFillSymbolLayer::mSvgPattern
protected

SVG pattern image.

QRectF QgsSVGFillSymbolLayer::mSvgViewBox
protected

SVG view box (to keep the aspect ratio.


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