Skip to content

Commit

Permalink
Make use of PAP possible on Hyperbéziers without crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlcctrlv committed Jun 15, 2023
1 parent fb150f3 commit 1d9a35a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/contour_operations/patternalongpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ use glifparser::{
glif::{contour::MFEKContourCommon, MFEKContour, MFEKOutline},
MFEKPointData,
};
use MFEKmath::mfek::ResolveCubic as _;
use MFEKmath::{pattern_along_path_mfek, Piecewise};

use super::ContourOperationBuild;

impl ContourOperationBuild for PAPContour<MFEKPointData> {
fn build(&self, contour: &MFEKContour<MFEKPointData>) -> MFEKOutline<MFEKPointData> {
let contour_pw = Piecewise::from(contour.cubic().unwrap());
let contour_pw = Piecewise::from(contour.to_cubic());

let pap_output = pattern_along_path_mfek(&contour_pw, self);

Expand Down

0 comments on commit 1d9a35a

Please sign in to comment.