From d75835796900cac602f7e5789601ffba0a27efe2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 May 2011 14:39:17 +0200 Subject: Graph: More std. functionality (equals, clone) / Better in-place transformation (cubic -> quadratic) Impl. more of John Pritchard proposal https://github.com/syntelos/jogl/commit/05a7ec92d30e1e688b1eb7cc317cad83a0e8fd60 +++ More std. functionality (equals, deep clone) of AABBox, Vertex, Outline and OutlineShape. Simplify Vertex: - Remove 2 component constructor - Add on-curve in Vertex.Factory / Constructor - Adding equals(Object) - Remove Comparable/compareTo, since we only can make an equals statement Outline/OutlineShape: Handle dirty flag for boundary (new set/remove operation) OutlineShape: Better in-place transformation (cubic -> quadratic) --- src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java | 8 ++++---- src/jogl/classes/jogamp/graph/geom/plane/Path2D.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/geom/plane') diff --git a/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java index 79e842887..b7c7c19e2 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java @@ -409,7 +409,7 @@ public class AffineTransform implements Cloneable, Serializable { float x = src.getX(); float y = src.getY(); - dst.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); + dst.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12, 0f); return dst; } @@ -422,7 +422,7 @@ public class AffineTransform implements Cloneable, Serializable { if (dstPoint == null) { throw new IllegalArgumentException("dst["+dstOff+"] is null"); } - dstPoint.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); + dstPoint.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12, 0f); dst[dstOff++] = dstPoint; } } @@ -452,7 +452,7 @@ public class AffineTransform implements Cloneable, Serializable { float x = src.getX(); float y = src.getY(); - dst.setCoord(x * m00 + y * m01, x * m10 + y * m11); + dst.setCoord(x * m00 + y * m01, x * m10 + y * m11, 0f); return dst; } @@ -477,7 +477,7 @@ public class AffineTransform implements Cloneable, Serializable { float x = src.getX() - m02; float y = src.getY() - m12; - dst.setCoord((x * m11 - y * m01) / det, (y * m00 - x * m10) / det); + dst.setCoord((x * m11 - y * m01) / det, (y * m00 - x * m10) / det, 0f); return dst; } diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java index edeabaa40..da64fe4e4 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java @@ -315,7 +315,7 @@ public final class Path2D implements Cloneable { j -= pointShift[type]; } } - return new SVertex(points[j], points[j + 1]); + return new SVertex(points[j], points[j + 1], 0f, true); } public void reset() { -- cgit v1.2.3