harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r545915 [2/5] - in /harmony/enhanced/classlib/trunk/modules/awt: ./ src/main/java/common/java/awt/ src/main/java/common/org/apache/harmony/awt/gl/ src/main/java/common/org/apache/harmony/awt/gl/font/ src/main/java/common/org/apache/harmony/...
Date Sun, 10 Jun 2007 17:31:25 GMT
Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?view=diff&rev=545915&r1=545914&r2=545915
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
Sun Jun 10 10:31:22 2007
@@ -39,7 +39,9 @@
 
 import org.apache.harmony.awt.gl.CommonGraphics2D;
 import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.awt.gl.font.FontManager;
 import org.apache.harmony.awt.gl.font.NativeFont;
+import org.apache.harmony.awt.gl.font.fontlib.FLTextRenderer;
 import org.apache.harmony.awt.wtk.NativeWindow;
 
 
@@ -92,8 +94,10 @@
         size = new Dimension(b.width, b.height);
 
         gi = createGraphicsInfo(this.nw.getId(), tx, ty, b.width, b.height);
-        setTransformedClip(this.clip);
-        jtr = GDIPTextRenderer.inst;
+        setTransformedClip(this.clip);        
+        if (!FontManager.IS_FONTLIB) {
+            jtr = GDIPTextRenderer.inst;
+        }
         dstSurf = new GDISurface(gi);
         blitter = GDIBlitter.getInstance();
         setTransform(getTransform());
@@ -107,8 +111,9 @@
 
         gi = createGraphicsInfo(this.nw.getId(), tx, ty, width, height);
         setTransformedClip(this.clip);
-        jtr = GDIPTextRenderer.inst;
-
+        if (!FontManager.IS_FONTLIB) {
+            jtr = GDIPTextRenderer.inst;
+        }
         dstSurf = new GDISurface(gi);
         blitter = GDIBlitter.getInstance();
         if (debugOutput) {
@@ -134,18 +139,22 @@
         setTransformedClip(this.clip);
         dstSurf = img.getImageSurface();
         blitter = GDIBlitter.getInstance();
-        jtr = GDIPTextRenderer.inst;
+        if (!FontManager.IS_FONTLIB) {
+            jtr = GDIPTextRenderer.inst;
+        }        
         setTransform(getTransform());
     }
 
     @Override
     public void addRenderingHints(Map<?,?> hints) {
         super.addRenderingHints(hints);
-        Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
-            NativeFont.setAntialiasing(gi,true);
-        } else {
-            NativeFont.setAntialiasing(gi,false);
+        if (!FontManager.IS_FONTLIB) {
+            Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
+            if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
+                NativeFont.setAntialiasing(gi,true);
+            } else {
+                NativeFont.setAntialiasing(gi,false);
+            }
         }
     }
     
@@ -563,22 +572,26 @@
     @Override
     public void setRenderingHint(RenderingHints.Key key, Object value) {
         super.setRenderingHint(key,value);
-        Object val = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (val == RenderingHints.VALUE_ANTIALIAS_ON) {
-            NativeFont.setAntialiasing(gi,true);
-        } else {
-            NativeFont.setAntialiasing(gi,false);
+        if (!FontManager.IS_FONTLIB) {
+            Object val = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
+            if (val == RenderingHints.VALUE_ANTIALIAS_ON) {
+                NativeFont.setAntialiasing(gi,true);
+            } else {
+                NativeFont.setAntialiasing(gi,false);
+            }
         }
     }
 
     @Override
     public void setRenderingHints(Map<?,?> hints) {
         super.setRenderingHints(hints);
-        Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-        if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
-            NativeFont.setAntialiasing(gi,true);
-        } else {
-            NativeFont.setAntialiasing(gi,false);
+        if (!FontManager.IS_FONTLIB) {
+            Object value = this.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
+            if (value == RenderingHints.VALUE_ANTIALIAS_ON) {
+                NativeFont.setAntialiasing(gi,true);
+            } else {
+                NativeFont.setAntialiasing(gi,false);
+            }
         }
     }
 
@@ -606,4 +619,4 @@
             WinGDIPGraphics2D.gdiPlusShutdown(WinGDIPGraphics2D.gdipToken);
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message