Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | Class Members | Related Pages

PlotMM::DoubleSize Class Reference

List of all members.

Detailed Description

Class defining a size in double coordinates.


Public Member Functions

 DoubleSize ()
 DoubleSize (double width, double height)
bool is_null () const
bool is_empty () const
bool is_valid () const
double get_width () const
double get_height () const
void set_width (double w)
void set_height (double h)
void transpose ()
DoubleSize expanded_to (const DoubleSize &) const
DoubleSize bounded_to (const DoubleSize &) const
bool operator== (const DoubleSize &) const
bool operator!= (const DoubleSize &) const
const DoubleSize operator- () const
const DoubleSize operator+ (const DoubleSize &) const
const DoubleSize operator- (const DoubleSize &) const
const DoubleSize operator * (double) const
const DoubleSize operator/ (double) const
DoubleSizeoperator+= (const DoubleSize &)
DoubleSizeoperator-= (const DoubleSize &)
DoubleSizeoperator *= (double c)
DoubleSizeoperator/= (double c)


Constructor & Destructor Documentation

DoubleSize::DoubleSize  ) 
 

Constructs a size with a width and height of 0.0.

DoubleSize::DoubleSize double  width,
double  height
 

Constructs a size with a width w and height h.


Member Function Documentation

DoubleSize DoubleSize::bounded_to const DoubleSize other  )  const
 

Returns a size with the minimum width and height of this size and other.

DoubleSize DoubleSize::expanded_to const DoubleSize other  )  const
 

Returns a size with the maximum width and height of this size and other.

double PlotMM::DoubleSize::get_height  )  const
 

Returns the height.

double PlotMM::DoubleSize::get_width  )  const
 

Returns the width.

bool PlotMM::DoubleSize::is_empty  )  const
 

Returns TRUE if the width is <= 0 or the height is <= 0, otherwise false.

bool PlotMM::DoubleSize::is_null  )  const
 

Returns TRUE if the width is 0 and the height is 0; otherwise returns false.

const DoubleSize DoubleSize::operator * double   )  const
 

Returns the size formed by multiplying both components by c.

bool DoubleSize::operator!= const DoubleSize  )  const
 

Returns TRUE if the size is not equal to other; otherwise returns FALSE.

const DoubleSize DoubleSize::operator+ const DoubleSize other  )  const
 

Returns the size formed by adding both components by the components of other. Each component is added separately.

DoubleSize & DoubleSize::operator+= const DoubleSize  ) 
 

Adds size other to this size and returns a reference to this size.

const DoubleSize DoubleSize::operator- const DoubleSize other  )  const
 

Returns the size formed by subtracting both components by the components of other. Each component is subtracted separately.

const DoubleSize DoubleSize::operator-  )  const
 

Returns the size formed by changing the sign of both components, equivalent to DoubleSize(-width(), -height());

DoubleSize & DoubleSize::operator-= const DoubleSize  ) 
 

Subtracts size other from this size and returns a reference to this size.

const DoubleSize DoubleSize::operator/ double   )  const
 

Returns the size formed by dividing both components by c.

bool DoubleSize::operator== const DoubleSize  )  const
 

Returns TRUE if the size is equal to other; otherwise returns FALSE.

void PlotMM::DoubleSize::set_height double  h  ) 
 

Sets the height to height.

void PlotMM::DoubleSize::set_width double  w  ) 
 

Sets the width to width.

void DoubleSize::transpose  ) 
 

Swaps the values of width and height.


Generated on Thu Nov 10 15:26:22 2005 for PlotMM by  doxygen 1.4.4