fix: Spline snap points and TextStyle backward/upside-down rendering
Spline entities now expose fit_points (or control_points when no fit points are defined) as key_vertices, enabling Endpoint and Midpoint snap to reach spline construction points. TextStyle is_backward flag is applied by negating the width_factor, producing horizontally mirrored text. is_upside_down rotates the text 180°. Both tessellate_text_ex and text_local_bounds now handle negative width_factor without clamping it to zero. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
045ab96eab
commit
5216c247c2
4 changed files with 37 additions and 10 deletions
|
|
@ -215,7 +215,12 @@ pub fn tessellate_text_ex(
|
|||
|
||||
let font = get_font(font_name);
|
||||
let scale = height / 9.0;
|
||||
let wf = width_factor.clamp(0.01, 100.0);
|
||||
// Negative width_factor produces mirrored (backward) text.
|
||||
let wf = if width_factor < 0.0 {
|
||||
width_factor.clamp(-100.0, -0.01)
|
||||
} else {
|
||||
width_factor.clamp(0.01, 100.0)
|
||||
};
|
||||
let ob = oblique_angle.tan();
|
||||
let (cos_r, sin_r) = (rotation.cos(), rotation.sin());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue