|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
org.vectomatic.dom.svg.OMSVGRect
public class OMSVGRect
Represents rectangular geometry. Rectangles are defined as consisting of a (x,y) coordinate pair identifying a minimum X value, a minimum Y value, and a width and height, which are usually constrained to be non-negative.
An OMSVGRect object
can be designated as read only, which means that attempts to modify
the object will result in an exception being thrown, as described below.
| Constructor Summary | |
|---|---|
protected |
OMSVGRect()
|
| Method Summary | |
|---|---|
OMSVGRect |
assignTo(OMSVGRect destination)
Copies this rectangle to the specified destination rectangle. |
boolean |
contains(OMSVGPoint p)
Returns true if the specified point is inside this rectangle, false otherwise. |
float |
getCenterX()
Returns the X coordinate of the center of this rectangle. |
float |
getCenterY()
Returns the Y coordinate of the center of this rectangle. |
String |
getDescription()
Returns a textual description of the rectangle for debugging purposes. |
float |
getHeight()
The height coordinate of the rectangle, in user units. |
float |
getMaxX()
Returns the X coordinate of the right corners of this rectangle. |
float |
getMaxY()
Returns the X coordinate of the bottom corners of this rectangle. |
float |
getWidth()
The width coordinate of the rectangle, in user units. |
float |
getX()
The x coordinate of the rectangle, in user units. |
float |
getY()
The y coordinate of the rectangle, in user units. |
OMSVGRect |
inset(float x,
float y)
Modifies the position and size of this rectangle by adding the specified margin to it. |
OMSVGRect |
inset(OMSVGRect destination,
float x,
float y)
Modifies the position and size of this rectangle by adding the specified margin to it and puts the result in the destination rectangle. |
OMSVGRect |
intersection(OMSVGRect r)
Computes the intersection of this rectangle with the specified rectangle and puts the result in this rectangle. |
OMSVGRect |
intersection(OMSVGRect r,
OMSVGRect destination)
Computes the intersection of this rectangle with the specified rectangle and puts the result in the destination rectangle. |
void |
setHeight(float value)
The height coordinate of the rectangle, in user units. |
void |
setWidth(float value)
The width coordinate of the rectangle, in user units. |
void |
setX(float value)
The x coordinate of the rectangle, in user units. |
void |
setY(float value)
The y coordinate of the rectangle, in user units. |
OMSVGRect |
union(OMSVGRect r)
Computes the union of this rectangle with the specified rectangle and puts the result in this rectangle. |
OMSVGRect |
union(OMSVGRect r,
OMSVGRect destination)
Computes the union of this rectangle with the specified rectangle and puts the result in the destination rectangle. |
| Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
|---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected OMSVGRect()
| Method Detail |
|---|
public final float getX()
public final void setX(float value)
throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised when the rectangle
corresponds to a read only attribute
or when the object itself is read only.
com.google.gwt.core.client.JavaScriptExceptionpublic final float getY()
public final void setY(float value)
throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised when the rectangle
corresponds to a read only attribute
or when the object itself is read only.
com.google.gwt.core.client.JavaScriptExceptionpublic final float getWidth()
public final void setWidth(float value)
throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised when the rectangle
corresponds to a read only attribute
or when the object itself is read only.
com.google.gwt.core.client.JavaScriptExceptionpublic final float getHeight()
public final void setHeight(float value)
throws com.google.gwt.core.client.JavaScriptException
DOMException(NO_MODIFICATION_ALLOWED_ERR) - Raised when the rectangle
corresponds to a read only attribute
or when the object itself is read only.
com.google.gwt.core.client.JavaScriptExceptionpublic final float getCenterX()
public final float getCenterY()
public final float getMaxX()
public final float getMaxY()
public final OMSVGRect intersection(OMSVGRect r)
r - the rectangle to intersect
public final OMSVGRect intersection(OMSVGRect r,
OMSVGRect destination)
r - the rectangle to intersectdestination - a rectangle to store the intersection
public final OMSVGRect union(OMSVGRect r)
r - the rectangle with which to compute the union
public final OMSVGRect union(OMSVGRect r,
OMSVGRect destination)
r - the rectangle with which to compute the uniondestination - a rectangle to store the union
public final boolean contains(OMSVGPoint p)
p - The point to test
public final OMSVGRect assignTo(OMSVGRect destination)
destination - the destination rectangle.
public final String getDescription()
public final OMSVGRect inset(float x,
float y)
x - the horizontal marginy - the vertical margin
public final OMSVGRect inset(OMSVGRect destination,
float x,
float y)
destination - the destination rectangle.x - the horizontal marginy - the vertical margin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||