Use BrokenDiagonalRendering with contextOptions

Apply the BrokenDiagonalRendering processing if opt_contextOptions is set to avoid color distortion along reprojection edges
This commit is contained in:
mike-000
2020-04-30 13:04:30 +01:00
committed by GitHub
parent 8a303dc28a
commit 3643f9ec98

View File

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