DsFSize is class that represents the 2D size of a graphic object (width, height) as floating point values.
More...
#include <ds_geometry.h>
|
|
float | w |
| | Width component.
|
| |
|
float | h |
| | Height component.
|
| |
|
| DsFSize | operator+ (const DsFSize &lhs, const DsFSize &rhs) |
| | Addition operator - adds two DsFSize objects.
|
| |
| DsFSize | operator+ (const DsFSize &lhs, float rhs) |
| | Addition operator - adds two DsFSize objects.
|
| |
| DsFSize | operator- (const DsFSize &lhs, const DsFSize &rhs) |
| | Subtraction operator - subtracts two DsFSize objects.
|
| |
| DsFSize | operator- (const DsFSize &lhs, float rhs) |
| | Subtraction operator - subtracts an integer from a DsFSize object.
|
| |
| DsFSize | operator* (const DsFSize &lhs, float multiplier) |
| | Multiplication operator - multiplies both W and H components of a DsFSize object with the same multiplier.
|
| |
| DsFSize | operator* (const DsFSize &lhs, const DsFSize &rhs) |
| | Multiplication operator - multiplies both W and H components of a DsFSize object with the (W, H) components from another DsFSize object.
|
| |
| DsFSize | operator/ (const DsFSize &lhs, const DsFSize &rhs) |
| | Division operator - divides both W and H components of a DsFSize object by the same divisor.
|
| |
| DsFSize | operator/ (const DsFSize &lhs, float divisor) |
| | Division operator - divides both W and H components of a DsFSize object by the (W, H) components from another DsFSize object.
|
| |
DsFSize is class that represents the 2D size of a graphic object (width, height) as floating point values.
◆ DsFSize() [1/4]
| DsFSize::DsFSize |
( |
float |
w, |
|
|
float |
h |
|
) |
| |
|
inline |
Creates a DsFSize object of size (w, h).
- Parameters
-
| w | Width in pixels |
| h | Height in pixels |
◆ DsFSize() [2/4]
| DsFSize::DsFSize |
( |
const DsPoint & |
p | ) |
|
|
inline |
Creates a DsFSize object using the X and Y coordinates of a point as width and height.
- Parameters
-
◆ DsFSize() [3/4]
Creates a DsFSize object using the X and Y coordinates of a point as width and height.
- Parameters
-
◆ DsFSize() [4/4]
| DsFSize::DsFSize |
( |
const DsSize & |
s | ) |
|
|
inline |
◆ operator DsFPoint()
◆ operator DsPoint()
| DsFSize::operator DsPoint |
( |
| ) |
const |
|
inline |
◆ operator DsSize()
| DsFSize::operator DsSize |
( |
| ) |
const |
|
inline |
◆ operator!=()
| bool DsFSize::operator!= |
( |
const DsFSize & |
rhs | ) |
const |
|
inline |
Comparison operator.
- Parameters
-
| rhs | Right hand side DsFSize object of the comparison operator |
◆ operator+=() [1/2]
Addition operator - adds a DsFSize object to the current DsFSize object.
- Parameters
-
- Returns
- Object reference
◆ operator+=() [2/2]
| DsFSize & DsFSize::operator+= |
( |
float |
rhs | ) |
|
|
inline |
Addition operator - adds an integer to the current DsFSize object (add to both w and h).
- Parameters
-
- Returns
- Object reference
◆ operator-()
| DsFSize DsFSize::operator- |
( |
| ) |
const |
|
inline |
Unary minus operator. Reverses the signs of both the W and H of the current DsFSize object.
- Returns
- DsFSize with both the W and H components of the current object having the signs reversed
◆ operator-=() [1/2]
Subtraction operator - subtracts a DsFSize object from the current DsFSize object.
- Parameters
-
- Returns
- Object reference
◆ operator-=() [2/2]
| DsFSize & DsFSize::operator-= |
( |
float |
rhs | ) |
|
|
inline |
Subtraction operator - subtracts an integer from the current DsFSize object.
- Parameters
-
- Returns
- Object reference
◆ operator==()
| bool DsFSize::operator== |
( |
const DsFSize & |
rhs | ) |
const |
|
inline |
Comparison operator.
- Parameters
-
| rhs | Right hand side DsFSize object of the comparison operator |
◆ saturate()
Saturates the current DsFSize object components to the minimum and maximum specified.
- Parameters
-
| min | Minimum value |
| max | Maximum value |
- Returns
- Saturated DsFSize object
◆ saturateMax()
Saturates the current DsFSize object components to the maximum specified.
- Parameters
-
- Returns
- Saturated DsFSize object
◆ saturateMin()
Saturates the current DsFSize object components to the minimum specified.
- Parameters
-
- Returns
- Saturated DsFSize object
◆ swap()
Returns a DsFSize object with the width and height swapped.
- Returns
- Swapped DsFSize object
◆ operator* [1/2]
Multiplication operator - multiplies both W and H components of a DsFSize object with the (W, H) components from another DsFSize object.
- Parameters
-
- Returns
- DsFSize object multiplied by the multiplier
◆ operator* [2/2]
Multiplication operator - multiplies both W and H components of a DsFSize object with the same multiplier.
- Parameters
-
| lhs | Left hand side DsFSize object |
| multiplier | Right hand side multiplier |
- Returns
- DsFSize object multiplied by the multiplier
◆ operator+ [1/2]
Addition operator - adds two DsFSize objects.
- Parameters
-
- Returns
- The sum of lhs and rhs DsFSize objects
◆ operator+ [2/2]
Addition operator - adds two DsFSize objects.
- Parameters
-
| lhs | Left hand side DsFSize object |
| rhs | Right hand side value |
- Returns
- The sum of lhs and the rhs value
◆ operator- [1/2]
Subtraction operator - subtracts two DsFSize objects.
- Parameters
-
- Returns
- The difference between lhs and rhs DsFSize objects
◆ operator- [2/2]
Subtraction operator - subtracts an integer from a DsFSize object.
- Parameters
-
| lhs | Left hand side DsFSize object |
| rhs | Right hand side value |
- Returns
- The difference between lhs and rhs DsFSize objects
◆ operator/ [1/2]
Division operator - divides both W and H components of a DsFSize object by the same divisor.
- Parameters
-
- Returns
- DsFSize object divided by the divisor
◆ operator/ [2/2]
Division operator - divides both W and H components of a DsFSize object by the (W, H) components from another DsFSize object.
- Parameters
-
| lhs | Left hand side DsFSize object |
| divisor | Right hand side divisor |
- Returns
- DsFSize object divided by the divisor
The documentation for this class was generated from the following file: