Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class draw2d.Dimension

    Object
       |
       +--draw2d.Point
             |
             +--draw2d.Dimension

class draw2d.Dimension
extends draw2d.Point

Defined in Dimension.js
Version: 0.9.14
Author: Andreas Herz

Field Summary
`Object` | `type`

Fields inherited from class draw2d.Point
`type`

Constructor Summary
`draw2d.Dimension ( x, y, w, h)`

Method Summary
`draw2d.Point` | `equals( o)`
`int` | `getBottom()`
`draw2d.Point` | `getBottomRight()`
`draw2d.Point` | `getCenter()`
`int` | `getHeight()`
`int` | `getRight()`
`draw2d.Point` | `getTopLeft()`
`int` | `getWidth()`
`boolean` | `isEmpty()` Returns `true` if this Rectangle's width or height is less than or equal to 0.
`draw2d.Dimension` | `resize( <int> dw, <int> dh)` Resizes this Rectangle by the values supplied as input and returns this for convenience.
`draw2d.Dimension` | `setBounds( rect)` Sets the parameters of this Rectangle from the Rectangle passed in and returns this for convenience.
`draw2d.Dimension` | `translate( <int> dx, <int> dy)` Moves this Rectangle horizontally by dx and vertically by dy, then returns this Rectangle for convenience.

Methods inherited from class draw2d.Point
`getX, getY, getPosition, getDistance, getTranslated`

Field Detail

### type

    Object type

Constructor Detail

### draw2d.Dimension

    draw2d.Dimension( x, y, w, h)

Version: 0.9.14
Author: Andreas Herz

Method Detail

### equals

    draw2d.Point equals( o)

### getBottom

    int getBottom()

### getBottomRight

    draw2d.Point getBottomRight()

### getCenter

    draw2d.Point getCenter()

### getHeight

    int getHeight()

### getRight

    int getRight()

### getTopLeft

    draw2d.Point getTopLeft()

### getWidth

    int getWidth()

### isEmpty

    boolean isEmpty()

Returns `true` if this Rectangle's width or height is less than or equal to 0.

### resize

    draw2d.Dimension resize( <int> dw, <int> dh)

Resizes this Rectangle by the values supplied as input and returns this for convenience. This Rectangle's width will become this.width + dw. This Rectangle's height will become this.height + dh.

Parameters:

`dw` - Amount by which width is to be resized

`dh` - Amount by which height is to be resized

### setBounds

    draw2d.Dimension setBounds( rect)

Sets the parameters of this Rectangle from the Rectangle passed in and returns this for convenience.

Parameters:

`Rectangle` - providing the bounding values

### translate

    draw2d.Dimension translate( <int> dx, <int> dy)

Moves this Rectangle horizontally by dx and vertically by dy, then returns this Rectangle for convenience.

Parameters:

`dx` - Shift along X axis

`dy` - Shift along Y axis

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Feb 7 23:45:47 2008