xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dewe...@apache.org
Subject cvs commit: xml-batik/sources/org/apache/batik/ext/awt/image GraphicsUtil.java
Date Sat, 02 Mar 2002 21:53:11 GMT
deweese     02/03/02 13:53:11

  Modified:    sources/org/apache/batik/ext/awt/image GraphicsUtil.java
  Log:
  Fixed normal code path for new Mac OS X JVM (is now in line with
  most of the rest of code for which drawImage it uses).
  
  Revision  Changes    Path
  1.24      +9 -11     xml-batik/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
  
  Index: GraphicsUtil.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- GraphicsUtil.java	2 Jan 2002 21:21:16 -0000	1.23
  +++ GraphicsUtil.java	2 Mar 2002 21:53:11 -0000	1.24
  @@ -66,13 +66,10 @@
    * implementations.
    *
    * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
  - * @version $Id: GraphicsUtil.java,v 1.23 2002/01/02 21:21:16 deweese Exp $
  + * @version $Id: GraphicsUtil.java,v 1.24 2002/03/02 21:53:11 deweese Exp $
    */
   public class GraphicsUtil {
   
  -    public static boolean useMacOSXHacks = 
  -	("Mac OS X".equals(System.getProperty("os.name")));
  -
       public static AffineTransform IDENTITY = new AffineTransform();
   
       /**
  @@ -286,7 +283,7 @@
               // System.out.println("Starting Draw: " + cr);
               // long startTime = System.currentTimeMillis();
   
  -            boolean useDrawRenderedImage = useMacOSXHacks;
  +            boolean useDrawRenderedImage = false;
   
               SampleModel srcSM = cr.getSampleModel();
               if ((srcSM.getWidth()*srcSM.getHeight()) >
  @@ -387,16 +384,17 @@
                               System.out.println("IR: "      + iR);
                           }
   
  -                        AffineTransform trans;
  -                        trans = AffineTransform.getTranslateInstance(iR.x, 
  -                                                                     iR.y);
  +                        // For some reason using the transform version
  +                        // causes a gStackUnderflow error but if I just 
  +                        // use the drawImage with an x & y it works.
  +                        g2d.drawImage(subBI, iR.x, iR.y, null);
  +                        // AffineTransform trans 
  +                        //  = AffineTransform.getTranslateInstance(iR.x, iR.y);
  +                        // g2d.drawImage(subBI, trans, null);
   
                           // String label = "sub [" + x + ", " + y + "]: ";
                           // org.ImageDisplay.showImage
                           //     (label, subBI);
  -
  -                        g2d.drawImage(subBI, trans, null);
  -                        // big2d.fillRect(0, 0, tw, th);
                       }
                       xStep = -xStep; // Reverse directions.
                       xloc += xStep;   // Get back in bounds.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Mime
View raw message