Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BSize Class Reference

A two-dimensional size. More...

Public Member Functions

 BSize ()
 Initializes a BSize object with both dimensions set to B_SIZE_UNSET.
 
 BSize (const BSize &other)
 Initializes a BSize object from another BSize.
 
 BSize (float width, float height)
 Initializes a BSize object with the specified width and height values.
 
float Height () const
 Gets the height of the BSize object.
 
int32 IntegerHeight () const
 Returns the height value of a BSize object as an int32.
 
int32 IntegerWidth () const
 Returns the width value of a BSize object as an int32.
 
bool IsHeightSet () const
 Checks if the BSize::height is not B_SIZE_UNSET.
 
bool IsWidthSet () const
 Checks if the BSize::width is not B_SIZE_UNSET.
 
void Set (float width, float height)
 Sets the width and height values of a BSize object.
 
void SetHeight (float height)
 Sets the height value of a BSize object.
 
void SetWidth (float width)
 Sets the width value of a BSize object.
 
float Width () const
 Gets the width of the BSize object.
 
Operators
bool operator== (const BSize &other) const
 Returns whether or not the width and height values of the BSize objects are equal.
 
bool operator!= (const BSize &other) const
 Returns whether or not the width and height values of the BSize objects differ.
 
BSizeoperator= (const BSize &other)
 Initializes a BSize object from another BSize by overloading the = operator.
 

Public Attributes

float height
 The vertical dimension.
 
float width
 The horizontal dimension.
 

Detailed Description

A two-dimensional size.

Since
Haiku R1

Constructor & Destructor Documentation

◆ BSize() [1/3]

BSize::BSize ( )
inline

Initializes a BSize object with both dimensions set to B_SIZE_UNSET.

See also
BSize::Set()
Since
Haiku R1

◆ BSize() [2/3]

BSize::BSize ( const BSize other)
inline

Initializes a BSize object from another BSize.

Parameters
otherThe BSize object to copy from.
Since
Haiku R1

◆ BSize() [3/3]

BSize::BSize ( float  width,
float  height 
)
inline

Initializes a BSize object with the specified width and height values.

Parameters
widthThe width value to set.
heightThe height value to set.
Since
Haiku R1

Member Function Documentation

◆ Height()

float BSize::Height ( ) const
inline

Gets the height of the BSize object.

Returns
BSize::height
Since
Haiku R1

References height.

◆ IntegerHeight()

int32 BSize::IntegerHeight ( ) const
inline

Returns the height value of a BSize object as an int32.

Returns
BSize::height, cast to an int32.
Warning
This may lose precision!
Since
Haiku R1

References height.

◆ IntegerWidth()

int32 BSize::IntegerWidth ( ) const
inline

Returns the width value of a BSize object as an int32.

Returns
BSize::width, cast to an int32.
Warning
This may lose precision!
Since
Haiku R1

References width.

◆ IsHeightSet()

bool BSize::IsHeightSet ( ) const
inline

Checks if the BSize::height is not B_SIZE_UNSET.

Returns
true if the height is set, false otherwise.
Since
Haiku R1

References B_SIZE_UNSET, and height.

◆ IsWidthSet()

bool BSize::IsWidthSet ( ) const
inline

Checks if the BSize::width is not B_SIZE_UNSET.

Returns
true if the width is set, false otherwise.
Since
Haiku R1

References B_SIZE_UNSET, and width.

◆ operator!=()

bool BSize::operator!= ( const BSize other) const
inline

Returns whether or not the width and height values of the BSize objects differ.

Returns
true if the width or height values differ, false otherwise.
Since
Haiku R1

◆ operator=()

BSize & BSize::operator= ( const BSize other)
inline

Initializes a BSize object from another BSize by overloading the = operator.

Parameters
otherThe BSize object to copy from.
Since
Haiku R1

References height, and width.

◆ operator==()

bool BSize::operator== ( const BSize other) const
inline

Returns whether or not the width and height values of the BSize objects are equal.

Returns
true if the width and height values are equal, false otherwise.
Since
Haiku R1

References height, and width.

◆ Set()

void BSize::Set ( float  width,
float  height 
)
inline

Sets the width and height values of a BSize object.

Parameters
widthThe width value to set.
heightThe height value to set.
Since
Haiku R1

References height, and width.

◆ SetHeight()

void BSize::SetHeight ( float  height)
inline

Sets the height value of a BSize object.

Parameters
heightThe height value to set.
Since
Haiku R1

References height.

◆ SetWidth()

void BSize::SetWidth ( float  width)
inline

Sets the width value of a BSize object.

Parameters
widthThe width value to set.
Since
Haiku R1

References width.

◆ Width()

float BSize::Width ( ) const
inline

Gets the width of the BSize object.

Returns
BSize::width
Since
Haiku R1

References width.

Member Data Documentation

◆ height

BSize::height

The vertical dimension.

Since
Haiku R1

Referenced by Height(), IntegerHeight(), IsHeightSet(), operator=(), operator==(), Set(), and SetHeight().

◆ width

BSize::width

The horizontal dimension.

Since
Haiku R1

Referenced by IntegerWidth(), IsWidthSet(), operator=(), operator==(), Set(), SetWidth(), and Width().