You could possibly un-rotate your touch-point by 30 degrees, and then
just use the rectangle.

However, you can make complex regions by first constructing a Path,
and then calling region.setPath(...), which converts the path into a
region. Below is pseudo sample code:

Path p = new Path();
p.addRect(rect);    // this is your rect
p.transform(matrix); // construct a matrix and then rotate as you wish
region.setPath(p, null);

On Thu, Feb 19, 2009 at 5:01 AM,  <[email protected]> wrote:
>
>   I want to judge whether the touch point(x, y) is in a region or
> not, the region is from a stardard rect by rotating specified degrees,
> from example, rotate 30 degrees. There is a class named Region in
> Android, but as I researched, it just supports standard rect, is there
> any other way to judge whether a point is in an  acclivitous rect? How
> to do it?
>
> Br,
> -David
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to