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

Method containsPixel

src/common/commontypes/Bounds.js:413–415  ·  view source on GitHub ↗

* @function Bounds.prototype.containsPixel * @description 判断传入的像素是否在范围内。直接匹配大小,不涉及像素和地理转换。 * @example * var bounds = new Bounds(-50,-50,40,40); * //isContains = true * var isContains = bounds.containsPixel(new Pixel(40,40),true); * @param {Pixel} px - 提供的像素参数。 * @p

(px, inclusive)

Source from the content-addressed store, hash-verified

411 * @returns {boolean} 传入的 pixel 在当前边界范围之内。
412 */
413 containsPixel(px, inclusive) {
414 return this.contains(px.x, px.y, inclusive);
415 }
416
417 /**
418 * @function Bounds.prototype.contains

Callers 1

BoundsSpec.jsFile · 0.80

Calls 1

containsMethod · 0.95

Tested by

no test coverage detected