org.freedesktop.cairo

Class Rectangle

public class Rectangle extends Object

Field Summary
protected doubleheight
protected doublewidth
protected doublex
protected doubley
Constructor Summary
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()
Constructs a new Rectangle object with position and size set to 0.
Rectangle(Rectangle r)
Method Summary
doublegetHeight()
doublegetWidth()
doublegetX()
doublegetX1()
doublegetX2()
doublegetY()
doublegetY1()
doublegetY2()
voidsetHeight(double height)
voidsetOrigin(Point origin)
voidsetSize(Point size)
voidsetWidth(double width)
voidsetX(double x)
voidsetX1(double x1)
voidsetX2(double x2)
voidsetY(double y)
voidsetY1(double y1)
voidsetY2(double y2)

Field Detail

height

protected double height

width

protected double width

x

protected double x

y

protected double y

Constructor Detail

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()
Constructs a new Rectangle object with position and size set to 0.

Rectangle

public Rectangle(Rectangle r)

Method Detail

getHeight

public double getHeight()

getWidth

public double getWidth()

getX

public double getX()

getX1

public double getX1()

Deprecated: This method is deprecated in favor of {@link #getX}.

See Also: Rectangle

getX2

public double getX2()

Deprecated: This method is deprecated in favor of {@link #getWidth}.

See Also: Rectangle

getY

public double getY()

getY1

public double getY1()

Deprecated: This method is deprecated in favor of {@link #getY}.

See Also: Rectangle

getY2

public double getY2()

Deprecated: This method is deprecated in favor of {@link #getHeight}.

See Also: Rectangle

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 {@link #setX}.

See Also: Rectangle

setX2

public void setX2(double x2)

Deprecated: This method is deprecated in favor of {@link #setWidth}.

See Also: Rectangle

setY

public void setY(double y)

setY1

public void setY1(double y1)

Deprecated: This method is deprecated in favor of {@link #setY}.

See Also: Rectangle

setY2

public void setY2(double y2)

Deprecated: This method is deprecated in favor of {@link #setHeight}.

See Also: Rectangle