pub struct QSizeF { /* private fields */ }
Expand description
The QSizeF class defines the size of a two-dimensional object using floating point precision.
Implementations§
Source§impl QSizeF
impl QSizeF
Sourcepub fn bounded_to(&self, other_size: &QSizeF) -> QSizeF
pub fn bounded_to(&self, other_size: &QSizeF) -> QSizeF
Returns a size holding the minimum width and height of this size and the given otherSize.
Sourcepub fn expanded_to(&self, other_size: &QSizeF) -> QSizeF
pub fn expanded_to(&self, other_size: &QSizeF) -> QSizeF
Returns a size holding the maximum width and height of this size and the given otherSize.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
Sourcepub fn is_null(&self) -> bool
pub fn is_null(&self) -> bool
Returns true if both the width and height are 0.0 (ignoring the sign); otherwise returns false.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true if both the width and height are equal to or greater than 0; otherwise returns false.
Sourcepub fn grown_by(&self, margins: QMarginsF) -> QSizeF
pub fn grown_by(&self, margins: QMarginsF) -> QSizeF
Returns the size that results from growing this size by margins.
Sourcepub fn scale(&mut self, size: &QSizeF, mode: AspectRatioMode)
pub fn scale(&mut self, size: &QSizeF, mode: AspectRatioMode)
Scales the size to a rectangle with the given size, according to the specified mode.
Sourcepub fn scaled(&self, s: &QSizeF, mode: AspectRatioMode) -> QSizeF
pub fn scaled(&self, s: &QSizeF, mode: AspectRatioMode) -> QSizeF
Returns a size scaled to a rectangle with the given size s, according to the specified mode.
Sourcepub fn set_height(&mut self, height: f64)
pub fn set_height(&mut self, height: f64)
Sets the height to the given finite height.
Sourcepub fn shrunk_by(&self, margins: QMarginsF) -> QSizeF
pub fn shrunk_by(&self, margins: QMarginsF) -> QSizeF
Returns the size that results from shrinking this size by margins.
Sourcepub fn to_size(&self) -> QSize
pub fn to_size(&self) -> QSize
Returns an integer based copy of this size.
Note that the coordinates in the returned size will be rounded to the nearest integer.
Sourcepub fn transposed(&self) -> QSizeF
pub fn transposed(&self) -> QSizeF
Returns the size with width and height values swapped.