android.graphics
Class Rect

java.lang.Object
  extended by android.graphics.Rect
All Implemented Interfaces:
Parcelable

public final class Rect
extends Object
implements Parcelable


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
 int bottom
           
static Parcelable.Creator<Rect> CREATOR
           
 int left
           
 int right
           
 int top
           
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Rect()
           
Rect(int left, int top, int right, int bottom)
           
Rect(Rect r)
           
 
Method Summary
 int centerX()
           
 int centerY()
           
 boolean contains(int x, int y)
           
 boolean contains(int left, int top, int right, int bottom)
           
 boolean contains(Rect r)
           
 int describeContents()
           
 boolean equals(Object obj)
           
 float exactCenterX()
           
 float exactCenterY()
           
 String flattenToString()
           
 int height()
           
 void inset(int dx, int dy)
           
 boolean intersect(int left, int top, int right, int bottom)
           
 boolean intersect(Rect r)
           
 boolean intersects(int left, int top, int right, int bottom)
           
static boolean intersects(Rect a, Rect b)
           
 boolean isEmpty()
           
 void offset(int dx, int dy)
           
 void offsetTo(int newLeft, int newTop)
           
 void readFromParcel(Parcel in)
           
 void set(int left, int top, int right, int bottom)
           
 void set(Rect src)
           
 void setEmpty()
           
 boolean setIntersect(Rect a, Rect b)
           
 void sort()
           
 String toShortString()
           
 String toString()
           
static Rect unflattenFromString(String str)
           
 void union(int x, int y)
           
 void union(int left, int top, int right, int bottom)
           
 void union(Rect r)
           
 int width()
           
 void writeToParcel(Parcel out, int flags)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

left

public int left

top

public int top

right

public int right

bottom

public int bottom

CREATOR

public static final Parcelable.Creator<Rect> CREATOR
Constructor Detail

Rect

public Rect()

Rect

public Rect(int left,
            int top,
            int right,
            int bottom)

Rect

public Rect(Rect r)
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

toShortString

public String toShortString()

flattenToString

public String flattenToString()

unflattenFromString

public static Rect unflattenFromString(String str)

isEmpty

public final boolean isEmpty()

width

public final int width()

height

public final int height()

centerX

public final int centerX()

centerY

public final int centerY()

exactCenterX

public final float exactCenterX()

exactCenterY

public final float exactCenterY()

setEmpty

public void setEmpty()

set

public void set(int left,
                int top,
                int right,
                int bottom)

set

public void set(Rect src)

offset

public void offset(int dx,
                   int dy)

offsetTo

public void offsetTo(int newLeft,
                     int newTop)

inset

public void inset(int dx,
                  int dy)

contains

public boolean contains(int x,
                        int y)

contains

public boolean contains(int left,
                        int top,
                        int right,
                        int bottom)

contains

public boolean contains(Rect r)

intersect

public boolean intersect(int left,
                         int top,
                         int right,
                         int bottom)

intersect

public boolean intersect(Rect r)

setIntersect

public boolean setIntersect(Rect a,
                            Rect b)

intersects

public boolean intersects(int left,
                          int top,
                          int right,
                          int bottom)

intersects

public static boolean intersects(Rect a,
                                 Rect b)

union

public void union(int left,
                  int top,
                  int right,
                  int bottom)

union

public void union(Rect r)

union

public void union(int x,
                  int y)

sort

public void sort()

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

writeToParcel

public void writeToParcel(Parcel out,
                          int flags)
Specified by:
writeToParcel in interface Parcelable

readFromParcel

public void readFromParcel(Parcel in)


Copyright © 2008-2012. All Rights Reserved.