/[classpath]/classpath/gnu/java/awt/peer/gtk/GdkGraphics.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GdkGraphics.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by mkoch, Fri Oct 8 22:49:27 2004 UTC revision 1.34 by mkoch, Wed Dec 1 16:22:44 2004 UTC
# Line 127  public class GdkGraphics extends Graphic Line 127  public class GdkGraphics extends Graphic
127      return new GdkGraphics (this);      return new GdkGraphics (this);
128    }    }
129    
 //    public Graphics create (int x, int y, int width, int height)  
 //    {  
 //      GdkGraphics g = new GdkGraphics (this);  
 //      g.translate (x, y);  
 //      g.clipRect (0, 0, width, height);  
   
 //      return g;  
 //    }  
     
130    native public void dispose ();    native public void dispose ();
131    
132    native void copyPixmap (Graphics g, int x, int y, int width, int height);    native void copyPixmap (Graphics g, int x, int y, int width, int height);
# Line 152  public class GdkGraphics extends Graphic Line 143  public class GdkGraphics extends Graphic
143    
144      if (img instanceof GtkOffScreenImage)      if (img instanceof GtkOffScreenImage)
145        {        {
146            int width = img.getWidth (null);
147            int height = img.getHeight (null);
148          copyPixmap (img.getGraphics (),          copyPixmap (img.getGraphics (),
149                      x, y, img.getWidth (null), img.getHeight (null));                      x, y, width, height);
150            // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
151            if (observer != null)
152              observer.imageUpdate (img,
153                                    ImageObserver.FRAMEBITS,
154                                    x, y, width, height);
155          return true;          return true;
156        }        }
157    
158      GtkImage image = (GtkImage) img;      GtkImage image = (GtkImage) img;
159      new GtkImagePainter (image, this, x, y, -1, -1, bgcolor);      new GtkImagePainter (image, this, x, y, -1, -1, bgcolor, observer);
160      return image.isLoaded ();      return image.isLoaded ();
161    }    }
162    
# Line 191  public class GdkGraphics extends Graphic Line 189  public class GdkGraphics extends Graphic
189          copyAndScalePixmap (img.getGraphics (), false, false,          copyAndScalePixmap (img.getGraphics (), false, false,
190                              0, 0, img.getWidth (null), img.getHeight (null),                              0, 0, img.getWidth (null), img.getHeight (null),
191                              x, y, width, height);                              x, y, width, height);
192            // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
193            if (observer != null)
194              observer.imageUpdate (img,
195                                    ImageObserver.FRAMEBITS,
196                                    x, y, width, height);
197          return true;          return true;
198        }        }
199    
200      GtkImage image = (GtkImage) img;      GtkImage image = (GtkImage) img;
201      new GtkImagePainter (image, this, x, y, width, height, bgcolor);      new GtkImagePainter (image, this, x, y, width, height, bgcolor, observer);
202      return image.isLoaded ();      return image.isLoaded ();
203    }    }
204    
# Line 275  public class GdkGraphics extends Graphic Line 278  public class GdkGraphics extends Graphic
278          copyAndScalePixmap (img.getGraphics (), x_flip, y_flip,          copyAndScalePixmap (img.getGraphics (), x_flip, y_flip,
279                              sx_start, sy_start, s_width, s_height,                              sx_start, sy_start, s_width, s_height,
280                              dx_start, dy_start, d_width, d_height);                              dx_start, dy_start, d_width, d_height);
281    
282            // FIXME: need to differentiate between SOMEBITS and FRAMEBITS.
283            if (observer != null)
284              observer.imageUpdate (img,
285                                    ImageObserver.FRAMEBITS,
286                                    dx_start, dy_start, d_width, d_height);
287          return true;          return true;
288        }        }
289    
290      GtkImage image = (GtkImage) img;      GtkImage image = (GtkImage) img;
291      new GtkImagePainter (image, this, dx1, dy1, dx2, dy2,      new GtkImagePainter (image, this, dx1, dy1, dx2, dy2,
292                           sx1, sy1, sx2, sy2, bgcolor);                           sx1, sy1, sx2, sy2, bgcolor, observer);
293      return image.isLoaded ();      return image.isLoaded ();
294    }    }
295    

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26