/[classpath]/classpath/gnu/java/awt/peer/qt/QtGraphics.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/qt/QtGraphics.java

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

revision 1.2 by smarothy, Tue Aug 16 23:22:09 2005 UTC revision 1.3 by smarothy, Tue Aug 23 02:13:48 2005 UTC
# Line 158  public abstract class QtGraphics extends Line 158  public abstract class QtGraphics extends
158      setTransform( current );      setTransform( current );
159    }    }
160    
161    // NOTE: Image here must be a QImage or wrapper!    protected native void initImage(QtImage image);  
162    protected native void initImage(Image image);      protected native void initVolatileImage(QtVolatileImage image);  
163    
164    // Creates a new native QPainter object on the same context.    // Creates a new native QPainter object on the same context.
165    private native void cloneNativeContext( QtGraphics parent );    private native void cloneNativeContext( QtGraphics parent );
# Line 208  public abstract class QtGraphics extends Line 208  public abstract class QtGraphics extends
208    
209    public void setColor(Color c)    public void setColor(Color c)
210    {    {
211      this.color = c;      if( c == null )
212          c = Color.white;
213        this.color = c;
214      int alpha = (int)(c.getAlpha() * currentAlpha);      int alpha = (int)(c.getAlpha() * currentAlpha);
215      setColor(c.getRed(), c.getGreen(), c.getBlue(), alpha);      setColor(c.getRed(), c.getGreen(), c.getBlue(), alpha);
216    }    }
# Line 252  public abstract class QtGraphics extends Line 254  public abstract class QtGraphics extends
254    
255    public void setFont(Font font)    public void setFont(Font font)
256    {    {
257        if( font == null )
258          return;
259      this.font = font;      this.font = font;
260      if(font.getPeer() != null && font.getPeer() instanceof QtFontPeer)      if(font.getPeer() != null && font.getPeer() instanceof QtFontPeer)
261        setFontNative( (QtFontPeer)font.getPeer() );        setFontNative( (QtFontPeer)font.getPeer() );

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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