Skip to content

Commit ca71c92

Browse files
committedOct 11, 2021
Fix geometry generator symbol tests on hidpi displays
1 parent a2e9448 commit ca71c92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎tests/src/python/test_qgsgeometrygeneratorsymbollayer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ def test_no_feature(self):
282282

283283
image = QImage(400, 400, QImage.Format_RGB32)
284284
image.fill(QColor(255, 255, 255))
285+
image.setDotsPerMeterX(int(96 / 25.4 * 1000))
286+
image.setDotsPerMeterY(int(96 / 25.4 * 1000))
285287
painter = QPainter(image)
286288

287289
context = QgsRenderContext.fromQPainter(painter)
@@ -308,6 +310,8 @@ def test_no_feature_coordinate_transform(self):
308310
symbol.changeSymbolLayer(0, buffer_layer)
309311

310312
image = QImage(400, 400, QImage.Format_RGB32)
313+
image.setDotsPerMeterX(int(96 / 25.4 * 1000))
314+
image.setDotsPerMeterY(int(96 / 25.4 * 1000))
311315
image.fill(QColor(255, 255, 255))
312316
painter = QPainter(image)
313317

0 commit comments

Comments
 (0)
Please sign in to comment.