From 1c1a7d7ad51ea2041a5a121f034d4d748827b16c Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Thu, 31 Mar 2011 17:48:15 +0300 Subject: Fix: Outline over triangulation. With triangualtion exluding outter boundary triangles not all hole vertices will be inside the boundary (float issues). Workaround, check for all vertices, need a better solution and should sync with Java Fonts. --- src/com/jogamp/graph/curve/tess/CDTriangulator2D.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/com/jogamp/graph/curve/tess') diff --git a/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java index beef2d4a5..cc2478409 100644 --- a/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/com/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -203,13 +203,14 @@ public class CDTriangulator2D { } private Loop getContainerLoop(Outline polyline){ - Vertex v = polyline.getVertex(0); - - for (Loop loop:loops){ - if(loop.checkInside(v)){ - return loop; + ArrayList vertices = polyline.getVertices(); + for(Vertex vert: vertices){ + for (Loop loop:loops){ + if(loop.checkInside(vert)){ + return loop; + } } - } + } return null; } } -- cgit v1.2.3