mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Implement the Brush without relying on a stamp texture
Test Plan: Test the BrushNode in the editor Reviewers: Keavon Reviewed By: Keavon Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1184
This commit is contained in:
committed by
Keavon Chambers
parent
5d9c0cb4d5
commit
1020eb6835
@@ -207,13 +207,13 @@ impl WasmSubpath {
|
||||
// Line between pivot and start point on curve
|
||||
let original_dashed_line = format!(
|
||||
r#"<line x1="{pivot_x}" y1="{pivot_y}" x2="{}" y2="{}" stroke="{ORANGE}" stroke-dasharray="0, 4" stroke-width="2" stroke-linecap="round"/>"#,
|
||||
self.0.iter().nth(0).unwrap().start().x,
|
||||
self.0.iter().nth(0).unwrap().start().y
|
||||
self.0.iter().next().unwrap().start().x,
|
||||
self.0.iter().next().unwrap().start().y
|
||||
);
|
||||
let rotated_dashed_line = format!(
|
||||
r#"<line x1="{pivot_x}" y1="{pivot_y}" x2="{}" y2="{}" stroke="{ORANGE}" stroke-dasharray="0, 4" stroke-width="2" stroke-linecap="round"/>"#,
|
||||
rotated_subpath.iter().nth(0).unwrap().start().x,
|
||||
rotated_subpath.iter().nth(0).unwrap().start().y
|
||||
rotated_subpath.iter().next().unwrap().start().x,
|
||||
rotated_subpath.iter().next().unwrap().start().y
|
||||
);
|
||||
|
||||
wrap_svg_tag(format!("{subpath_svg}{rotated_subpath_svg}{pivot}{original_dashed_line}{rotated_dashed_line}"))
|
||||
|
||||
Reference in New Issue
Block a user