aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogamp/graph
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogamp/graph')
-rw-r--r--src/jogamp/graph/curve/opengl/VBORegion2PGL3.java8
-rw-r--r--src/jogamp/graph/curve/text/GlyphShape.java16
-rw-r--r--src/jogamp/graph/geom/plane/Path2D.java6
3 files changed, 16 insertions, 14 deletions
diff --git a/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java b/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
index a17809d79..066f43afc 100644
--- a/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
+++ b/src/jogamp/graph/curve/opengl/VBORegion2PGL3.java
@@ -121,8 +121,12 @@ public class VBORegion2PGL3 implements Region{
verticesBuffer.put(v.getY());
}
verticesBuffer.put(v.getZ());
-
- box.resize(v.getX(), -1*v.getY(), v.getZ());
+ if(flipped){
+ box.resize(v.getX(), -1*v.getY(), v.getZ());
+ }
+ else{
+ box.resize(v.getX(), v.getY(), v.getZ());
+ }
}
verticesBuffer.rewind();
diff --git a/src/jogamp/graph/curve/text/GlyphShape.java b/src/jogamp/graph/curve/text/GlyphShape.java
index 70a725424..36ba57244 100644
--- a/src/jogamp/graph/curve/text/GlyphShape.java
+++ b/src/jogamp/graph/curve/text/GlyphShape.java
@@ -70,7 +70,7 @@ public class GlyphShape {
shape.transformOutlines(OutlineShape.QUADRATIC_NURBS);
}
- public final Vertex.Factory<? extends Vertex> pointFactory() { return shape.pointFactory(); }
+ public final Vertex.Factory<? extends Vertex> vertexFactory() { return shape.vertexFactory(); }
private void addVertexToLastOutline(Vertex vertex){
shape.addVertex(vertex);
@@ -81,40 +81,40 @@ public class GlyphShape {
if(!shape.getLastOutline().isEmpty()){
shape.addEmptyOutline();
}
- Vertex vert = pointFactory().create(coords[0],coords[1]);
+ Vertex vert = vertexFactory().create(coords[0],coords[1]);
vert.setOnCurve(true);
addVertexToLastOutline(vert);
numVertices++;
}
else if(segmentType == PathIterator.SEG_LINETO){
- Vertex vert1 = pointFactory().create(coords[0],coords[1]);
+ Vertex vert1 = vertexFactory().create(coords[0],coords[1]);
vert1.setOnCurve(true);
addVertexToLastOutline(vert1);
numVertices++;
}
else if(segmentType == PathIterator.SEG_QUADTO){
- Vertex vert1 = pointFactory().create(coords[0],coords[1]);
+ Vertex vert1 = vertexFactory().create(coords[0],coords[1]);
vert1.setOnCurve(false);
addVertexToLastOutline(vert1);
- Vertex vert2 = pointFactory().create(coords[2],coords[3]);
+ Vertex vert2 = vertexFactory().create(coords[2],coords[3]);
vert2.setOnCurve(true);
addVertexToLastOutline(vert2);
numVertices+=2;
}
else if(segmentType == PathIterator.SEG_CUBICTO){
- Vertex vert1 = pointFactory().create(coords[0],coords[1]);
+ Vertex vert1 = vertexFactory().create(coords[0],coords[1]);
vert1.setOnCurve(false);
addVertexToLastOutline(vert1);
- Vertex vert2 = pointFactory().create(coords[2],coords[3]);
+ Vertex vert2 = vertexFactory().create(coords[2],coords[3]);
vert2.setOnCurve(false);
addVertexToLastOutline(vert2);
- Vertex vert3 = pointFactory().create(coords[4],coords[5]);
+ Vertex vert3 = vertexFactory().create(coords[4],coords[5]);
vert3.setOnCurve(true);
addVertexToLastOutline(vert3);
diff --git a/src/jogamp/graph/geom/plane/Path2D.java b/src/jogamp/graph/geom/plane/Path2D.java
index e25ae0e84..431891361 100644
--- a/src/jogamp/graph/geom/plane/Path2D.java
+++ b/src/jogamp/graph/geom/plane/Path2D.java
@@ -360,8 +360,6 @@ public final class Path2D implements Cloneable {
}
}
}
- // FIXME: Rami's code had this in, but AABBox uses upper left - lower right - right ?
- // return new AABBox(rx1, ry1, 0f, rx2 - rx1, ry2 - ry1, 0f);
return new AABBox(rx1, ry1, 0f, rx2, ry2, 0f);
}
@@ -396,11 +394,11 @@ public final class Path2D implements Cloneable {
}
public boolean contains(AABBox r) {
- return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight());
+ return contains(r);
}
public boolean intersects(AABBox r) {
- return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight());
+ return intersects(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());
}
public PathIterator iterator() {