A size of an object based on width and height.
More...
#include <size.h>
A size of an object based on width and height.
| pp::Size::Size |
( |
const PP_Size & |
s | ) |
|
|
inline |
A constructor accepting a pointer to a PP_Size and converting the PP_Size to a Size. This is an implicit conversion constructor.
- Parameters
-
| [in] | s | A pointer to a PP_Size. |
| pp::Size::Size |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
A constructor accepting two int values for width and height and converting them to a Size.
- Parameters
-
| [in] | w | An int value representing a width. |
| [in] | h | An int value representing a height. |
| void pp::Size::Enlarge |
( |
int |
w, |
|
|
int |
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. |
| int pp::Size::GetArea |
( |
| ) |
const |
|
inline |
GetArea() determines the area (width * height).
- Returns
- The area.
| int pp::Size::height |
( |
| ) |
const |
|
inline |
Getter function for returning the value of height.
- Returns
- The value of height for this
Size.
| bool pp::Size::IsEmpty |
( |
| ) |
const |
|
inline |
IsEmpty() determines if the size is zero.
- Returns
- true if the size is zero.
| pp::Size::operator PP_Size |
( |
| ) |
|
|
inline |
PP_Size() allows implicit conversion of a Size to a PP_Size.
- Returns
- A Size.
| const PP_Size& pp::Size::pp_size |
( |
| ) |
const |
|
inline |
Getter function for returning the internal PP_Size struct.
- Returns
- A const reference to the internal
PP_Size struct.
| PP_Size& pp::Size::pp_size |
( |
| ) |
|
|
inline |
Getter function for returning the internal PP_Size struct.
- Returns
- A mutable reference to the
PP_Size struct.
| void pp::Size::set_height |
( |
int |
h | ) |
|
|
inline |
Setter function for setting the value of height.
- Parameters
-
| void pp::Size::set_width |
( |
int |
w | ) |
|
|
inline |
Setter function for setting the value of width.
- Parameters
-
| void pp::Size::SetSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
SetSize() sets the value of width and height.
- Parameters
-
| [in] | w | A new width value. |
| [in] | h | A new height value. |
| int pp::Size::width |
( |
| ) |
const |
|
inline |
Getter function for returning the value of width.
- Returns
- The value of width for this
Size.
The documentation for this class was generated from the following file: