Skip to content

GDimension

A utility class to store a width/height pair.

Factory Functions

function GDimension(dimension)
Creates a copy of the given dimension.
function GDimension([width=0, height=0])
Creates a new GDimension with the given width and height. If they are both omitted, defaults to 0 and 0.

Methods

function GDimension::getWidth()
Returns: The width of this GDimension.
function GDimension::getHeight()
Returns: The height of this GDimension.
function GDimension::setSize(dimension)
Sets this GDimension to be equal to the given dimension.
function GDimension::setSize(width, height)
Sets this GDimension's size to the given width and height).
function GDimension::getSize()
Returns: A copy of this GDimension.

Fields

GPoint::width
The width component of this GDimension
GPoint::height
The height component of this GDimension