pub struct BezierCurve<'ui> { /* private fields */ }
Expand description
Represents a Bezier curve about to be drawn
Implementations§
Source§impl<'ui> BezierCurve<'ui>
impl<'ui> BezierCurve<'ui>
Sourcepub fn new<C>(
draw_list: &'ui DrawListMut<'_>,
pos0: impl Into<Vector2<f32>>,
cp0: impl Into<Vector2<f32>>,
cp1: impl Into<Vector2<f32>>,
pos1: impl Into<Vector2<f32>>,
c: C,
) -> BezierCurve<'ui>
pub fn new<C>( draw_list: &'ui DrawListMut<'_>, pos0: impl Into<Vector2<f32>>, cp0: impl Into<Vector2<f32>>, cp1: impl Into<Vector2<f32>>, pos1: impl Into<Vector2<f32>>, c: C, ) -> BezierCurve<'ui>
Typically constructed by DrawListMut::add_bezier_curve
Sourcepub fn thickness(self, thickness: f32) -> BezierCurve<'ui>
pub fn thickness(self, thickness: f32) -> BezierCurve<'ui>
Set curve’s thickness (default to 1.0 pixel)
Sourcepub fn num_segments(self, num_segments: u32) -> BezierCurve<'ui>
pub fn num_segments(self, num_segments: u32) -> BezierCurve<'ui>
Set number of segments used to draw the Bezier curve. If not set, the bezier curve is auto-tessalated.
Auto Trait Implementations§
impl<'ui> Freeze for BezierCurve<'ui>
impl<'ui> !RefUnwindSafe for BezierCurve<'ui>
impl<'ui> !Send for BezierCurve<'ui>
impl<'ui> !Sync for BezierCurve<'ui>
impl<'ui> Unpin for BezierCurve<'ui>
impl<'ui> !UnwindSafe for BezierCurve<'ui>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more