开发者

Android: graphics shape.intersects method. Is there an analog in android?

开发者 https://www.devze.com 2023-02-20 15:14 出处:网络
I want to find a way how to do in android such thing(things like I do using java.awt.Shape):开发者_运维问答

I want to find a way how to do in android such thing(things like I do using java.awt.Shape):开发者_运维问答

Shape shape = ...;

shape.intersects(left, top, width, height);
shape.contains(left, top, width, height);

Tried to consider android classes: Path, Shape... but didn't find anything. A little bit confused by all this android stuff.

Could you please, guys help me to find a solution?


Android has the Rect class that has methods to detect intersection.

This might help as well:

How to use the Rect.intersect method.

0

精彩评论

暂无评论...
验证码 换一张
取 消