diff options
author | Kenneth Russel <[email protected]> | 2007-11-03 01:23:27 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-11-03 01:23:27 +0000 |
commit | 3bbbce9ae31ab73aba63416f51d6eb8ad925508e (patch) | |
tree | ca3228dd49057673c86a06f9e45eec6546aca2dc /src/demos | |
parent | 76f5c8f885f00e0a10dc62992c4f137a21008e88 (diff) |
Added flush() call to render loop needed for new TextRenderer. Added
implementation of new RenderDelegate.getBounds(GlyphVector, FontRenderContext).
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@226 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos')
-rwxr-xr-x | src/demos/j2d/CustomText.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/demos/j2d/CustomText.java b/src/demos/j2d/CustomText.java index 05c0048..aba7b97 100755 --- a/src/demos/j2d/CustomText.java +++ b/src/demos/j2d/CustomText.java @@ -309,6 +309,7 @@ public class CustomText extends Demo { 0); gl.glRotatef(info.angle, 0, 0, 1); renderer.draw(info.text, 0, 0); + renderer.flush(); } renderer.endRendering(); @@ -393,7 +394,10 @@ public class CustomText extends Demo { public Rectangle2D getBounds(String str, Font font, FontRenderContext frc) { - GlyphVector gv = font.createGlyphVector(frc, str); + return getBounds(font.createGlyphVector(frc, str), frc); + } + + public Rectangle2D getBounds(GlyphVector gv, FontRenderContext frc) { Rectangle2D stringBounds = gv.getPixelBounds(frc, 0, 0); return new Rectangle2D.Double(stringBounds.getX(), stringBounds.getY(), |