public abstract string CanvasGeometryCombine(CanvasGeometryCombine value);
/* * Set this path to the result of applying the Op to the two specified paths. The resulting path will be constructed from non-overlapping contours. The curve order is reduced where possible so that cubics may be turned into quadratics, and quadratics maybe turned into lines. * Path1: The first operand (for difference, the minuend) * Path2: The second operand (for difference, the subtrahend) */ public void Op(Path path1, Path path2, CanvasGeometryCombine op) { // TODO }
public CanvasGeometry CombineWith(CanvasGeometry other, Matrix3x2 matrix, CanvasGeometryCombine combineMode) => new Combination(this, other) { Matrix = matrix, CombineMode = combineMode, };
public CanvasGeometry CombineWith(CanvasGeometry otherGeometry, Matrix3x2 otherGeometryTransform, CanvasGeometryCombine combine) => null;
static List <Data.Path> Op(IEnumerable <Data.Path> paths, IEnumerable <Data.Path> otherPaths, CanvasGeometryCombine operation) { using CanvasGeometry geom1 = MakeGeometry(paths), geom2 = MakeGeometry(otherPaths); using var result = geom1.CombineWith(geom2, Matrix3x2.Identity, operation, float.Epsilon); var recv = new GeometrySink(); result.SendPathTo(recv); return(recv.Paths); }
/* * Set this path to the result of applying the Op to the two specified paths. The resulting path will be constructed from non-overlapping contours. The curve order is reduced where possible so that cubics may be turned into quadratics, and quadratics maybe turned into lines. * Path1: The first operand (for difference, the minuend) * Path2: The second operand (for difference, the subtrahend) */ public void Op(Path path1, Path path2, CanvasGeometryCombine op) { Contours.Add(new OpContour(path1, path2, op)); }
public OpContour(Path path1, Path path2, CanvasGeometryCombine op) { _path1 = path1; _path2 = path2; _op = op; }