Struct geometry::ring::RingBuilder
source · pub struct RingBuilder { /* private fields */ }
Expand description
A utility for constructing a Ring
.
Implementations§
source§impl RingBuilder
impl RingBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new RingBuilder
.
sourcepub fn outer(&mut self, rect: Rect) -> &mut Self
pub fn outer(&mut self, rect: Rect) -> &mut Self
Set the outer region of the ring.
Only one of inner and outer may be set.
sourcepub fn inner(&mut self, rect: Rect) -> &mut Self
pub fn inner(&mut self, rect: Rect) -> &mut Self
Set the inner region of the ring.
Only one of inner and outer may be set.
sourcepub fn left_width(&mut self, value: i64) -> &mut Self
pub fn left_width(&mut self, value: i64) -> &mut Self
Set the width of the left side of the ring.
sourcepub fn right_width(&mut self, value: i64) -> &mut Self
pub fn right_width(&mut self, value: i64) -> &mut Self
Set the width of the right side of the ring.
sourcepub fn bot_height(&mut self, value: i64) -> &mut Self
pub fn bot_height(&mut self, value: i64) -> &mut Self
Set the height of the bottom of the ring.
sourcepub fn top_height(&mut self, value: i64) -> &mut Self
pub fn top_height(&mut self, value: i64) -> &mut Self
Set the height of the top of the ring.
sourcepub fn widths(&mut self, value: i64) -> &mut Self
pub fn widths(&mut self, value: i64) -> &mut Self
Sets the widths of the vertical-going parts of the ring to the given value.
sourcepub fn heights(&mut self, value: i64) -> &mut Self
pub fn heights(&mut self, value: i64) -> &mut Self
Sets the heights of the horizontal-going parts of the ring to the given value.
sourcepub fn uniform_width(&mut self, value: i64) -> &mut Self
pub fn uniform_width(&mut self, value: i64) -> &mut Self
Sets the width of all ring edges to the given value.
sourcepub fn dir_widths(&mut self, dir: Dir, value: i64) -> &mut Self
pub fn dir_widths(&mut self, dir: Dir, value: i64) -> &mut Self
Sets the width of segments running in the given direction.
If dir
is Dir::Vert
, sets the widths of the left/right regions.
If dir
is Dir::Horiz
, sets the heights of the top/bottom regions.
sourcepub fn side_width(&mut self, side: Side, value: i64) -> &mut Self
pub fn side_width(&mut self, side: Side, value: i64) -> &mut Self
Set the width of the given side.
Trait Implementations§
source§impl Clone for RingBuilder
impl Clone for RingBuilder
source§fn clone(&self) -> RingBuilder
fn clone(&self) -> RingBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RingBuilder
impl Debug for RingBuilder
source§impl Default for RingBuilder
impl Default for RingBuilder
source§fn default() -> RingBuilder
fn default() -> RingBuilder
source§impl<'de> Deserialize<'de> for RingBuilder
impl<'de> Deserialize<'de> for RingBuilder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<RingBuilder> for Ring
impl From<RingBuilder> for Ring
source§fn from(value: RingBuilder) -> Self
fn from(value: RingBuilder) -> Self
source§impl PartialEq for RingBuilder
impl PartialEq for RingBuilder
source§fn eq(&self, other: &RingBuilder) -> bool
fn eq(&self, other: &RingBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.