@cxm-2016
2017-02-04T22:29:38.000000Z
字数 293
阅读 3254
Android
val bounds = RectF()
path.computeBounds(bounds,true)
val region = Region()
region.setPath(path,Region(bounds.left.toInt
(),bounds.top.toInt(),bounds.right.toInt
(),bounds.bottom.toInt()))
if(region.contains(x,y)){
// to do some thing
}
Region 表示一个范围,它由一个或多个矩形组成。