@@ -721,6 +721,225 @@ protected:
721
721
QgsFillSymbolLayerV2(bool locked = false);
722
722
};
723
723
724
+ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
725
+ {
726
+ %TypeHeaderCode
727
+ #include <qgsfillsymbollayerv2.h>
728
+ %End
729
+ public:
730
+ QgsSimpleFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
731
+ Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
732
+ QColor borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
733
+ Qt::PenStyle borderStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
734
+ double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH );
735
+
736
+ // static stuff
737
+
738
+ static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
739
+ static QgsSymbolLayerV2* createFromSld( QDomElement &element ) /Factory/;
740
+
741
+ // implemented from base classes
742
+
743
+ QString layerType() const;
744
+
745
+ void startRender( QgsSymbolV2RenderContext& context );
746
+
747
+ void stopRender( QgsSymbolV2RenderContext& context );
748
+
749
+ void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
750
+
751
+ QgsStringMap properties() const;
752
+
753
+ QgsSymbolLayerV2* clone() const /Factory/;
754
+
755
+ void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
756
+
757
+ Qt::BrushStyle brushStyle() const;
758
+ void setBrushStyle( Qt::BrushStyle style );
759
+
760
+ QColor borderColor() const;
761
+ void setBorderColor( QColor borderColor );
762
+
763
+ Qt::PenStyle borderStyle() const;
764
+ void setBorderStyle( Qt::PenStyle borderStyle );
765
+
766
+ double borderWidth() const;
767
+ void setBorderWidth( double borderWidth );
768
+
769
+ void setOffset( QPointF offset );
770
+ QPointF offset();
771
+ };
772
+
773
+ /**Base class for polygon renderers generating texture images*/
774
+ class QgsImageFillSymbolLayer: QgsFillSymbolLayerV2
775
+ {
776
+ %TypeHeaderCode
777
+ #include <qgsfillsymbollayerv2.h>
778
+ %End
779
+ public:
780
+ QgsImageFillSymbolLayer();
781
+ virtual ~QgsImageFillSymbolLayer();
782
+ void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
783
+
784
+ virtual QgsSymbolV2* subSymbol();
785
+ virtual bool setSubSymbol( QgsSymbolV2* symbol );
786
+ };
787
+
788
+ /**A class for svg fill patterns. The class automatically scales the pattern to
789
+ the appropriate pixel dimensions of the output device*/
790
+ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
791
+ {
792
+ %TypeHeaderCode
793
+ #include <qgsfillsymbollayerv2.h>
794
+ %End
795
+ public:
796
+ QgsSVGFillSymbolLayer( const QString& svgFilePath = "", double width = 20, double rotation = 0.0 );
797
+ QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, double rotation = 0.0 );
798
+ ~QgsSVGFillSymbolLayer();
799
+
800
+ static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
801
+ static QgsSymbolLayerV2* createFromSld( QDomElement &element ) /Factory/;
802
+
803
+ // implemented from base classes
804
+
805
+ QString layerType() const;
806
+
807
+ void startRender( QgsSymbolV2RenderContext& context );
808
+ void stopRender( QgsSymbolV2RenderContext& context );
809
+
810
+ QgsStringMap properties() const;
811
+
812
+ QgsSymbolLayerV2* clone() const /Factory/;
813
+
814
+ void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
815
+
816
+ //getters and setters
817
+ void setSvgFilePath( const QString& svgPath );
818
+ QString svgFilePath() const;
819
+ void setPatternWidth( double width );
820
+ double patternWidth() const;
821
+
822
+ void setSvgFillColor( const QColor& c );
823
+ QColor svgFillColor() const;
824
+ void setSvgOutlineColor( const QColor& c );
825
+ QColor svgOutlineColor() const;
826
+ void setSvgOutlineWidth( double w );
827
+ double svgOutlineWidth() const;
828
+ };
829
+
830
+ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
831
+ {
832
+ %TypeHeaderCode
833
+ #include <qgsfillsymbollayerv2.h>
834
+ %End
835
+ public:
836
+ QgsLinePatternFillSymbolLayer();
837
+ ~QgsLinePatternFillSymbolLayer();
838
+
839
+ static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
840
+ static QgsSymbolLayerV2* createFromSld( QDomElement &element ) /Factory/;
841
+
842
+ QString layerType() const;
843
+
844
+ void startRender( QgsSymbolV2RenderContext& context );
845
+
846
+ void stopRender( QgsSymbolV2RenderContext& context );
847
+
848
+ QgsStringMap properties() const;
849
+
850
+ QgsSymbolLayerV2* clone() const /Factory/;
851
+
852
+ void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
853
+
854
+ //getters and setters
855
+ void setLineAngle( double a );
856
+ double lineAngle() const;
857
+ void setDistance( double d );
858
+ double distance() const;
859
+ void setLineWidth( double w );
860
+ double lineWidth() const;
861
+ void setColor( const QColor& c );
862
+ QColor color() const;
863
+ void setOffset( double offset );
864
+ double offset() const;
865
+ };
866
+
867
+ class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer
868
+ {
869
+ %TypeHeaderCode
870
+ #include <qgsfillsymbollayerv2.h>
871
+ %End
872
+ public:
873
+ QgsPointPatternFillSymbolLayer();
874
+ ~QgsPointPatternFillSymbolLayer();
875
+
876
+ static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
877
+ static QgsSymbolLayerV2* createFromSld( QDomElement &element ) /Factory/;
878
+
879
+ QString layerType() const;
880
+
881
+ void startRender( QgsSymbolV2RenderContext& context );
882
+
883
+ void stopRender( QgsSymbolV2RenderContext& context );
884
+
885
+ QgsStringMap properties() const;
886
+
887
+ QgsSymbolLayerV2* clone() const /Factory/;
888
+
889
+ void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
890
+
891
+ //getters and setters
892
+ double distanceX() const;
893
+ void setDistanceX( double d );
894
+
895
+ double distanceY() const;
896
+ void setDistanceY( double d );
897
+
898
+ double displacementX() const;
899
+ void setDisplacementX( double d );
900
+
901
+ double displacementY() const;
902
+ void setDisplacementY( double d );
903
+
904
+ bool setSubSymbol( QgsSymbolV2* symbol );
905
+ virtual QgsSymbolV2* subSymbol();
906
+ };
907
+
908
+ class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2
909
+ {
910
+ %TypeHeaderCode
911
+ #include <qgsfillsymbollayerv2.h>
912
+ %End
913
+ public:
914
+ QgsCentroidFillSymbolLayerV2();
915
+ ~QgsCentroidFillSymbolLayerV2();
916
+
917
+ // static stuff
918
+
919
+ static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
920
+ static QgsSymbolLayerV2* createFromSld( QDomElement &element ) /Factory/;
921
+
922
+ // implemented from base classes
923
+
924
+ QString layerType() const;
925
+
926
+ void startRender( QgsSymbolV2RenderContext& context );
927
+
928
+ void stopRender( QgsSymbolV2RenderContext& context );
929
+
930
+ void renderPolygon( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
931
+
932
+ QgsStringMap properties() const;
933
+
934
+ QgsSymbolLayerV2* clone() const /Factory/;
935
+
936
+ void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
937
+
938
+ void setColor( const QColor& color );
939
+
940
+ QgsSymbolV2* subSymbol();
941
+ bool setSubSymbol( QgsSymbolV2* symbol );
942
+ };
724
943
725
944
///////////////
726
945
0 commit comments