pub struct TransSinglePath { /* private fields */ }Expand description
Single-path coordinate transformation.
Stores a path as a sequence of vertices with cumulative distances.
transform() maps x → distance-along-path, y → perpendicular offset.
Used by ConvTransform with ConvSegmentator for text-on-path effects.
Implementations§
Source§impl TransSinglePath
impl TransSinglePath
pub fn new() -> Self
pub fn base_length(&self) -> f64
pub fn set_base_length(&mut self, v: f64)
pub fn preserve_x_scale(&self) -> bool
pub fn set_preserve_x_scale(&mut self, f: bool)
pub fn reset(&mut self)
pub fn move_to(&mut self, x: f64, y: f64)
pub fn line_to(&mut self, x: f64, y: f64)
Sourcepub fn add_path<VS: VertexSource>(&mut self, vs: &mut VS, path_id: u32)
pub fn add_path<VS: VertexSource>(&mut self, vs: &mut VS, path_id: u32)
Build the path from a VertexSource.
Sourcepub fn finalize_path(&mut self)
pub fn finalize_path(&mut self)
Finalize the path — compute cumulative distances and prepare for transform.
Sourcepub fn total_length(&self) -> f64
pub fn total_length(&self) -> f64
Total length of the path (or base_length if set).
Trait Implementations§
Source§impl Transformer for TransSinglePath
impl Transformer for TransSinglePath
Auto Trait Implementations§
impl Freeze for TransSinglePath
impl RefUnwindSafe for TransSinglePath
impl Send for TransSinglePath
impl Sync for TransSinglePath
impl Unpin for TransSinglePath
impl UnwindSafe for TransSinglePath
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