From 0fa2740c8c186b0908baa5b7629bef657fe38527 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 7 Jul 2005 22:49:47 +0000 Subject: Merged with main trunk (tag JOGL_PRE_1_1_1) git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@317 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/jogl/util/GLUT.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/net/java/games/jogl/util/GLUT.java') diff --git a/src/net/java/games/jogl/util/GLUT.java b/src/net/java/games/jogl/util/GLUT.java index 380b02b9f..aad01e13f 100644 --- a/src/net/java/games/jogl/util/GLUT.java +++ b/src/net/java/games/jogl/util/GLUT.java @@ -20,7 +20,7 @@ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN - * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR @@ -383,13 +383,17 @@ public class GLUT { } public int glutStrokeWidth (int font, char character) { + return (int) glutStrokeWidthf(font, character); + } + + public float glutStrokeWidthf (int font, char character) { StrokeFontRec fontinfo = getStrokeFont(font); int c = character & 0xFFFF; if (c < 0 || c >= fontinfo.num_chars) return 0; StrokeCharRec ch = fontinfo.ch[c]; if (ch != null) - return (int) ch.right; + return ch.right; else return 0; } @@ -410,8 +414,12 @@ public class GLUT { } public int glutStrokeLength (int font, String string) { + return (int) glutStrokeLengthf(font, string); + } + + public float glutStrokeLengthf (int font, String string) { StrokeFontRec fontinfo = getStrokeFont(font); - int length = 0; + float length = 0; int len = string.length(); for (int i = 0; i < len; i++) { char c = string.charAt(i); -- cgit v1.2.3