Take pixel ratio into account for text stroke

This commit is contained in:
Andreas Hocevar
2017-10-09 18:45:55 +02:00
parent 9b8232f65b
commit 02e23e3cd0
3 changed files with 9 additions and 3 deletions

View File

@@ -326,7 +326,7 @@ ol.render.canvas.TextReplay.prototype.getImage_ = function(text, fill, stroke) {
context.font = textState.font;
if (stroke) {
context.strokeStyle = strokeState.strokeStyle;
context.lineWidth = strokeState.lineWidth;
context.lineWidth = strokeWidth * pixelRatio;
context.lineCap = strokeState.lineCap;
context.lineJoin = strokeState.lineJoin;
context.miterLimit = strokeState.miterLimit;