Beispiel #1
0
 public abstract string CanvasGeometryCombine(CanvasGeometryCombine value);
Beispiel #2
0
 /*
  * 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,
 };
Beispiel #4
0
 public CanvasGeometry CombineWith(CanvasGeometry otherGeometry, Matrix3x2 otherGeometryTransform, CanvasGeometryCombine combine) => null;
Beispiel #5
0
        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);
        }
Beispiel #6
0
 /*
  * 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));
 }
Beispiel #7
0
 public OpContour(Path path1, Path path2, CanvasGeometryCombine op)
 {
     _path1 = path1;
     _path2 = path2;
     _op    = op;
 }