mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Add a stack-based Boolean Operation layer node (#1813)
* Multiple boolean operation node * Change boolean operation ordering * Complete layer boolean operation node * Automatically insert new boolean operation node * Remove divide operation * Fix subtract operations * Remove stack data from boolean operation properties * Fix images and custom vectors * Code cleanup * Use slice instead of iter to avoid infinite type recursion --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -20,10 +20,6 @@ export function booleanDifference(path1: string, path2: string): string {
|
||||
return booleanOperation(path1, path2, "exclude");
|
||||
}
|
||||
|
||||
export function booleanDivide(path1: string, path2: string): string {
|
||||
return booleanOperation(path1, path2, "intersect") + booleanOperation(path1, path2, "exclude");
|
||||
}
|
||||
|
||||
function booleanOperation(path1: string, path2: string, operation: "unite" | "subtract" | "intersect" | "exclude"): string {
|
||||
const paperPath1 = new paper.CompoundPath(path1);
|
||||
const paperPath2 = new paper.CompoundPath(path2);
|
||||
|
||||
Reference in New Issue
Block a user