16 #ifndef QGSFILLSYMBOLLAYERV2_H
17 #define QGSFILLSYMBOLLAYERV2_H
21 #define DEFAULT_SIMPLEFILL_COLOR QColor(0,0,255)
22 #define DEFAULT_SIMPLEFILL_STYLE Qt::SolidPattern
23 #define DEFAULT_SIMPLEFILL_BORDERCOLOR QColor(0,0,0)
24 #define DEFAULT_SIMPLEFILL_BORDERSTYLE Qt::SolidLine
25 #define DEFAULT_SIMPLEFILL_BORDERWIDTH DEFAULT_LINE_WIDTH
26 #define DEFAULT_SIMPLEFILL_JOINSTYLE Qt::BevelJoin
63 void toSld( QDomDocument &doc, QDomElement &element,
QgsStringMap props )
const override;
65 QString
ogrFeatureStyle(
double mmScaleFactor,
double mapUnitScaleFactor )
const override;
67 Qt::BrushStyle
brushStyle()
const {
return mBrushStyle; }
88 void setBorderStyle( Qt::PenStyle borderStyle ) { mBorderStyle = borderStyle; }
96 void setOffset( QPointF offset ) { mOffset = offset; }
180 QColor color2 = Qt::white,
181 GradientColorType gradientColorType = SimpleTwoColor,
182 GradientType gradientType = Linear,
183 GradientCoordinateMode coordinateMode = Feature,
184 GradientSpread gradientSpread = Pad
222 QColor
color2()
const {
return mColor2; }
251 QPointF
offset()
const {
return mOffset; }
292 void applyGradient(
const QgsSymbolV2RenderContext& context, QBrush& brush,
const QColor& color,
const QColor& color2,
295 const QPointF &referencePoint1,
const QPointF &referencePoint2,
const double angle );
298 QPointF rotateReferencePoint(
const QPointF & refPoint,
double angle );
312 ShapeburstColorType colorType = SimpleTwoColor,
313 int blurRadius = 0,
bool useWholeShape =
true,
double maxDistance = 5 );
450 QColor
color2()
const {
return mColor2; }
479 QPointF
offset()
const {
return mOffset; }
530 void applyDataDefinedSymbology(
QgsSymbolV2RenderContext& context, QColor& color, QColor& color2,
int& blurRadius,
bool& useWholeShape,
531 double& maxDistance,
bool &ignoreRings );
534 void distanceTransform1d(
double *f,
int n,
int *v,
double *z,
double *d );
536 void distanceTransform2d(
double * im,
int width,
int height );
538 double * distanceTransform( QImage * im );
541 void dtArrayToQImage(
double * array, QImage *im,
QgsVectorColorRampV2* ramp,
double layerAlpha = 1,
bool useWholeShape =
true,
int maxPixelDistance = 0 );
626 void setImageFilePath(
const QString& imagePath );
638 void setCoordinateMode(
const FillCoordinateMode mode );
650 void setAlpha(
const double alpha );
655 double alpha()
const {
return mAlpha; }
663 void setOffset(
const QPointF& offset ) { mOffset = offset; }
670 QPointF
offset()
const {
return mOffset; }
709 void setWidth(
const double width ) { mWidth = width; }
717 double width()
const {
return mWidth; }
769 void applyPattern( QBrush& brush,
const QString& imageFilePath,
const double width,
const double alpha,
796 void toSld( QDomDocument &doc, QDomElement &element,
QgsStringMap props )
const override;
799 void setSvgFilePath(
const QString& svgPath );
857 void setDefaultSvgParams();
860 void applyPattern( QBrush& brush,
const QString& svgFilePath,
double patternWidth,
QgsSymbolV2::OutputUnit patternWidthUnit,
const QColor& svgFillColor,
const QColor& svgOutlineColor,
883 void toSld( QDomDocument &doc, QDomElement &element,
QgsStringMap props )
const override;
894 void setLineWidth(
double w );
896 void setColor(
const QColor& c )
override;
899 double offset()
const {
return mOffset; }
949 void applyPattern(
const QgsSymbolV2RenderContext& context, QBrush& brush,
double lineAngle,
double distance,
double lineWidth,
const QColor& color );
974 void toSld( QDomDocument &doc, QDomElement &element,
QgsStringMap props )
const override;
1045 double displacementX,
double displacementY );
1073 void toSld( QDomDocument &doc, QDomElement &element,
QgsStringMap props )
const override;
1075 void setColor(
const QColor& color )
override;