Struct rckive_genpdf::Size
source · Expand description
A size of an area on a PDF layer, measured in millimeters.
Fields§
§width: Mm
The width of the area.
height: Mm
The height of the area.
Implementations§
source§impl Size
impl Size
sourcepub fn new(width: impl Into<Mm>, height: impl Into<Mm>) -> Size
pub fn new(width: impl Into<Mm>, height: impl Into<Mm>) -> Size
Creates a new size from the given width and height.
sourcepub fn stack_vertical(self, other: Size) -> Size
pub fn stack_vertical(self, other: Size) -> Size
Stacks the given size vertically on this size and returns the result.
This means that the width is set to the maximum of the widths and the height is set to the sum of the heights.
Trait Implementations§
source§impl AddAssign<Size> for Size
impl AddAssign<Size> for Size
source§fn add_assign(&mut self, rhs: Size)
fn add_assign(&mut self, rhs: Size)
Performs the
+=
operation. Read moresource§impl PartialOrd<Size> for Size
impl PartialOrd<Size> for Size
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign<Size> for Size
impl SubAssign<Size> for Size
source§fn sub_assign(&mut self, rhs: Size)
fn sub_assign(&mut self, rhs: Size)
Performs the
-=
operation. Read more