gnu.gnustep.base
Class NSRect
java.lang.Object
|
+--gnu.gnustep.base.NSRect
- All Implemented Interfaces:
- java.lang.Cloneable
- public final class NSRect
- extends java.lang.Object
- implements java.lang.Cloneable
This class wraps the Objective-C struct NSRect. Instances of this
class in Java contain four public fields: x, y, width, height. You
are required to set and read these variables directly.
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ZeroRect
public static NSRect ZeroRect
x
public float x
y
public float y
width
public float width
height
public float height
NSRect
public NSRect()
NSRect
public NSRect(float anX,
float anY,
float aWidth,
float aHeight)
NSRect
public NSRect(NSPoint origin,
NSSize size)
NSRect
public NSRect(java.lang.String string)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object otherObject)
- Overrides:
equals in class java.lang.Object
isEqualToRect
public boolean isEqualToRect(NSRect aRect)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
intersectsRect
public boolean intersectsRect(NSRect aRect)
isEmpty
public boolean isEmpty()
containsRect
public boolean containsRect(NSRect aRect)
containsPoint
public boolean containsPoint(NSPoint aPoint)
containsPoint
public boolean containsPoint(NSPoint aPoint,
boolean flipped)
insetRect
public void insetRect(float dx,
float dy)
intersectRect
public void intersectRect(NSRect aRect)
makeIntegral
public void makeIntegral()
offsetRect
public void offsetRect(float dx,
float dy)
unionRect
public void unionRect(NSRect aRect)
rectByInsettingRect
public NSRect rectByInsettingRect(float dx,
float dy)
rectByIntersectingRect
public NSRect rectByIntersectingRect(NSRect aRect)
rectByMakingIntegral
public NSRect rectByMakingIntegral()
rectByOffsettingRect
public NSRect rectByOffsettingRect(float dx,
float dy)
rectByUnioningRect
public NSRect rectByUnioningRect(NSRect aRect)
origin
public NSPoint origin()
setOrigin
public void setOrigin(NSPoint newOrigin)
size
public NSSize size()
setSize
public void setSize(NSSize newSize)
maxX
public float maxX()
midX
public float midX()
maxY
public float maxY()
midY
public float midY()