Merge pull request #10987 from mike-000/patch-3

Use brokenDiagonalRendering reprojection processing if image smoothing is disabled
This commit is contained in:
Andreas Hocevar
2020-05-03 16:30:13 +02:00
committed by GitHub

View File

@@ -1,6 +1,7 @@
/** /**
* @module ol/reproj * @module ol/reproj
*/ */
import {IMAGE_SMOOTHING_DISABLED} from './source/common.js';
import {assign} from './obj.js'; import {assign} from './obj.js';
import { import {
containsCoordinate, containsCoordinate,
@@ -330,7 +331,10 @@ export function render(
context.save(); context.save();
context.beginPath(); context.beginPath();
if (isBrokenDiagonalRendering()) { if (
isBrokenDiagonalRendering() ||
opt_contextOptions === IMAGE_SMOOTHING_DISABLED
) {
// Make sure that everything is on pixel boundaries // Make sure that everything is on pixel boundaries
const u0r = pixelRound(u0); const u0r = pixelRound(u0);
const v0r = pixelRound(v0); const v0r = pixelRound(v0);