mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-22 14:04:05 +00:00
Remove file write
This commit is contained in:
parent
3e384acf4d
commit
d49dafbfc0
1 changed files with 7 additions and 7 deletions
|
@ -115,14 +115,14 @@ pub fn path_segment_intersection(seg0: &PathSegment, seg1: &PathSegment, endpoin
|
|||
let path2 = path_segment_cubic_to_lyon(*s2, *c12, *c22, *e2);
|
||||
|
||||
let intersections = path1.cubic_intersections_t(&path2);
|
||||
let mut file = std::fs::File::options().append(true).create(true).open("/tmp/intersections").unwrap();
|
||||
let format_curve = |seg0: &PathSegment| seg0.to_cubic().map(|point| format!("{} {}", point.x, point.y)).join(" ");
|
||||
// let mut file = std::fs::File::options().append(true).create(true).open("/tmp/intersections").unwrap();
|
||||
// let format_curve = |seg0: &PathSegment| seg0.to_cubic().map(|point| format!("{} {}", point.x, point.y)).join(" ");
|
||||
let intersections: Vec<_> = intersections.into_iter().map(|(s, t)| [s, t]).collect();
|
||||
let intersections_fmt: Vec<_> = intersections.iter().map(|[s, t]| format!("{},{}", s, t)).collect();
|
||||
if !intersections.is_empty() {
|
||||
writeln!(&mut file, "{}\n{}\n{}\n", format_curve(seg0), format_curve(seg1), intersections_fmt.join(" "),).unwrap();
|
||||
file.flush().unwrap();
|
||||
}
|
||||
// let intersections_fmt: Vec<_> = intersections.iter().map(|[s, t]| format!("{},{}", s, t)).collect();
|
||||
// if !intersections.is_empty() {
|
||||
// writeln!(&mut file, "{}\n{}\n{}\n", format_curve(seg0), format_curve(seg1), intersections_fmt.join(" "),).unwrap();
|
||||
// file.flush().unwrap();
|
||||
// }
|
||||
// let intersections: Vec<_> = intersections.into_iter().map(|(s, t)| [s, t]).collect();
|
||||
return intersections;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue