|
1 | 1 | /*******************************************************************************
|
2 | 2 | * Author : Angus Johnson *
|
3 |
| -* Version : Clipper2 - ver.1.0.3 * |
4 |
| -* Date : 23 August 2022 * |
| 3 | +* Version : Clipper2 - ver.1.0.4 * |
| 4 | +* Date : 16 September 2022 * |
5 | 5 | * Website : http://www.angusj.com *
|
6 | 6 | * Copyright : Angus Johnson 2010-2022 *
|
7 | 7 | * Purpose : Core structures and functions for the Clipper Library *
|
@@ -340,9 +340,9 @@ public bool Contains(Rect64 rec)
|
340 | 340 | rec.top >= top && rec.bottom <= bottom;
|
341 | 341 | }
|
342 | 342 |
|
343 |
| - public List<Point64> AsPath() |
| 343 | + public Path64 AsPath() |
344 | 344 | {
|
345 |
| - List < Point64 > result = new List<Point64>(4); |
| 345 | + Path64 result = new Path64(4); |
346 | 346 | result.Add(new Point64(left, top));
|
347 | 347 | result.Add(new Point64(right, top));
|
348 | 348 | result.Add(new Point64(right, bottom));
|
@@ -405,6 +405,30 @@ public bool PtIsInside(PointD pt)
|
405 | 405 |
|
406 | 406 | }
|
407 | 407 |
|
| 408 | + public class Path64 : List<Point64> |
| 409 | + { |
| 410 | + public Path64(int reserve = 0) : base(reserve) { } |
| 411 | + public Path64(Path64 path) : base(path) { } |
| 412 | + } |
| 413 | + public class Paths64 : List<Path64> |
| 414 | + { |
| 415 | + public Paths64(int reserve = 0) : base(reserve) { } |
| 416 | + public Paths64(Paths64 paths) : base(paths) { } |
| 417 | + } |
| 418 | + |
| 419 | + public class PathD : List<PointD> |
| 420 | + { |
| 421 | + public PathD(int reserve = 0) : base(reserve) { } |
| 422 | + public PathD(PathD path) : base(path) { } |
| 423 | + } |
| 424 | + |
| 425 | + public class PathsD : List<PathD> |
| 426 | + { |
| 427 | + public PathsD(int reserve = 0) : base(reserve) { } |
| 428 | + public PathsD(PathsD paths) : base(paths) { } |
| 429 | + } |
| 430 | + |
| 431 | + |
408 | 432 | // Note: all clipping operations except for Difference are commutative.
|
409 | 433 | public enum ClipType
|
410 | 434 | {
|
|
0 commit comments