I fixed the texture for the Graphics2D version of MetalUtils. The metal
pattern should now be drawn using textures when in Graphics2D mode (I
assume that this is faster than drawing the pattern 'manually').

2005-11-15  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/plaf/metal/MetalUtils.java
        (fillMetalPattern2D): Fixed the texture width.
        (initializePattern): Made texture transparent.

/Roman
Index: javax/swing/plaf/metal/MetalUtils.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalUtils.java,v
retrieving revision 1.5
diff -u -r1.5 MetalUtils.java
--- javax/swing/plaf/metal/MetalUtils.java	19 Oct 2005 13:46:03 -0000	1.5
+++ javax/swing/plaf/metal/MetalUtils.java	15 Nov 2005 13:57:36 -0000
@@ -129,7 +129,7 @@
 
     // Prepare the texture.
     TexturePaint texture =
-      new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 2.));
+      new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 4.));
     g2d.setPaint(texture);
     g2d.fillRect(x, y, w, h);
   }
@@ -139,7 +139,7 @@
    */
   static void initializePattern(Color light, Color dark)
   {
-    pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB);
+    pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB);
     lightColor = light;
     darkColor = dark;
     Graphics g = pattern2D.getGraphics();
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to