class PDim: public PObject

This class represents a size in two dimensions.

Inheritance:


Public Methods

[more] PDim ()
Create a dimensions object with the initial width and height values of zero
[more] PDim ( PDIMENSION width, PDIMENSION height )
Create a dimension object with the initial width and height values.
[more] PDim ( const PDim & dim )
Create a copy of the specified dimension.
[more]virtual PObject* Clone () const
Create a copy of the specified dimensions.
[more]virtual Comparison Compare (const PObject & obj) const
Determine the relative rank of the two dimensions.
[more]PDIMENSION Width () const
Get the width dimension.
[more]PDIMENSION Height () const
Get the height dimension.
[more]void SetWidth ( PDIMENSION width )
Set the width dimension.
[more]void SetHeight ( PDIMENSION height )
Set the height dimension.
[more]void AddWidth ( PORDINATE dw )
Add a value to the width dimension.
[more]void AddHeight ( PORDINATE dh )
Add a value to the height dimension.
[more]PDim operator+ ( const PDim & dim ) const
Add the value to the dimension and return a third dimension.
[more]PDim& operator+= ( const PDim & dim )
Add the value to the dimension.
[more]PDim operator- ( const PDim & dim ) const
Subtract the value to the dimension and return a third dimension.
[more]PDim& operator-= ( const PDim & dim )
Subtract the value to the dimension.
[more]PDim operator* ( PDIMENSION scale ) const
Multiple the dimension by the scale factor and return a third dimension.
[more]PDim& operator*= ( PDIMENSION scale )
Multiply the dimension by the scale factor.
[more]PDim operator/ ( PDIMENSION scale ) const
Divide the dimension by the scale factor and return a third dimension.
[more]PDim& operator/= ( PDIMENSION scale )
Divide the dimension by the scale factor.

Public

[more] Overrides from class PObject
[more] New function for class


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

This class represents a size in two dimensions. The pair of values are platform dependent and are dependent on the standard type PDIMENSION.
o PDim()
Create a dimensions object with the initial width and height values of zero

o PDim( PDIMENSION width, PDIMENSION height )
Create a dimension object with the initial width and height values.
Parameters:
width - Initial width of the dimensions.
height - Initial height of the dimensions.

o PDim( const PDim & dim )
Create a copy of the specified dimension.
Parameters:
dim - Initial dimensions.

o Overrides from class PObject

ovirtual PObject* Clone() const
Create a copy of the specified dimensions.

Returns:
a new variable allocated on the heap with the same dimensions.

ovirtual Comparison Compare(const PObject & obj) const
Determine the relative rank of the two dimensions.

Returns:
EqualTo if the two dimensions are the same, LessThan if the area depicted by the two dimensions (width*height) is smaller and GreaterThan if the area is bigger.

o New function for class

oPDIMENSION Width() const
Get the width dimension.

Returns:
width.

oPDIMENSION Height() const
Get the height dimension.

Returns:
height.

ovoid SetWidth( PDIMENSION width )
Set the width dimension.
Parameters:
width - New width for dimensions.

ovoid SetHeight( PDIMENSION height )
Set the height dimension.
Parameters:
height - New height for dimensions.

ovoid AddWidth( PORDINATE dw )
Add a value to the width dimension.
Parameters:
dw - Amount to add to the dimensions.

ovoid AddHeight( PORDINATE dh )
Add a value to the height dimension.
Parameters:
dh - Amount to add to the dimensions.

oPDim operator+( const PDim & dim ) const
Add the value to the dimension and return a third dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
sum dimension.
Parameters:
dim - Dimension to add.

oPDim& operator+=( const PDim & dim )
Add the value to the dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
reference to original dimension.
Parameters:
dim - Dimension to add.

oPDim operator-( const PDim & dim ) const
Subtract the value to the dimension and return a third dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
difference dimension.
Parameters:
dim - Dimension to subtract.

oPDim& operator-=( const PDim & dim )
Subtract the value to the dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
reference to original dimension.
Parameters:
dim - Dimension to subtract.

oPDim operator*( PDIMENSION scale ) const
Multiple the dimension by the scale factor and return a third dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
product dimension.
Parameters:
scale - Scale factor to apply to dimension

oPDim& operator*=( PDIMENSION scale )
Multiply the dimension by the scale factor.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
reference to original dimension.
Parameters:
scale - Scale factor to apply to dimension

oPDim operator/( PDIMENSION scale ) const
Divide the dimension by the scale factor and return a third dimension.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
divided dimension.
Parameters:
scale - Scale factor to apply to dimension

oPDim& operator/=( PDIMENSION scale )
Divide the dimension by the scale factor.

The operation is performed in cartesian coordinates so each dimension is independently dealt with.

Returns:
reference to original dimension.
Parameters:
scale - Scale factor to apply to dimension


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.