MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / resizePath

Function resizePath

libs/echarts/echarts-en.simple.js:17027–17037  ·  view source on GitHub ↗

* Resize a path to fit the rect * @param {module:zrender/graphic/Path} path * @param {Object} rect

(path, rect)

Source from the content-addressed store, hash-verified

17025 * @param {Object} rect
17026 */
17027function resizePath(path, rect) {
17028 if (!path.applyTransform) {
17029 return;
17030 }
17031
17032 var pathRect = path.getBoundingRect();
17033
17034 var m = pathRect.calculateTransform(rect);
17035
17036 path.applyTransform(m);
17037}
17038
17039/**
17040 * Sub pixel optimize line for canvas

Callers 1

makePathFunction · 0.70

Calls 1

applyTransformMethod · 0.80

Tested by

no test coverage detected