org.freedesktop.cairo

Class Rectangle


public class Rectangle
extends java.lang.Object

Constructor Summary

Rectangle()
Constructs a new Rectangle object with position and size set to 0.
Rectangle(double x1, double y1, double x2, double y2)
Constructs a new Rectangle object defined by four bounding coordinates, (x1, y1) and (x2, y2)
Rectangle(Point upperLeft, Point lowerRight)
Constructs a new Rectangle object defined by two Point objects, which specify the upper-left and lower-right coordinates of the rectangle
Rectangle(Rectangle r)

Method Summary

double
getHeight()
double
getWidth()
double
getX()
double
getX1()
Deprecated. This method is deprecated in favor of getX().
double
getX2()
Deprecated. This method is deprecated in favor of getWidth().
double
getY()
double
getY1()
Deprecated. This method is deprecated in favor of getY().
double
getY2()
Deprecated. This method is deprecated in favor of getHeight().
void
setHeight(double height)
void
setOrigin(Point origin)
void
setSize(Point size)
void
setWidth(double width)
void
setX(double x)
void
setX1(double x1)
Deprecated. This method is deprecated in favor of setX(double).
void
setX2(double x2)
Deprecated. This method is deprecated in favor of setWidth(double).
void
setY(double y)
void
setY1(double y1)
Deprecated. This method is deprecated in favor of setY(double).
void
setY2(double y2)
Deprecated. This method is deprecated in favor of setHeight(double).

Constructor Details

Rectangle

public Rectangle()
Constructs a new Rectangle object with position and size set to 0.

Rectangle

public Rectangle(double x1,
                 double y1,
                 double x2,
                 double y2)
Constructs a new Rectangle object defined by four bounding coordinates, (x1, y1) and (x2, y2)
Parameters:
x1 - x coordinate of the upper-left point of the rectangle
y1 - y coordinate of the upper-left point of the rectangle
x2 - x coordinate of the lower-right point of the rectangle
y2 - y coordinate of the lower-right point of the rectangle

Rectangle

public Rectangle(Point upperLeft,
                 Point lowerRight)
Constructs a new Rectangle object defined by two Point objects, which specify the upper-left and lower-right coordinates of the rectangle
Parameters:
upperLeft - x coordinate of the upper-left point of the rectangle
lowerRight - y coordinate of the lower-right point of the rectangle

Rectangle

public Rectangle(Rectangle r)

Method Details

getHeight

public double getHeight()

getWidth

public double getWidth()

getX

public double getX()

getX1

public double getX1()

Deprecated. This method is deprecated in favor of getX().

See Also:
getX()

getX2

public double getX2()

Deprecated. This method is deprecated in favor of getWidth().

See Also:
getWidth()

getY

public double getY()

getY1

public double getY1()

Deprecated. This method is deprecated in favor of getY().

See Also:
getY()

getY2

public double getY2()

Deprecated. This method is deprecated in favor of getHeight().

See Also:
getHeight()

setHeight

public void setHeight(double height)

setOrigin

public void setOrigin(Point origin)

setSize

public void setSize(Point size)

setWidth

public void setWidth(double width)

setX

public void setX(double x)

setX1

public void setX1(double x1)

Deprecated. This method is deprecated in favor of setX(double).

See Also:
setX(double)

setX2

public void setX2(double x2)

Deprecated. This method is deprecated in favor of setWidth(double).


setY

public void setY(double y)

setY1

public void setY1(double y1)

Deprecated. This method is deprecated in favor of setY(double).

See Also:
setY(double)

setY2

public void setY2(double y2)

Deprecated. This method is deprecated in favor of setHeight(double).