Bugzilla – Attachment 58 Details for
Bug 165
GLUT 3.8 fixes bugs in glutStrokeLength and adds glutStrokeLengthf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch to fix glutStrokeLength and add glutStrokeLengthf
glutstrokelength-patch (text/plain), 996 bytes, created by
Sven Gothel
on 2005-06-10 10:25:00 CEST
(
hide
)
Description:
Patch to fix glutStrokeLength and add glutStrokeLengthf
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2005-06-10 10:25:00 CEST
Size:
996 bytes
patch
obsolete
>diff -Naur a/jogl/src/net/java/games/jogl/util/GLUT.java b/jogl/src/net/java/games/jogl/util/GLUT.java >--- a/jogl/src/net/java/games/jogl/util/GLUT.java 2005-05-27 14:24:16.000000000 -0700 >+++ b/jogl/src/net/java/games/jogl/util/GLUT.java 2005-06-10 10:21:50.000000000 -0700 >@@ -411,7 +411,22 @@ > > public int glutStrokeLength (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); >+ if (c >= 0 && c < fontinfo.num_chars) { >+ StrokeCharRec ch = fontinfo.ch[c]; >+ if (ch != null) >+ length += ch.right; >+ } >+ } >+ return (int) length; >+ } >+ >+ public float glutStrokeLengthf (int font, String string) { >+ StrokeFontRec fontinfo = getStrokeFont(font); >+ float length = 0; > int len = string.length(); > for (int i = 0; i < len; i++) { > char c = string.charAt(i);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 165
: 58