gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz test/gzz/vob/textvob.test gzz/vob/impl/gl/G...


From: Asko Soukka
Subject: [Gzz-commits] gzz test/gzz/vob/textvob.test gzz/vob/impl/gl/G...
Date: Thu, 21 Nov 2002 07:51:55 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Asko Soukka <address@hidden>    02/11/21 07:51:55

Modified files:
        test/gzz/vob   : textvob.test 
        gzz/vob/impl/gl: GLTextStyle.java 

Log message:
        Fixed GLTextStyle.getDescent, textvob test fails no more.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/textvob.test.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/impl/gl/GLTextStyle.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gzz/gzz/vob/impl/gl/GLTextStyle.java
diff -u gzz/gzz/vob/impl/gl/GLTextStyle.java:1.1 
gzz/gzz/vob/impl/gl/GLTextStyle.java:1.2
--- gzz/gzz/vob/impl/gl/GLTextStyle.java:1.1    Fri Nov  1 20:23:46 2002
+++ gzz/gzz/vob/impl/gl/GLTextStyle.java        Thu Nov 21 07:51:55 2002
@@ -34,7 +34,7 @@
  * it's much better to use GraphicsAPI.getTextStyle.
  */
 public class GLTextStyle extends TextStyle {
-public static final String rcsid = "$Id: GLTextStyle.java,v 1.1 2002/11/02 
01:23:46 benja Exp $";
+public static final String rcsid = "$Id: GLTextStyle.java,v 1.2 2002/11/21 
12:51:55 humppake Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -108,7 +108,7 @@
     }
 
     public float getDescent(float scale) {
-       return scale * fontScale * theFont.getHeight() - fontScale * 
theFont.getYOffs();
+       return scale * fontScale * (theFont.getHeight() - theFont.getYOffs());
     }
 
     public float getLeading(float scale) {
Index: gzz/test/gzz/vob/textvob.test
diff -u gzz/test/gzz/vob/textvob.test:1.7 gzz/test/gzz/vob/textvob.test:1.8
--- gzz/test/gzz/vob/textvob.test:1.7   Thu Nov 21 06:29:49 2002
+++ gzz/test/gzz/vob/textvob.test       Thu Nov 21 07:51:55 2002
@@ -37,15 +37,14 @@
 def testWH():
     """Tests that TextVob is drawn with the width and height
     that it claims with getWidth() and getHeight().
-    
-    fail: GL
     """
     vs = getvs()
     size = vs.getSize()
     vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red))
 
     textvob = gzz.vob.vobs.TextVob(sty1, "XÄjÖgqÅypX")
-    text_scale = 2
+    text_scale = 1
+
     text_width = int(textvob.getWidth(text_scale))
     text_height = int(textvob.getHeight(text_scale))
     text_depth = int(textvob.getDepth(text_scale))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]