You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 'Jitter Points' and 'Sample Polylines' working incorrectly with X or Y scale of 0 content (#3984)
* Fix NaN points produced by Sample Polylines on 0-scaled input
* Fix Jitter Points inverse transform for zero-scale axes and stop resetting stroke transform
* Remove a couple confusing Debug nodes
* Fix edge case
* Update demo art
* Fix order change in Jitter Points causing different results from earlier
* Fix bug in bisect tool
* Break out functionality into helper functions
Copy file name to clipboardExpand all lines: node-graph/nodes/vector/src/vector_nodes.rs
+87-46Lines changed: 87 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ use core_types::registry::types::{Angle, Length, Multiplier, Percentage, PixelLe
6
6
use core_types::table::{Table,TableRow,TableRowMut};
7
7
use core_types::transform::Footprint;
8
8
use core_types::{CloneVarArgs,Color,Context,Ctx,ExtractAll,OwnedContextImpl};
9
-
use glam::{DAffine2,DVec2};
9
+
use glam::{DAffine2,DMat2,DVec2};
10
10
use graphic_types::Vector;
11
11
use graphic_types::raster_types::{CPU,GPU,Raster};
12
12
use graphic_types::{Graphic,IntoGraphicTable};
@@ -16,7 +16,7 @@ use rand::{Rng, SeedableRng};
16
16
use std::collections::hash_map::DefaultHasher;
17
17
use vector_types::subpath::{BezierHandles,ManipulatorGroup};
18
18
use vector_types::vector::PointDomain;
19
-
use vector_types::vector::algorithms::bezpath_algorithms::{self,TValue, eval_pathseg_euclidean, evaluate_bezpath,sample_polyline_on_bezpath,split_bezpath, tangent_on_bezpath};
19
+
use vector_types::vector::algorithms::bezpath_algorithms::{self,TValue, eval_pathseg_euclidean, evaluate_bezpath, split_bezpath, tangent_on_bezpath};
20
20
use vector_types::vector::algorithms::merge_by_distance::MergeByDistanceExt;
21
21
use vector_types::vector::algorithms::offset_subpath::offset_bezpath;
22
22
use vector_types::vector::algorithms::spline::{solve_spline_first_handle_closed, solve_spline_first_handle_open};
@@ -1355,11 +1355,12 @@ async fn sample_polyline(
1355
1355
// Keeps track of the index of the first segment of the next bezpath in order to get lengths of all segments.
1356
1356
letmut next_segment_index = 0;
1357
1357
1358
-
formut bezpath in bezpaths {
1359
-
// Apply the tranformation to the current bezpath to calculate points after transformation.
0 commit comments