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

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

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

revision 1.15 by craig, Fri Jul 30 16:43:18 2004 UTC revision 1.16 by mark, Sun Sep 5 15:02:51 2004 UTC
# Line 85  public class GdkGraphics2D extends Graph Line 85  public class GdkGraphics2D extends Graph
85    private RenderingHints hints;    private RenderingHints hints;
86    private BufferedImage bimage;    private BufferedImage bimage;
87    
88      private Composite comp;
89    
90    private Stack stateStack;    private Stack stateStack;
91        
92    native private void initState (GtkComponentPeer component);    native private void initState (GtkComponentPeer component);
# Line 268  public class GdkGraphics2D extends Graph Line 270  public class GdkGraphics2D extends Graph
270          private Shape clip;          private Shape clip;
271          private AffineTransform transform;          private AffineTransform transform;
272          private Font font;            private Font font;  
273            private Composite comp;
274          DrawState (GdkGraphics2D g)          DrawState (GdkGraphics2D g)
275          {          {
276              this.paint = g.paint;              this.paint = g.paint;
# Line 278  public class GdkGraphics2D extends Graph Line 281  public class GdkGraphics2D extends Graph
281              if (g.transform != null)              if (g.transform != null)
282                  this.transform = (AffineTransform) g.transform.clone();                  this.transform = (AffineTransform) g.transform.clone();
283              this.font = g.font;              this.font = g.font;
284                this.comp = g.comp;
285          }          }
286          public void restore(GdkGraphics2D g)          public void restore(GdkGraphics2D g)
287          {          {
# Line 288  public class GdkGraphics2D extends Graph Line 292  public class GdkGraphics2D extends Graph
292              g.clip = this.clip;              g.clip = this.clip;
293              g.transform = this.transform;              g.transform = this.transform;
294              g.font = this.font;              g.font = this.font;
295                g.comp = this.comp;
296          }          }
297      }      }
298            
# Line 771  public class GdkGraphics2D extends Graph Line 776  public class GdkGraphics2D extends Graph
776    
777    public void setColor (Color c)    public void setColor (Color c)
778    {    {
779        if (c == null)
780          c = Color.BLACK;
781        
782      fg = c;      fg = c;
783      paint = c;      paint = c;
784      cairoSetRGBColor (fg.getRed() / 255.0,      cairoSetRGBColor (fg.getRed() / 255.0,
# Line 1259  public class GdkGraphics2D extends Graph Line 1267  public class GdkGraphics2D extends Graph
1267    
1268    public void setComposite(Composite comp)    public void setComposite(Composite comp)
1269    {    {
1270        this.comp = comp;
1271    
1272      if (comp instanceof AlphaComposite)      if (comp instanceof AlphaComposite)
1273        {        {
1274          AlphaComposite a = (AlphaComposite) comp;          AlphaComposite a = (AlphaComposite) comp;
# Line 1345  public class GdkGraphics2D extends Graph Line 1355  public class GdkGraphics2D extends Graph
1355    
1356    public Composite getComposite()    public Composite getComposite()
1357    {    {
1358      throw new java.lang.UnsupportedOperationException ();      if (comp == null)
1359          return AlphaComposite.SrcOver;
1360        else
1361          return comp;
1362    }    }
1363    
1364    public FontRenderContext getFontRenderContext ()    public FontRenderContext getFontRenderContext ()

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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