@@ -55,6 +55,8 @@ def tearDown(self):
55
55
def testTextAnnotation (self ):
56
56
""" test rendering a text annotation"""
57
57
a = QgsTextAnnotation ()
58
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
59
+ a .markerSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
58
60
a .setFrameSize (QSizeF (300 , 200 ))
59
61
a .setFrameOffsetFromReferencePoint (QPointF (40 , 50 ))
60
62
doc = QTextDocument ()
@@ -71,6 +73,8 @@ def testTextAnnotation(self):
71
73
def testSvgAnnotation (self ):
72
74
""" test rendering a svg annotation"""
73
75
a = QgsSvgAnnotation ()
76
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
77
+ a .markerSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
74
78
a .setFrameSize (QSizeF (300 , 200 ))
75
79
a .setFrameOffsetFromReferencePoint (QPointF (40 , 50 ))
76
80
svg = TEST_DATA_DIR + "/sample_svg.svg"
@@ -86,6 +90,8 @@ def testSvgAnnotation(self):
86
90
def testHtmlAnnotation (self ):
87
91
""" test rendering a html annotation"""
88
92
a = QgsHtmlAnnotation ()
93
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
94
+ a .markerSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
89
95
a .setFrameSize (QSizeF (400 , 250 ))
90
96
a .setFrameOffsetFromReferencePoint (QPointF (70 , 90 ))
91
97
html = TEST_DATA_DIR + "/test_html.html"
@@ -104,6 +110,8 @@ def testHtmlAnnotationWithFeature(self):
104
110
'test' , "memory" )
105
111
106
112
a = QgsHtmlAnnotation ()
113
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
114
+ a .markerSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
107
115
a .setFrameSize (QSizeF (400 , 250 ))
108
116
a .setFrameOffsetFromReferencePoint (QPointF (70 , 90 ))
109
117
a .setMapLayer (layer )
@@ -121,6 +129,7 @@ def testHtmlAnnotationWithFeature(self):
121
129
def testRelativePosition (self ):
122
130
""" test rendering an annotation without map point"""
123
131
a = QgsHtmlAnnotation ()
132
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
124
133
a .setFrameSize (QSizeF (400 , 250 ))
125
134
a .setHasFixedMapPosition (False )
126
135
html = TEST_DATA_DIR + "/test_html.html"
@@ -131,6 +140,7 @@ def testRelativePosition(self):
131
140
def testMargins (self ):
132
141
""" test rendering an annotation with margins"""
133
142
a = QgsHtmlAnnotation ()
143
+ a .fillSymbol ().symbolLayer (0 ).setStrokeColor (QColor (0 , 0 , 0 ))
134
144
a .setFrameSize (QSizeF (400 , 250 ))
135
145
a .setHasFixedMapPosition (False )
136
146
a .setContentsMargin (QgsMargins (15 , 10 , 30 , 20 ))
@@ -144,7 +154,7 @@ def testFillSymbol(self):
144
154
a = QgsTextAnnotation ()
145
155
a .setFrameSize (QSizeF (400 , 250 ))
146
156
a .setHasFixedMapPosition (False )
147
- a .setFillSymbol (QgsFillSymbol .createSimple ({'color' : 'blue' , 'width_border' : '5' }))
157
+ a .setFillSymbol (QgsFillSymbol .createSimple ({'color' : 'blue' , 'width_border' : '5' , 'outline_color' : 'black' }))
148
158
im = self .renderAnnotation (a , QPointF (20 , 30 ))
149
159
self .assertTrue (self .imageCheck ('annotation_fillstyle' , 'annotation_fillstyle' , im ))
150
160
0 commit comments