diff options
Diffstat (limited to 'src/test/com')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java | 36 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java | 35 |
2 files changed, 35 insertions, 36 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java index 7dc217c2d..b78826a6d 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java @@ -99,30 +99,30 @@ public class GPURegionGLListener01 extends GPURendererListenerBase01 { } private void createTestOutline01(){ - outlineShape.moveTo(0.0f,-10.0f); - outlineShape.lineTo(15.0f,-10.0f); - outlineShape.quadTo(10.0f,5.0f, 15.0f,10.0f); - outlineShape.cubicTo(6.0f,15.0f, 5.0f,8.0f, 0.0f,10.0f); + outlineShape.moveTo(0.0f,-10.0f, 0f); + outlineShape.lineTo(15.0f,-10.0f, 0f); + outlineShape.quadTo(10.0f,5.0f,0f, 15.0f,10.0f,0f); + outlineShape.cubicTo(6.0f,15.0f,0f, 5.0f,8.0f,0f, 0.0f,10.0f,0f); outlineShape.closePath(); - outlineShape.moveTo(5.0f,-5.0f); - outlineShape.quadTo(10.0f,-5.0f, 10.0f,0.0f); - outlineShape.quadTo(5.0f,0.0f, 5.0f,-5.0f); + outlineShape.moveTo(5.0f,-5.0f,0f); + outlineShape.quadTo(10.0f,-5.0f,0f, 10.0f,0.0f,0f); + outlineShape.quadTo(5.0f,0.0f,0f, 5.0f,-5.0f,0f); outlineShape.closePath(); /** Same shape as above but without any off-curve vertices */ final float offset = 30; - outlineShape.moveTo(offset+0.0f,-10.0f); - outlineShape.lineTo(offset+17.0f,-10.0f); - outlineShape.lineTo(offset+11.0f,5.0f); - outlineShape.lineTo(offset+16.0f,10.0f); - outlineShape.lineTo(offset+7.0f,15.0f); - outlineShape.lineTo(offset+6.0f,8.0f); - outlineShape.lineTo(offset+0.0f,10.0f); + outlineShape.moveTo(offset+0.0f,-10.0f,0f); + outlineShape.lineTo(offset+17.0f,-10.0f,0f); + outlineShape.lineTo(offset+11.0f,5.0f,0f); + outlineShape.lineTo(offset+16.0f,10.0f,0f); + outlineShape.lineTo(offset+7.0f,15.0f,0f); + outlineShape.lineTo(offset+6.0f,8.0f,0f); + outlineShape.lineTo(offset+0.0f,10.0f,0f); outlineShape.closePath(); - outlineShape.moveTo(offset+5.0f,0.0f); - outlineShape.lineTo(offset+5.0f,-5.0f); - outlineShape.lineTo(offset+10.0f,-5.0f); - outlineShape.lineTo(offset+10.0f,0.0f); + outlineShape.moveTo(offset+5.0f,0.0f,0f); + outlineShape.lineTo(offset+5.0f,-5.0f,0f); + outlineShape.lineTo(offset+10.0f,-5.0f,0f); + outlineShape.lineTo(offset+10.0f,0.0f,0f); outlineShape.closePath(); } diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java index a7c0bf84b..209ce3e57 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java @@ -77,24 +77,23 @@ public class CrossHair extends UIShape { final float lwh = lineWidth/2f; final float ctrX = 0f, ctrY = 0f; - float ctrZ = 0f; - - // vertical (CCW!) - shape.addVertex(ctrX-lwh, ctrY-thh, ctrZ, true); - shape.addVertex(ctrX+lwh, ctrY-thh, ctrZ, true); - shape.addVertex(ctrX+lwh, ctrY+thh, ctrZ, true); - shape.addVertex(ctrX-lwh, ctrY+thh, ctrZ, true); - shape.closeLastOutline(true); - - ctrZ -= 0.05f; - - // horizontal (CCW!) - shape.addEmptyOutline(); - shape.addVertex(ctrX-twh, ctrY-lwh, ctrZ, true); - shape.addVertex(ctrX+twh, ctrY-lwh, ctrZ, true); - shape.addVertex(ctrX+twh, ctrY+lwh, ctrZ, true); - shape.addVertex(ctrX-twh, ctrY+lwh, ctrZ, true); - shape.closeLastOutline(true); + final float ctrZ = 0f; + + // middle vertical (CCW!) + shape.moveTo(ctrX-lwh, ctrY-thh, ctrZ); + shape.lineTo(ctrX+lwh, ctrY-thh, ctrZ); + shape.lineTo(ctrX+lwh, ctrY+thh, ctrZ); + shape.lineTo(ctrX-lwh, ctrY+thh, ctrZ); + shape.closePath(); + + // ctrZ -= 0.05f; + + // middle horizontal (CCW!) + shape.moveTo(ctrX-twh, ctrY-lwh, ctrZ); + shape.lineTo(ctrX+twh, ctrY-lwh, ctrZ); + shape.lineTo(ctrX+twh, ctrY+lwh, ctrZ); + shape.lineTo(ctrX-twh, ctrY+lwh, ctrZ); + shape.closePath(); shape.setIsQuadraticNurbs(); shape.setSharpness(shapesSharpness); |