pub struct PathBuilder {
pub offset: f32,
pub curvature: f32,
pub edge_type: EdgeType,
pub points: SmallVec<[Vec2; 2]>,
}Expand description
A path builder.
Fields§
§offset: f32§curvature: f32§edge_type: EdgeType§points: SmallVec<[Vec2; 2]>Implementations§
Source§impl PathBuilder
impl PathBuilder
Sourcepub fn new(
source: (Vec2, EdgeAnchor),
target: (Vec2, EdgeAnchor),
edge_type: EdgeType,
curvature: f32,
offset: f32,
flip_y: bool,
) -> PathBuilder
pub fn new( source: (Vec2, EdgeAnchor), target: (Vec2, EdgeAnchor), edge_type: EdgeType, curvature: f32, offset: f32, flip_y: bool, ) -> PathBuilder
If Y-Axis is down, should set flip_y to true.
| Y-Axis | Framework |
|---|---|
| Up | Bevy world |
| Down | egui, gpui, makepad screen |
pub fn calculate_control_points( source: [Vec2; 2], target: [Vec2; 2], curvature: f32, offset: f32, ) -> [Vec2; 4]
pub fn calculate_steps( source: [Vec2; 2], target: [Vec2; 2], offset: f32, ) -> SmallVec<[Vec2; 3]>
Trait Implementations§
Source§impl Clone for PathBuilder
impl Clone for PathBuilder
Source§fn clone(&self) -> PathBuilder
fn clone(&self) -> PathBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathBuilder
impl Debug for PathBuilder
Auto Trait Implementations§
impl Freeze for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
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