QGIS API Documentation
2.2.0-Valmiera
|
#include <qgsfillsymbollayerv2.h>
Public Member Functions | |
QgsLinePatternFillSymbolLayer () | |
~QgsLinePatternFillSymbolLayer () | |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. | |
QString | ogrFeatureStyleWidth (double widthScaleFactor) const |
void | setLineAngle (double a) |
double | lineAngle () const |
void | setDistance (double d) |
double | distance () const |
void | setLineWidth (double w) |
double | lineWidth () const |
void | setColor (const QColor &c) |
QColor | color () const |
void | setOffset (double offset) |
double | offset () const |
void | setDistanceUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | distanceUnit () const |
void | setLineWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | lineWidthUnit () const |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | offsetUnit () const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
bool | setSubSymbol (QgsSymbolV2 *symbol) |
QgsSymbolV2 * | subSymbol () |
Public Member Functions inherited from QgsImageFillSymbolLayer | |
QgsImageFillSymbolLayer () | |
virtual | ~QgsImageFillSymbolLayer () |
void | renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
void | setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outlineWidthUnit () const |
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 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 QgsExpression * | dataDefinedProperty (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 |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QgsSymbolLayerV2 * | createFromSld (QDomElement &element) |
Protected Member Functions | |
void | applyDataDefinedSettings (const QgsSymbolV2RenderContext &context) |
Protected Attributes | |
double | mDistance |
Distance (in mm or map units) between lines. | |
QgsSymbolV2::OutputUnit | mDistanceUnit |
double | mLineWidth |
Line width (in mm or map units) | |
QgsSymbolV2::OutputUnit | mLineWidthUnit |
QColor | mColor |
double | mLineAngle |
Vector line angle in degrees (0 = horizontal, counterclockwise) | |
double | mOffset |
Offset perpendicular to line direction. | |
QgsSymbolV2::OutputUnit | mOffsetUnit |
Protected Attributes inherited from QgsImageFillSymbolLayer | |
QBrush | mBrush |
double | mNextAngle |
double | mOutlineWidth |
Outline width. | |
QgsSymbolV2::OutputUnit | mOutlineWidthUnit |
QgsLineSymbolV2 * | mOutline |
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 |
Private Member Functions | |
void | applyPattern (const QgsSymbolV2RenderContext &context, QBrush &brush, double lineAngle, double distance, double lineWidth, const QColor &color) |
Applies the svg pattern to the brush. |
Private Attributes | |
QgsLineSymbolV2 * | mFillLineSymbol |
Fill line. |
Additional Inherited Members | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
Definition at line 389 of file qgsfillsymbollayerv2.h.
QgsLinePatternFillSymbolLayer::QgsLinePatternFillSymbolLayer | ( | ) |
Definition at line 1405 of file qgsfillsymbollayerv2.cpp.
References setSubSymbol().
Referenced by create(), and createFromSld().
QgsLinePatternFillSymbolLayer::~QgsLinePatternFillSymbolLayer | ( | ) |
Definition at line 1424 of file qgsfillsymbollayerv2.cpp.
References mFillLineSymbol.
|
protectedvirtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 1921 of file qgsfillsymbollayerv2.cpp.
References applyPattern(), color(), QgsSymbolLayerV2Utils::decodeColor(), distance(), QgsExpression::evaluate(), QgsSymbolLayerV2::expression(), QgsSymbolV2RenderContext::feature(), lineAngle(), lineWidth(), QgsImageFillSymbolLayer::mBrush, mColor, mDistance, mLineAngle, and mLineWidth.
|
private |
Applies the svg pattern to the brush.
Definition at line 1558 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolV2RenderContext::alpha(), QgsLineSymbolV2::clone(), QgsSymbolLayerV2::estimateMaxBleed(), QgsSymbolV2RenderContext::feature(), QgsMarkerLineSymbolLayerV2::interval(), QgsMarkerLineSymbolLayerV2::intervalUnit(), M_PI, QgsRenderContext::mapToPixel(), QgsMapToPixel::mapUnitsPerPixel(), QgsImageFillSymbolLayer::mBrush, mDistanceUnit, mFillLineSymbol, QgsSymbolV2::MM, mOffset, mOffsetUnit, QgsSymbolLayerV2Utils::multiplyImageOpacity(), QgsSymbolLayerV2Utils::pixelSizeScaleFactor(), QgsSymbolLayerV2Utils::pointOnLineWithDistance(), qgsDoubleNear(), QgsRenderContext::rasterScaleFactor(), QgsSymbolV2RenderContext::renderContext(), QgsLineSymbolV2::renderPolyline(), QgsRenderContext::scaleFactor(), QgsSymbolV2RenderContext::selected(), QgsRenderContext::setForceVectorOutput(), QgsMarkerLineSymbolLayerV2::setInterval(), QgsRenderContext::setMapToPixel(), QgsRenderContext::setPainter(), QgsRenderContext::setRasterScaleFactor(), QgsRenderContext::setScaleFactor(), QgsSymbolV2::startRender(), QgsSymbolV2::stopRender(), QgsSymbolV2::symbolLayer(), and QgsSymbolV2::symbolLayerCount().
Referenced by applyDataDefinedSettings(), and startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1847 of file qgsfillsymbollayerv2.cpp.
References QgsLineSymbolV2::clone(), QgsSymbolLayerV2::copyDataDefinedProperties(), create(), mDistanceUnit, mFillLineSymbol, mLineWidthUnit, mOffsetUnit, properties(), setDistanceUnit(), setLineWidthUnit(), setOffsetUnit(), and setSubSymbol().
|
inlinevirtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 422 of file qgsfillsymbollayerv2.h.
References QgsSymbolLayerV2::mColor.
Referenced by applyDataDefinedSettings(), and create().
|
static |
Definition at line 1478 of file qgsfillsymbollayerv2.cpp.
References color(), QgsSymbolLayerV2Utils::decodeColor(), QgsSymbolLayerV2Utils::decodeOutputUnit(), distance(), lineAngle(), lineWidth(), offset(), QgsLinePatternFillSymbolLayer(), setColor(), QgsSymbolLayerV2::setDataDefinedProperty(), setDistance(), setDistanceUnit(), setLineAngle(), setLineWidth(), setLineWidthUnit(), setOffset(), and setOffsetUnit().
Referenced by clone(), and QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
static |
Definition at line 1955 of file qgsfillsymbollayerv2.cpp.
References QgsFillSymbolLayerV2::angle(), QgsSymbolLayerV2Utils::createLineLayerFromSld(), QgsSymbolLayerV2Utils::displacementFromSldElement(), QgsSymbolLayerV2::fillColor(), lineWidth(), offset(), QgsDebugMsg, QgsLinePatternFillSymbolLayer(), QgsSymbolLayerV2Utils::rotationFromSldElement(), setColor(), setDistance(), setLineAngle(), setLineWidth(), setOffset(), setSubSymbol(), size, and QgsSymbolLayerV2Utils::wellKnownMarkerFromSld().
Referenced by QgsSymbolLayerV2Registry::QgsSymbolLayerV2Registry().
|
inline |
Definition at line 418 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), and create().
|
inline |
Definition at line 427 of file qgsfillsymbollayerv2.h.
|
virtual |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape.
Eg, polygons drawn with an outline will draw half the width of the outline outside of the polygon. This amount is estimated, since it may be affected by data defined symbology rules.
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 1456 of file qgsfillsymbollayerv2.cpp.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1553 of file qgsfillsymbollayerv2.cpp.
|
inline |
Definition at line 416 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), and create().
|
inline |
Definition at line 420 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), create(), and createFromSld().
|
inline |
Definition at line 430 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 424 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 433 of file qgsfillsymbollayerv2.h.
QString QgsLinePatternFillSymbolLayer::ogrFeatureStyleWidth | ( | double | widthScaleFactor | ) | const |
Definition at line 1906 of file qgsfillsymbollayerv2.cpp.
References mColor, mDistance, mLineAngle, and mLineWidth.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1468 of file qgsfillsymbollayerv2.cpp.
References mDistanceUnit, QgsSymbolV2::Mixed, mLineWidthUnit, and mOffsetUnit.
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1832 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolLayerV2Utils::encodeColor(), QgsSymbolLayerV2Utils::encodeOutputUnit(), mColor, mDistance, mDistanceUnit, mLineAngle, mLineWidth, mLineWidthUnit, mOffset, mOffsetUnit, and QgsSymbolLayerV2::saveDataDefinedProperties().
Referenced by clone().
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1418 of file qgsfillsymbollayerv2.cpp.
References mColor, mFillLineSymbol, and QgsSymbolV2::setColor().
Referenced by create(), and createFromSld().
|
inline |
Definition at line 417 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 426 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 415 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
void QgsLinePatternFillSymbolLayer::setLineWidth | ( | double | w | ) |
Definition at line 1412 of file qgsfillsymbollayerv2.cpp.
References mFillLineSymbol, mLineWidth, and QgsLineSymbolV2::setWidth().
Referenced by create(), and createFromSld().
|
inline |
Definition at line 429 of file qgsfillsymbollayerv2.h.
|
inline |
Definition at line 423 of file qgsfillsymbollayerv2.h.
Referenced by create(), and createFromSld().
|
inline |
Definition at line 432 of file qgsfillsymbollayerv2.h.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1461 of file qgsfillsymbollayerv2.cpp.
References mDistanceUnit, mLineWidthUnit, and mOffsetUnit.
|
virtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 1429 of file qgsfillsymbollayerv2.cpp.
References QgsSymbolV2::Line, mFillLineSymbol, and QgsSymbolV2::type().
Referenced by clone(), createFromSld(), and QgsLinePatternFillSymbolLayer().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1816 of file qgsfillsymbollayerv2.cpp.
References applyPattern(), QgsSymbolV2RenderContext::layer(), QgsImageFillSymbolLayer::mBrush, mColor, mDistance, mFillLineSymbol, mLineAngle, mLineWidth, QgsSymbolLayerV2::prepareExpressions(), QgsSymbolV2RenderContext::renderContext(), QgsRenderContext::rendererScale(), and QgsSymbolV2::startRender().
|
virtual |
Implements QgsSymbolLayerV2.
Definition at line 1828 of file qgsfillsymbollayerv2.cpp.
|
virtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 1451 of file qgsfillsymbollayerv2.cpp.
References mFillLineSymbol.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
Definition at line 1861 of file qgsfillsymbollayerv2.cpp.
References QgsFillSymbolLayerV2::angle(), QgsSymbolLayerV2Utils::createDisplacementElement(), QgsSymbolLayerV2Utils::createGeometryElement(), QgsSymbolLayerV2Utils::createRotationElement(), mColor, mDistance, mFillLineSymbol, mLineAngle, mLineWidth, mOffset, QgsSymbolV2::toSld(), and QgsSymbolLayerV2Utils::wellKnownMarkerToSld().
|
protected |
Definition at line 448 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), setColor(), startRender(), and toSld().
|
protected |
Distance (in mm or map units) between lines.
Definition at line 443 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), startRender(), and toSld().
|
protected |
Definition at line 444 of file qgsfillsymbollayerv2.h.
Referenced by applyPattern(), clone(), outputUnit(), properties(), and setOutputUnit().
|
private |
Fill line.
Definition at line 462 of file qgsfillsymbollayerv2.h.
Referenced by applyPattern(), clone(), setColor(), setLineWidth(), setSubSymbol(), startRender(), subSymbol(), toSld(), and ~QgsLinePatternFillSymbolLayer().
|
protected |
Vector line angle in degrees (0 = horizontal, counterclockwise)
Definition at line 450 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), startRender(), and toSld().
|
protected |
Line width (in mm or map units)
Definition at line 446 of file qgsfillsymbollayerv2.h.
Referenced by applyDataDefinedSettings(), ogrFeatureStyleWidth(), properties(), setLineWidth(), startRender(), and toSld().
|
protected |
Definition at line 447 of file qgsfillsymbollayerv2.h.
Referenced by clone(), outputUnit(), properties(), and setOutputUnit().
|
protected |
Offset perpendicular to line direction.
Definition at line 452 of file qgsfillsymbollayerv2.h.
Referenced by applyPattern(), properties(), and toSld().
|
protected |
Definition at line 453 of file qgsfillsymbollayerv2.h.
Referenced by applyPattern(), clone(), outputUnit(), properties(), and setOutputUnit().