QGIS API Documentation
2.6.0-Brighton
|
#include <qgsfillsymbollayerv2.h>
Public Types | |
enum | ShapeburstColorType { SimpleTwoColor, ColorRamp } |
Public Member Functions | |
QgsShapeburstFillSymbolLayerV2 (QColor color=DEFAULT_SIMPLEFILL_COLOR, QColor color2=Qt::white, ShapeburstColorType colorType=SimpleTwoColor, int blurRadius=0, bool useWholeShape=true, double maxDistance=5) | |
virtual | ~QgsShapeburstFillSymbolLayerV2 () |
QString | layerType () const |
void | startRender (QgsSymbolV2RenderContext &context) |
void | stopRender (QgsSymbolV2RenderContext &context) |
void | renderPolygon (const QPolygonF &points, QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
QgsStringMap | properties () const |
QgsSymbolLayerV2 * | clone () const |
double | estimateMaxBleed () const |
Returns the estimated maximum distance which the layer style will bleed outside the drawn shape. | |
void | setBlurRadius (int blurRadius) |
Sets the blur radius, which controls the amount of blurring applied to the fill. | |
int | blurRadius () const |
Returns the blur radius, which controls the amount of blurring applied to the fill. | |
void | setUseWholeShape (double useWholeShape) |
Sets whether the shapeburst fill should be drawn using the entire shape. | |
double | useWholeShape () const |
Returns whether the shapeburst fill is set to cover the entire shape. | |
void | setMaxDistance (double maxDistance) |
Sets the maximum distance to shape inside of the shape from the polygon's boundary. | |
double | maxDistance () const |
Returns the maximum distance from the shape's boundary which is shaded. | |
void | setDistanceUnit (QgsSymbolV2::OutputUnit unit) |
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary. | |
QgsSymbolV2::OutputUnit | distanceUnit () const |
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary. | |
void | setDistanceMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | distanceMapUnitScale () const |
void | setColorType (ShapeburstColorType colorType) |
Sets the color mode to use for the shapeburst fill. | |
ShapeburstColorType | colorType () const |
Returns the color mode used for the shapeburst fill. | |
void | setColorRamp (QgsVectorColorRampV2 *ramp) |
Sets the color ramp used to draw the shapeburst fill. | |
QgsVectorColorRampV2 * | colorRamp () |
Returns the color ramp used for the shapeburst fill. | |
void | setColor2 (QColor color2) |
Sets the color for the endpoint of the shapeburst fill. | |
QColor | color2 () const |
Returns the color used for the endpoint of the shapeburst fill. | |
void | setIgnoreRings (double ignoreRings) |
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading. | |
double | ignoreRings () const |
Returns whether the shapeburst fill is set to ignore polygon interior rings. | |
void | setOffset (QPointF offset) |
Sets the offset for the shapeburst fill. | |
QPointF | offset () const |
Returns the offset for the shapeburst fill. | |
void | setOffsetUnit (QgsSymbolV2::OutputUnit unit) |
Sets the units used for the offset for the shapeburst fill. | |
QgsSymbolV2::OutputUnit | offsetUnit () const |
Returns the units used for the offset of the shapeburst fill. | |
void | setOffsetMapUnitScale (const QgsMapUnitScale &scale) |
const QgsMapUnitScale & | offsetMapUnitScale () const |
void | setOutputUnit (QgsSymbolV2::OutputUnit unit) |
QgsSymbolV2::OutputUnit | outputUnit () const |
void | setMapUnitScale (const QgsMapUnitScale &scale) |
QgsMapUnitScale | mapUnitScale () 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 void | toSld (QDomDocument &doc, QDomElement &element, QgsStringMap props) const |
virtual QString | ogrFeatureStyle (double mmScaleFactor, double mapUnitScaleFactor) const |
virtual QgsSymbolV2 * | subSymbol () |
virtual bool | setSubSymbol (QgsSymbolV2 *symbol) |
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 double | dxfWidth (const QgsDxfExport &e, const QgsSymbolV2RenderContext &context) const |
virtual QColor | dxfColor (const QgsSymbolV2RenderContext &context) const |
virtual QVector< qreal > | dxfCustomDashPattern (QgsSymbolV2::OutputUnit &unit) const |
virtual Qt::PenStyle | dxfPenStyle () const |
virtual QColor | dxfBrushColor (const QgsSymbolV2RenderContext &context) const |
virtual Qt::BrushStyle | dxfBrushStyle () const |
Static Public Member Functions | |
static QgsSymbolLayerV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
Protected Attributes | |
QBrush | mBrush |
QBrush | mSelBrush |
int | mBlurRadius |
bool | mUseWholeShape |
double | mMaxDistance |
QgsSymbolV2::OutputUnit | mDistanceUnit |
QgsMapUnitScale | mDistanceMapUnitScale |
ShapeburstColorType | mColorType |
QColor | mColor2 |
QgsVectorColorRampV2 * | mGradientRamp |
QgsVectorColorRampV2 * | mTwoColorGradientRamp |
bool | mIgnoreRings |
QPointF | mOffset |
QgsSymbolV2::OutputUnit | mOffsetUnit |
QgsMapUnitScale | mOffsetMapUnitScale |
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 | |
Protected Member Functions inherited from QgsFillSymbolLayerV2 | |
QgsFillSymbolLayerV2 (bool locked=false) | |
void | _renderPolygon (QPainter *p, const QPolygonF &points, const QList< QPolygonF > *rings, QgsSymbolV2RenderContext &context) |
Default method to render polygon. | |
Static Protected Attributes inherited from QgsSymbolLayerV2 | |
static const bool | selectionIsOpaque = true |
static const bool | selectFillBorder = false |
static const bool | selectFillStyle = false |
QgsShapeburstFillSymbolLayerV2::QgsShapeburstFillSymbolLayerV2 | ( | QColor | color = DEFAULT_SIMPLEFILL_COLOR , |
QColor | color2 = Qt::white , |
||
ShapeburstColorType | colorType = SimpleTwoColor , |
||
int | blurRadius = 0 , |
||
bool | useWholeShape = true , |
||
double | maxDistance = 5 |
||
) |
|
virtual |
|
inline |
Returns the blur radius, which controls the amount of blurring applied to the fill.
|
virtual |
Implements QgsSymbolLayerV2.
|
inline |
|
inline |
Returns the color ramp used for the shapeburst fill.
The color ramp is only used if the colorType is set to ShapeburstColorType::ColorRamp
|
inline |
Returns the color mode used for the shapeburst fill.
Shapeburst can either be drawn using a QgsVectorColorRampV2 color ramp or by simply specificing a start and end color.
|
static |
|
inline |
|
inline |
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
|
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 QgsSymbolLayerV2.
|
inline |
Returns whether the shapeburst fill is set to ignore polygon interior rings.
|
virtual |
Implements QgsSymbolLayerV2.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
|
inline |
Returns the maximum distance from the shape's boundary which is shaded.
This parameter is only effective if useWholeShape is false.
|
inline |
Returns the offset for the shapeburst fill.
|
inline |
|
inline |
Returns the units used for the offset of the shapeburst fill.
|
virtual |
Reimplemented from QgsSymbolLayerV2.
|
virtual |
Implements QgsSymbolLayerV2.
|
virtual |
Implements QgsFillSymbolLayerV2.
|
inline |
Sets the blur radius, which controls the amount of blurring applied to the fill.
blurRadius | Radius for fill blur. Values between 0 - 17 are valid, where higher values results in a stronger blur. Set to 0 to disable blur. |
|
inline |
Sets the color for the endpoint of the shapeburst fill.
This color is only used if setColorType is set ShapeburstColorType::SimpleTwoColor.
color2 | QColor to use for endpoint of gradient |
void QgsShapeburstFillSymbolLayerV2::setColorRamp | ( | QgsVectorColorRampV2 * | ramp | ) |
Sets the color ramp used to draw the shapeburst fill.
Color ramps are only used if setColorType is set ShapeburstColorType::ColorRamp.
ramp | color ramp to use for shapeburst fill |
|
inline |
Sets the color mode to use for the shapeburst fill.
Shapeburst can either be drawn using a QgsVectorColorRampV2 color ramp or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.
colorType | color type to use for shapeburst fill |
|
inline |
|
inline |
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
unit | distance unit for the maximum distance |
|
inline |
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
ignoreRings | Set to true if buffers should ignore interior rings for polygons. |
|
virtual |
Reimplemented from QgsSymbolLayerV2.
|
inline |
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
maxDistance | distance from boundary to shade. setUseWholeShape must be set to false for this parameter to take effect. Distance unit is controlled by setDistanceUnit. |
|
inline |
Sets the offset for the shapeburst fill.
offset | QPointF indicating the horizontal/vertical offset amount |
|
inline |
|
inline |
Sets the units used for the offset for the shapeburst fill.
unit | units for fill offset |
|
virtual |
Reimplemented from QgsSymbolLayerV2.
|
inline |
Sets whether the shapeburst fill should be drawn using the entire shape.
useWholeShape | Set to true if shapeburst should cover entire shape. If false, setMaxDistance is used to calculate how far from the boundary of the shape should be shaded |
|
virtual |
Implements QgsSymbolLayerV2.
|
virtual |
Implements QgsSymbolLayerV2.
|
inline |
Returns whether the shapeburst fill is set to cover the entire shape.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |