/[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.2.10 by gnu_andrew, Sat Sep 10 15:31:37 2005 UTC revision 1.15.2.11 by gnu_andrew, Tue Sep 20 18:46:23 2005 UTC
# Line 101  public class GdkGraphics2D extends Graph Line 101  public class GdkGraphics2D extends Graph
101    static    static
102    {    {
103      if (! Configuration.GTK_CAIRO_ENABLED)      if (! Configuration.GTK_CAIRO_ENABLED)
104        throw new Error("Grahics2D not implemented. "        throw new Error("Graphics2D not implemented. "
105                        + "Cairo was not found or disabled at configure time");                        + "Cairo was not found or disabled at configure time");
106    
107      if (Configuration.INIT_LOAD_LIBRARY)      if (Configuration.INIT_LOAD_LIBRARY)
# Line 157  public class GdkGraphics2D extends Graph Line 157  public class GdkGraphics2D extends Graph
157      return new GdkGraphics2D(width, height);      return new GdkGraphics2D(width, height);
158    }    }
159    
160      private void fail_g2d ()
161      {
162        System.err.println ("Attempted to instantiate GdkGraphics2D"
163                            + " but Graphics2D not enabled.  Try again with"
164                            + " -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D");
165        System.exit (1);
166      }
167    
168    GdkGraphics2D(GdkGraphics2D g)    GdkGraphics2D(GdkGraphics2D g)
169    {    {
170        if (!GtkToolkit.useGraphics2D ())
171          fail_g2d ();
172    
173      paint = g.paint;      paint = g.paint;
174      stroke = g.stroke;      stroke = g.stroke;
175      setRenderingHints(g.hints);      setRenderingHints(g.hints);
# Line 200  public class GdkGraphics2D extends Graph Line 211  public class GdkGraphics2D extends Graph
211    
212    GdkGraphics2D(int width, int height)    GdkGraphics2D(int width, int height)
213    {    {
214        if (!GtkToolkit.useGraphics2D ())
215          fail_g2d ();
216    
217      initState(width, height);      initState(width, height);
218    
219      setColor(Color.black);      setColor(Color.black);
# Line 215  public class GdkGraphics2D extends Graph Line 229  public class GdkGraphics2D extends Graph
229    
230    GdkGraphics2D(GtkComponentPeer component)    GdkGraphics2D(GtkComponentPeer component)
231    {    {
232        if (!GtkToolkit.useGraphics2D ())
233          fail_g2d ();
234    
235      this.component = component;      this.component = component;
236            
237      if (component.isRealized())      if (component.isRealized())
# Line 992  public class GdkGraphics2D extends Graph Line 1009  public class GdkGraphics2D extends Graph
1009      if (clip == null)      if (clip == null)
1010        {        {
1011          // Reset clipping.          // Reset clipping.
1012          Dimension d = component.awtComponent.getSize();          if (component != null)
1013          setClip(0, 0, d.width, d.height);            {
1014                Dimension d = component.awtComponent.getSize();
1015                setClip(0, 0, d.width, d.height);
1016              }
1017        }        }
1018      else      else
1019        {        {

Legend:
Removed from v.1.15.2.10  
changed lines
  Added in v.1.15.2.11

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