Public Member Functions
FloatSize () | |
FloatSize (const PP_FloatSize &s) | |
FloatSize (float w, float h) | |
~FloatSize () | |
operator PP_FloatSize () | |
const PP_FloatSize & | pp_float_size () const |
PP_FloatSize & | pp_float_size () |
float | width () const |
void | set_width (float w) |
float | height () const |
void | set_height (float h) |
float | GetArea () const |
void | SetSize (float w, float h) |
void | Enlarge (float w, float h) |
bool | IsEmpty () const |
Detailed Description
A size of an object based on width and height.
Constructor & Destructor Documentation
pp::FloatSize::FloatSize | ( | ) | [inline] |
The default constructor. Initializes the width and height to 0.0f.
pp::FloatSize::FloatSize | ( | const PP_FloatSize & | s | ) | [inline] |
A constructor accepting a pointer to a PP_FloatSize
and converting the PP_FloatSize
to a FloatSize
.
This is an implicit conversion constructor.
- Parameters:
[in] s A pointer to a PP_FloatSize
.
pp::FloatSize::FloatSize | ( | float | w, |
float | h | ||
) | [inline] |
A constructor accepting two float values for width and height and converting them to a FloatSize
.
- Parameters:
[in] w An float value representing a width. [in] h An float value representing a height.
pp::FloatSize::~FloatSize | ( | ) | [inline] |
Destructor.
Member Function Documentation
void pp::FloatSize::Enlarge | ( | float | w, |
float | h | ||
) | [inline] |
Enlarge() enlarges the size of an object.
- Parameters:
[in] w A width to add the current width. [in] h A height to add to the current height.
float pp::FloatSize::GetArea | ( | ) | const [inline] |
GetArea() determines the area (width * height).
- Returns:
- The area.
float pp::FloatSize::height | ( | ) | const [inline] |
Getter function for returning the value of height.
- Returns:
- The value of height for this
FloatSize
.
bool pp::FloatSize::IsEmpty | ( | ) | const [inline] |
IsEmpty() determines if the size is zero.
- Returns:
- true if the size is zero.
pp::FloatSize::operator PP_FloatSize | ( | ) | [inline] |
const PP_FloatSize& pp::FloatSize::pp_float_size | ( | ) | const [inline] |
Getter function for returning the internal PP_FloatSize
struct.
- Returns:
- A const reference to the internal
PP_FloatSize
struct.
PP_FloatSize& pp::FloatSize::pp_float_size | ( | ) | [inline] |
Getter function for returning the internal PP_FloatSize
struct.
- Returns:
- A mutable reference to the
PP_FloatSize
struct.
void pp::FloatSize::set_height | ( | float | h | ) | [inline] |
Setter function for setting the value of height.
- Parameters:
[in] h A new height value.
void pp::FloatSize::set_width | ( | float | w | ) | [inline] |
Setter function for setting the value of width.
- Parameters:
[in] w A new width value.
void pp::FloatSize::SetSize | ( | float | w, |
float | h | ||
) | [inline] |
SetSize() sets the value of width and height.
- Parameters:
[in] w A new width value. [in] h A new height value.
float pp::FloatSize::width | ( | ) | const [inline] |
Getter function for returning the value of width.
- Returns:
- The value of width for this
FloatSize
.
The documentation for this class was generated from the following file: