Use integers when positioning on the target canvas
This avoids blurred images after view center changes (dx, dy) and at fractional zoom levels (dw, dh).
This commit is contained in:
@@ -143,7 +143,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
|
||||
var dw = image.width * goog.vec.Mat4.getElement(transform, 0, 0);
|
||||
var dh = image.height * goog.vec.Mat4.getElement(transform, 1, 1);
|
||||
context.drawImage(image, 0, 0, image.width, image.height,
|
||||
dx, dy, dw, dh);
|
||||
Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));
|
||||
} else {
|
||||
context.setTransform(
|
||||
goog.vec.Mat4.getElement(transform, 0, 0),
|
||||
|
||||
Reference in New Issue
Block a user