Skip to content

Commit

Permalink
Added points at the extremes of circular arc caps and joins per request.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBlanchard committed Oct 13, 2021
1 parent 0fca043 commit a85434f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/glyphbuilder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{Bezier, Evaluate, Piecewise, Vector, EvalScale, EvalTranslate, EvalR
use glifparser::{Glif};

use flo_curves::line::{line_intersects_line};
use crate::{consts::SMALL_DISTANCE, vec2};
use crate::{consts::SMALL_DISTANCE, evaluate::Primitive, vec2};


#[allow(unused)]
Expand Down Expand Up @@ -134,7 +134,13 @@ impl GlyphBuilder {
to + -tangent2 * dist_along_tangents,
to
);
self.bezier_to(arc);

if let Some((left, right)) = arc.subdivide(0.5) {
self.bezier_to(left);
self.bezier_to(right);
} else {
self.bezier_to(arc);
}
}

pub fn circle_arc_to(&mut self, to: Vector, tangent1: Vector, tangent2: Vector)
Expand Down

0 comments on commit a85434f

Please sign in to comment.