harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r446616 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt: GraphicsEnvironment.java Image.java
Date Fri, 15 Sep 2006 14:14:15 GMT
Author: hindessm
Date: Fri Sep 15 07:14:14 2006
New Revision: 446616

URL: http://svn.apache.org/viewvc?view=rev&rev=446616
Log:
Applied patch from "[#HARMONY-1469] classlib][awt] Implementation of the
missing API in java.awt".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java?view=diff&rev=446616&r1=446615&r2=446616
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
Fri Sep 15 07:14:14 2006
@@ -68,6 +68,36 @@
         return new Point(mwb.width >> 1, mwb.height >> 1);
     }
 
+    public void preferLocaleFonts() {
+        // Note: API specification says following:
+        // "The actual change in font rendering behavior resulting
+        // from a call to this method is implementation dependent;
+        // it may have no effect at all." So, doing nothing is an
+        // acceptable behavior for this method.
+
+        // For now FontManager uses 1.4 font.properties scheme for font mapping, so
+        // this method doesn't make any sense. The implementation of this method
+        // which will influence font mapping is postponed until
+        // 1.5 mapping scheme not implemented.
+
+        // todo - Implement non-default behavior with 1.5 font mapping scheme
+    }
+
+    public void preferProportionalFonts() {
+        // Note: API specification says following:
+        // "The actual change in font rendering behavior resulting
+        // from a call to this method is implementation dependent;
+        // it may have no effect at all." So, doing nothing is an
+        // acceptable behavior for this method.
+
+        // For now FontManager uses 1.4 font.properties scheme for font mapping, so
+        // this method doesn't make any sense. The implementation of this method
+        // which will influence font mapping is postponed until
+        // 1.5 mapping scheme not implemented.
+
+        // todo - Implement non-default behavior with 1.5 font mapping scheme
+    }
+
     public abstract Graphics2D createGraphics(BufferedImage bufferedImage);
 
     public abstract Font[] getAllFonts();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java?view=diff&rev=446616&r1=446615&r2=446616
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
Fri Sep 15 07:14:14 2006
@@ -40,6 +40,10 @@
 
     public static final int SCALE_AREA_AVERAGING = 16;
 
+    protected float accelerationPriority = 0.5f;
+
+    private static ImageCapabilities capabilities = new ImageCapabilities(false);
+
     public abstract Object getProperty(String name, ImageObserver observer);
 
     public abstract ImageProducer getSource();
@@ -63,5 +67,20 @@
 
     public abstract void flush();
 
+    public float getAccelerationPriority() {
+        return accelerationPriority;
+    }
+
+    public void setAccelerationPriority(float priority) {
+        if (priority < 0 || priority > 1) {
+            throw new IllegalArgumentException("Priority must be a value between 0 and 1,
inclusive");
+        }
+        accelerationPriority = priority;
+    }
+
+    public ImageCapabilities getCapabilities(GraphicsConfiguration gc) {
+        // Note: common image is not accelerated.
+        return capabilities;
+    }
 }
 



Mime
View raw message