@@ -3,14 +3,13 @@ use glam::{DAffine2, DVec2};
3
3
use graphene_core:: subpath:: { ManipulatorGroup , Subpath } ;
4
4
use graphene_core:: table:: { Table , TableRow , TableRowRef } ;
5
5
use graphene_core:: vector:: algorithms:: merge_by_distance:: MergeByDistanceExt ;
6
- use graphene_core:: vector:: misc:: { point_to_dvec2, transform_pathseg } ;
6
+ use graphene_core:: vector:: misc:: point_to_dvec2;
7
7
use graphene_core:: vector:: style:: Fill ;
8
8
use graphene_core:: vector:: { PointId , Vector } ;
9
9
use graphene_core:: { Color , Ctx , Graphic } ;
10
- use kurbo:: { ParamCurve , Point } ;
10
+ use kurbo:: { Affine , ParamCurve , Point } ;
11
11
pub use path_bool as path_bool_lib;
12
12
use path_bool:: { FillRule , PathBooleanOperation } ;
13
- use std:: ops:: Mul ;
14
13
15
14
// TODO: Fix boolean ops to work by removing .transform() and .one_instnace_*() calls,
16
15
// TODO: since before we used a Vec of single-row tables and now we use a single table
@@ -300,8 +299,7 @@ fn to_path_segments(path: &mut Vec<path_bool::PathSegment>, subpath: &Subpath<Po
300
299
let mut global_start = None ;
301
300
let mut global_end = Point :: ZERO ;
302
301
for bezier in subpath. iter ( ) {
303
- const EPS : f64 = 1e-8 ;
304
- let transformed = transform_pathseg ( bezier, |pos| transform. transform_point2 ( pos) . mul ( EPS . recip ( ) ) . round ( ) . mul ( EPS ) ) ;
302
+ let transformed = Affine :: new ( transform. to_cols_array ( ) ) * bezier;
305
303
let start = transformed. start ( ) ;
306
304
let end = transformed. end ( ) ;
307
305
if global_start. is_none ( ) {
0 commit comments