mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 15:18:11 +08:00
Fix circular repeat node without bounding box (#1571)
This commit is contained in:
@@ -114,7 +114,7 @@ pub struct CircularRepeatNode<AngleOffset, Radius, Count> {
|
|||||||
fn circular_repeat_vector_data(mut vector_data: VectorData, angle_offset: f32, radius: f32, count: u32) -> VectorData {
|
fn circular_repeat_vector_data(mut vector_data: VectorData, angle_offset: f32, radius: f32, count: u32) -> VectorData {
|
||||||
let mut new_subpaths: Vec<Subpath<_>> = Vec::with_capacity(vector_data.subpaths.len() * count as usize);
|
let mut new_subpaths: Vec<Subpath<_>> = Vec::with_capacity(vector_data.subpaths.len() * count as usize);
|
||||||
|
|
||||||
let bounding_box = vector_data.bounding_box().unwrap();
|
let Some(bounding_box) = vector_data.bounding_box() else { return vector_data };
|
||||||
let center = (bounding_box[0] + bounding_box[1]) / 2.;
|
let center = (bounding_box[0] + bounding_box[1]) / 2.;
|
||||||
|
|
||||||
let base_transform = DVec2::new(0., radius as f64) - center;
|
let base_transform = DVec2::new(0., radius as f64) - center;
|
||||||
|
|||||||
Reference in New Issue
Block a user