Home | History | Annotate | Download | only in graphics

Lines Matching full:region

23 public class Region implements Parcelable {
27 private static final SynchronizedPool<Region> sPool =
28 new SynchronizedPool<Region>(MAX_POOL_SIZE);
54 /** Create an empty region
56 public Region() {
60 /** Return a copy of the specified region
62 public Region(Region region) {
64 nativeSetRegion(mNativeRegion, region.mNativeRegion);
67 /** Return a region set to the specified rectangle
69 public Region(Rect r) {
74 /** Return a region set to the specified rectangle
76 public Region(int left, int top, int right, int bottom) {
81 /** Set the region to the empty region
87 /** Set the region to the specified region.
89 public boolean set(Region region) {
90 nativeSetRegion(mNativeRegion, region.mNativeRegion);
94 /** Set the region to the specified rectangle
100 /** Set the region to the specified rectangle
107 * Set the region to the area described by the path and clip.
108 * Return true if the resulting region is non-empty. This produces a region
112 public boolean setPath(Path path, Region clip) {
117 * Return true if this region is empty
122 * Return true if the region contains a single rectangle
127 * Return true if the region contains more than one rectangle
132 * Return a new Rect set to the bounds of the region. If the region is
142 * Set the Rect to the bounds of the region. If the region is empty, the
153 * Return the boundary of the region as a new Path. If the region is empty,
163 * Set the path to the boundary of the region. If the region is empty, the
171 * Return true if the region contains the specified point
176 * Return true if the region is a single rectangle (not complex) and it
178 * that the rectangle is not contained by this region, but return true is a
179 * guarantee that the rectangle is contained by this region.
186 * Return true if the region is a single rectangle (not complex) and it
188 * that the rectangle is not contained by this region, but return true is a
189 * guarantee that the rectangle is contained by this region.
195 * Return true if the region is empty, or if the specified rectangle does
196 * not intersect the region. Returning false is not a guarantee that they
204 * Return true if the region is empty, or if the specified rectangle does
205 * not intersect the region. Returning false is not a guarantee that they
211 * Return true if the region is empty, or if the specified region does not
212 * intersect the region. Returning false is not a guarantee that they
215 public native boolean quickReject(Region rgn);
218 * Translate the region by [dx, dy]. If the region is empty, do nothing.
225 * Set the dst region to the result of translating this region by [dx, dy].
226 * If this region is empty, then dst will be set to empty.
228 public native void translate(int dx, int dy, Region dst);
231 * Scale the region by the given scale amount. This re-constructs new region by
232 * scaling the rects that this region consists of. New rectis are computed by scaling
235 * an empty region. If this region is empty, do nothing.
244 * Set the dst region to the result of scaling this region by the given scale amount.
245 * If this region is empty, then dst will be set to empty.
248 public native void scale(float scale, Region dst);
255 * Perform the specified Op on this region and the specified rect. Return
264 * Perform the specified Op on this region and the specified rect. Return
273 * Perform the specified Op on this region and the specified region. Return
276 public boolean op(Region region, Op op) {
277 return op(this, region, op);
281 * Set this region to the result of performing the Op on the specified rect
282 * and region. Return true if the result is not empty.
284 public boolean op(Rect rect, Region region, Op op) {
285 return nativeOp(mNativeRegion, rect, region.mNativeRegion,
290 * Set this region to the result of performing the Op on the specified
293 public boolean op(Region region1, Region region2, Op op) {
307 public static Region obtain() {
308 Region region = sPool.acquire();
309 return (region != null) ? region : new Region();
315 * @param other Region to copy values from for initialization.
319 public static Region obtain(Region other) {
320 Region region = obtain();
321 region.set(other);
322 return region;
337 public static final Parcelable.Creator<Region> CREATOR
338 = new Parcelable.Creator<Region>() {
340 * Rebuild a Region previously stored with writeToParcel().
341 * @param p Parcel object to read the region from
342 * @return a new region created from the data in the parcel
344 public Region createFromParcel(Parcel p) {
349 return new Region(ni);
351 public Region[] newArray(int size) {
352 return new Region[size];
361 * Write the region and its pixels to the parcel. The region can be
363 * @param p Parcel object to write the region data into
373 if (obj == null || !(obj instanceof Region)) {
376 Region peer = (Region) obj;
388 Region(int ni) {
397 private Region(int ni, int dummy) {