/[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.47 by fitzsim, Sat Sep 10 01:16:34 2005 UTC revision 1.48 by fitzsim, Sat Sep 10 05:04:31 2005 UTC
# Line 107  public class GdkGraphics2D extends Graph Line 107  public class GdkGraphics2D extends Graph
107      if (Configuration.INIT_LOAD_LIBRARY)      if (Configuration.INIT_LOAD_LIBRARY)
108        System.loadLibrary("gtkpeer");        System.loadLibrary("gtkpeer");
109    
110      if (GtkToolkit.useGraphics2D ())      initStaticState();
       initStaticState();  
     else  
       {  
         System.err.println ("Attempted to instantiate GdkGraphics2D"  
                             + " but Graphics2D not enabled.  Try again with"  
                             + " -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D");  
         System.exit (1);  
       }  
111    }    }
112        
113    static native void initStaticState();    static native void initStaticState();
# Line 165  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 208  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 223  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())

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

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