Merge pull request #7339 from ahocevar/text-stroke

Use correct text stroke on HiDPI devices
This commit is contained in:
Andreas Hocevar
2017-10-10 07:40:29 +02:00
committed by GitHub
4 changed files with 17 additions and 11 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;