RectF rectF = new RectF(); p.computeBounds(rectF, true); Region region = new Region(); region.setPath(p, new Region((int) rectF.left, (int) rectF.top, (int) rectF.right, (int) rectF.bottom)); if (region.contains(point.x, point.y)) { //TODO }
点击区域是否在某个范围内
最新推荐文章于 2022-06-30 16:46:00 发布