@antv/g-canvas
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -108,7 +108,10 @@ import { __extends } from "tslib"; | ||
region = getMergedRegion(elements); | ||
// 附加 0.5 像素,会解决1px 变成 2px 的问题,无论 pixelRatio 的值是多少 | ||
// 真实测试的环境下,发现在 1-2 之间时会出现 >2 和 <1 的情况下未出现,但是为了安全,统一附加 0.5 | ||
var appendPixel = 0.5; | ||
if (region) { | ||
region.minX = Math.floor(region.minX); | ||
region.minY = Math.floor(region.minY); | ||
region.maxX = Math.ceil(region.maxX); | ||
region.maxY = Math.ceil(region.maxY); | ||
region.minX = Math.floor(region.minX - appendPixel); | ||
region.minY = Math.floor(region.minY - appendPixel); | ||
region.maxX = Math.ceil(region.maxX + appendPixel); | ||
region.maxY = Math.ceil(region.maxY + appendPixel); | ||
} | ||
@@ -115,0 +118,0 @@ } |
@@ -110,7 +110,10 @@ "use strict"; | ||
region = draw_1.getMergedRegion(elements); | ||
// 附加 0.5 像素,会解决1px 变成 2px 的问题,无论 pixelRatio 的值是多少 | ||
// 真实测试的环境下,发现在 1-2 之间时会出现 >2 和 <1 的情况下未出现,但是为了安全,统一附加 0.5 | ||
var appendPixel = 0.5; | ||
if (region) { | ||
region.minX = Math.floor(region.minX); | ||
region.minY = Math.floor(region.minY); | ||
region.maxX = Math.ceil(region.maxX); | ||
region.maxY = Math.ceil(region.maxY); | ||
region.minX = Math.floor(region.minX - appendPixel); | ||
region.minY = Math.floor(region.minY - appendPixel); | ||
region.maxX = Math.ceil(region.maxX + appendPixel); | ||
region.maxY = Math.ceil(region.maxY + appendPixel); | ||
} | ||
@@ -117,0 +120,0 @@ } |
{ | ||
"name": "@antv/g-canvas", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "A canvas library which providing 2d", | ||
@@ -61,7 +61,7 @@ "main": "lib/index.js", | ||
"@antv/gl-matrix": "~2.7.1", | ||
"@antv/path-util": "~2.0.3-beta.1", | ||
"@antv/path-util": "~2.0.5", | ||
"@antv/util": "~2.0.0" | ||
}, | ||
"__npminstall_done": false, | ||
"gitHead": "95487b1e5ded41f5db351a622adf12659f564d8b" | ||
"gitHead": "418a25b95749908307ab6610d8a67a72d573e55c" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1367598
7194
Updated@antv/path-util@~2.0.5