QGIS API Documentation
2.8.2-Wien
|
A class for filling symbols with a repeated raster image. More...
#include <qgsfillsymbollayerv2.h>
Public Types | |
enum | FillCoordinateMode { Feature, Viewport } |
Public Member Functions | |
QgsRasterFillSymbolLayer (const QString &imageFilePath=QString()) | |
~QgsRasterFillSymbolLayer () | |
double | alpha () const |
The opacity for the raster image used in the fill. | |
QgsSymbolLayerV2 * | clone () const override |
FillCoordinateMode | coordinateMode () const |
Coordinate mode for fill. | |
virtual double | estimateMaxBleed () const override |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. | |
QString | imageFilePath () const |
The path to the raster image used for the fill. | |
QString | layerType () const override |
QPointF | offset () const |
Returns the offset for the fill. | |
const QgsMapUnitScale & | offsetMapUnitScale () const |
Returns the map unit scale for the fill's offset. | |
QgsSymbolV2::OutputUnit | offsetUnit () const |
Returns the units for the fill's offset. | |
QgsStringMap | properties () const override |
void | renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) override |
void | setAlpha (const double alpha) |
Sets the opacity for the raster image used in the fill. | |
void | setCoordinateMode (const FillCoordinateMode mode) |
Set the coordinate mode for fill. | |
void | setImageFilePath (const QString &imagePath) |
Sets the path to the raster image used for the fill. | |
void | setOffset (const QPointF &offset) |
Sets the offset for the fill. | |
void | setOffsetMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the fill's offset. | |
void | setOffsetUnit (const QgsSymbolV2::OutputUnit unit) |
Sets the units for the fill's offset. | |
virtual bool | setSubSymbol (QgsSymbolV2 *symbol) override |
void | setWidth (const double width) |
Sets the width for scaling the image used in the fill. | |
void | setWidthMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale for the image's width. | |
void | setWidthUnit (const QgsSymbolV2::OutputUnit unit) |
Sets the units for the image's width. | |
void | startRender (QgsSymbolV2RenderContext &context) override |
void | stopRender (QgsSymbolV2RenderContext &context) override |
virtual QgsSymbolV2 * | subSymbol () override |
double | width () const |
Returns the width used for scaling the image used in the fill. | |
const QgsMapUnitScale & | widthMapUnitScale () const |
Returns the map unit scale for the image's width. | |
QgsSymbolV2::OutputUnit | widthUnit () const |
Returns the units for the image's width. | |
Public Member Functions inherited from QgsImageFillSymbolLayer | |
QgsImageFillSymbolLayer () | |
virtual | ~QgsImageFillSymbolLayer () |
virtual QColor | dxfColor (const QgsSymbolV2RenderContext &context) const override |
virtual Qt::PenStyle | dxfPenStyle () const override |
virtual double | dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const override |
QgsMapUnitScale | mapUnitScale () const override |
const QgsMapUnitScale & | outlineWidthMapUnitScale () const |
QgsSymbolV2::OutputUnit | outlineWidthUnit () const |
QgsSymbolV2::OutputUnit | outputUnit () const override |
void | setMapUnitScale (const QgsMapUnitScale &scale) override |
void | setOutlineWidthMapUnitScale (const QgsMapUnitScale &scale) |
void | setOutlineWidthUnit (QgsSymbolV2::OutputUnit unit) |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) override |
Public Member Functions inherited from QgsFillSymbolLayerV2 | |
double | angle () const |
void | drawPreviewIcon (QgsSymbolV2RenderContext &context, QSize size) override |
void | setAngle (double angle) |
Public Member Functions inherited from QgsSymbolLayerV2 | |
virtual | ~QgsSymbolLayerV2 () |
virtual QColor | color () const |
virtual const QgsExpression * | dataDefinedProperty (const QString &property) const |
virtual QString | dataDefinedPropertyString (const QString &property) const |
virtual QColor | dxfBrushColor (const QgsSymbolV2RenderContext &context) const |
virtual Qt::BrushStyle | dxfBrushStyle () const |
virtual QVector< qreal > | dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const |
virtual double | dxfOffset (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const |
virtual QColor | fillColor () const |
Get fill color. | |
bool | hasDataDefinedProperties () const |
bool | isLocked () const |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
virtual QColor | outlineColor () const |
Get outline color. | |
virtual void | removeDataDefinedProperties () |
virtual void | removeDataDefinedProperty (const QString &property) |
int | renderingPass () const |
virtual void | setColor (const QColor &color) |
virtual void | setDataDefinedProperty (const QString &property, const QString &expressionString) |
virtual void | setFillColor (const QColor &color) |
Set fill color. | |
void | setLocked (bool locked) |
virtual void | setOutlineColor (const QColor &color) |
Set outline color. | |
void | setRenderingPass (int renderingPass) |
virtual void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
QgsSymbolV2::SymbolType | type () const |
virtual QSet< QString > | usedAttributes () 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 |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
Protected Member Functions | |
void | applyDataDefinedSettings (const QgsSymbolV2RenderContext &context) override |
Protected Attributes | |
double | mAlpha |
FillCoordinateMode | mCoordinateMode |
QString | mImageFilePath |
Path to the image file. | |
QPointF | mOffset |
QgsMapUnitScale | mOffsetMapUnitScale |
QgsSymbolV2::OutputUnit | mOffsetUnit |
double | mWidth |
QgsMapUnitScale | mWidthMapUnitScale |
QgsSymbolV2::OutputUnit | mWidthUnit |
Protected Attributes inherited from QgsImageFillSymbolLayer | |
QBrush | mBrush |
double | mNextAngle |
QgsLineSymbolV2 * | mOutline |
Custom outline. | |
double | mOutlineWidth |
Outline width. | |
QgsMapUnitScale | mOutlineWidthMapUnitScale |
QgsSymbolV2::OutputUnit | mOutlineWidthUnit |
Protected Attributes inherited from QgsFillSymbolLayerV2 | |
double | mAngle |
Protected Attributes inherited from QgsSymbolLayerV2 | |
QColor | mColor |
QMap< QString, QgsExpression * > | mDataDefinedProperties |
bool | mLocked |
int | mRenderingPass |
QgsSymbolV2::SymbolType | mType |
Additional Inherited Members | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
static const bool | selectionIsOpaque = true |
A class for filling symbols with a repeated raster image.
Definition at line 594 of file qgsfillsymbollayerv2.h.
Definition at line 598 of file qgsfillsymbollayerv2.h.
QgsRasterFillSymbolLayer::QgsRasterFillSymbolLayer | ( | const QString & | imageFilePath = QString() | ) |
Definition at line 3518 of file qgsfillsymbollayerv2.cpp.
QgsRasterFillSymbolLayer::~QgsRasterFillSymbolLayer | ( | ) |
Definition at line 3530 of file qgsfillsymbollayerv2.cpp.
|
inline |
The opacity for the raster image used in the fill.
Definition at line 655 of file qgsfillsymbollayerv2.h.
|
overrideprotectedvirtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 3716 of file qgsfillsymbollayerv2.cpp.
|
overridevirtual |
Implements QgsSymbolLayerV2.
Definition at line 3680 of file qgsfillsymbollayerv2.cpp.
|
inline |
Coordinate mode for fill.
Controls how the top left corner of the image fill is positioned relative to the feature.
Definition at line 644 of file qgsfillsymbollayerv2.h.
|
static |
Definition at line 3535 of file qgsfillsymbollayerv2.cpp.
|
overridevirtual |
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 3696 of file qgsfillsymbollayerv2.cpp.
|
inline |
The path to the raster image used for the fill.
Definition at line 631 of file qgsfillsymbollayerv2.h.
|
overridevirtual |
Implements QgsSymbolLayerV2.
Definition at line 3617 of file qgsfillsymbollayerv2.cpp.
|
inline |
Returns the offset for the fill.
Definition at line 670 of file qgsfillsymbollayerv2.h.
|
inline |
Returns the map unit scale for the fill's offset.
Definition at line 700 of file qgsfillsymbollayerv2.h.
|
inline |
Returns the units for the fill's offset.
Definition at line 685 of file qgsfillsymbollayerv2.h.
|
overridevirtual |
Implements QgsSymbolLayerV2.
Definition at line 3662 of file qgsfillsymbollayerv2.cpp.
|
overridevirtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 3622 of file qgsfillsymbollayerv2.cpp.
void QgsRasterFillSymbolLayer::setAlpha | ( | const double | alpha | ) |
Sets the opacity for the raster image used in the fill.
alpha | opacity value between 0 (fully transparent) and 1 (fully opaque) |
Definition at line 3711 of file qgsfillsymbollayerv2.cpp.
void QgsRasterFillSymbolLayer::setCoordinateMode | ( | const FillCoordinateMode | mode | ) |
Set the coordinate mode for fill.
Controls how the top left corner of the image fill is positioned relative to the feature.
mode | coordinate mode |
Definition at line 3706 of file qgsfillsymbollayerv2.cpp.
void QgsRasterFillSymbolLayer::setImageFilePath | ( | const QString & | imagePath | ) |
Sets the path to the raster image used for the fill.
imagePath | path to image file |
Definition at line 3701 of file qgsfillsymbollayerv2.cpp.
|
inline |
Sets the offset for the fill.
offset | offset for fill |
Definition at line 663 of file qgsfillsymbollayerv2.h.
|
inline |
Sets the map unit scale for the fill's offset.
scale | map unit scale for offset |
Definition at line 693 of file qgsfillsymbollayerv2.h.
|
inline |
Sets the units for the fill's offset.
unit | units for offset |
Definition at line 678 of file qgsfillsymbollayerv2.h.
|
overridevirtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 3611 of file qgsfillsymbollayerv2.cpp.
|
inline |
Sets the width for scaling the image used in the fill.
The image's height will also be scaled to maintain the image's aspect ratio.
width | width for scaling the image |
Definition at line 709 of file qgsfillsymbollayerv2.h.
|
inline |
Sets the map unit scale for the image's width.
scale | map unit scale for width |
Definition at line 740 of file qgsfillsymbollayerv2.h.
|
inline |
Sets the units for the image's width.
unit | units for width |
Definition at line 725 of file qgsfillsymbollayerv2.h.
|
overridevirtual |
Implements QgsSymbolLayerV2.
Definition at line 3651 of file qgsfillsymbollayerv2.cpp.
|
overridevirtual |
Implements QgsSymbolLayerV2.
Definition at line 3657 of file qgsfillsymbollayerv2.cpp.
|
inlineoverridevirtual |
Reimplemented from QgsImageFillSymbolLayer.
Definition at line 619 of file qgsfillsymbollayerv2.h.
|
inline |
Returns the width used for scaling the image used in the fill.
The image's height is scaled to maintain the image's aspect ratio.
Definition at line 717 of file qgsfillsymbollayerv2.h.
|
inline |
Returns the map unit scale for the image's width.
Definition at line 747 of file qgsfillsymbollayerv2.h.
|
inline |
Returns the units for the image's width.
Definition at line 732 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 754 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 753 of file qgsfillsymbollayerv2.h.
|
protected |
Path to the image file.
Definition at line 752 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 756 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 758 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 757 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 760 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 762 of file qgsfillsymbollayerv2.h.
|
protected |
Definition at line 761 of file qgsfillsymbollayerv2.h.