harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r560187 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
Date Fri, 27 Jul 2007 10:37:00 GMT
Author: apetrenko
Date: Fri Jul 27 03:36:51 2007
New Revision: 560187

URL: http://svn.apache.org/viewvc?view=rev&rev=560187
Log:
Minor optimization of drawString method

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?view=diff&rev=560187&r1=560186&r2=560187
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
Fri Jul 27 03:36:51 2007
@@ -664,14 +664,9 @@
         AffineTransform fontTransform = font.getTransform();
         at.concatenate(fontTransform);
 
-        double[] matrix = new double[6];
         if (!at.isIdentity()){
-
-            int atType = at.getType();
-            at.getMatrix(matrix);
-
             // TYPE_TRANSLATION
-            if (atType == AffineTransform.TYPE_TRANSLATION){
+            if (at.getType() == AffineTransform.TYPE_TRANSLATION){
                 jtr.drawString(this, str,
                         (float)(x+fontTransform.getTranslateX()),
                         (float)(y+fontTransform.getTranslateY()));
@@ -681,8 +676,7 @@
             // in Graphics has transforms, we just fill outlines. New textrenderer
             // is to be implemented.
             Shape sh = font.createGlyphVector(this.getFontRenderContext(), str).getOutline(x,
y);
-            this.fill(sh);
-
+            fill(sh);
         } else {
             jtr.drawString(this, str, x, y);
         }



Mime
View raw message