Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/clipper2/Clipper.java
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public static PathsD ReversePaths(PathsD paths) {
}

public static Rect64 GetBounds(Path64 path) {
Rect64 result = InvalidRect64;
Rect64 result = InvalidRect64.clone();
for (Point64 pt : path) {
if (pt.x < result.left) {
result.left = pt.x;
Expand All @@ -696,7 +696,7 @@ public static Rect64 GetBounds(Path64 path) {
}

public static Rect64 GetBounds(Paths64 paths) {
Rect64 result = InvalidRect64;
Rect64 result = InvalidRect64.clone();
for (Path64 path : paths) {
for (Point64 pt : path) {
if (pt.x < result.left) {
Expand All @@ -717,7 +717,7 @@ public static Rect64 GetBounds(Paths64 paths) {
}

public static RectD GetBounds(PathD path) {
RectD result = InvalidRectD;
RectD result = InvalidRectD.clone();
for (PointD pt : path) {
if (pt.x < result.left) {
result.left = pt.x;
Expand All @@ -736,7 +736,7 @@ public static RectD GetBounds(PathD path) {
}

public static RectD GetBounds(PathsD paths) {
RectD result = InvalidRectD;
RectD result = InvalidRectD.clone();
for (PathD path : paths) {
for (PointD pt : path) {
if (pt.x < result.left) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/clipper2/engine/ClipperBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ public static Rect64 GetBounds(Path64 path) {
if (path.isEmpty()) {
return new Rect64();
}
Rect64 result = Clipper.InvalidRect64;
Rect64 result = Clipper.InvalidRect64.clone();
for (Point64 pt : path) {
if (pt.x < result.left) {
result.left = pt.x;
Expand Down Expand Up @@ -2893,7 +2893,7 @@ protected void BuildTree(PolyPathBase polytree, Paths64 solutionOpen) {
}

public final Rect64 GetBounds() {
Rect64 bounds = Clipper.InvalidRect64;
Rect64 bounds = Clipper.InvalidRect64.clone();
for (Vertex t : vertexList) {
Vertex v = t;
do {
Expand Down