/[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.1.2.1 by gnu_andrew, Tue Aug 16 16:22:36 2005 UTC revision 1.1.2.2 by gnu_andrew, Sat Sep 10 15:31:38 2005 UTC
# Line 143  public abstract class QtGraphics extends Line 143  public abstract class QtGraphics extends
143    }    }
144    
145    public synchronized native void delete();    public synchronized native void delete();
146    public synchronized native void dispose();  
147      public void dispose()
148      {
149      }
150    
151    // ********************** etc *******************************    // ********************** etc *******************************
152    
# Line 155  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 179  public abstract class QtGraphics extends Line 182  public abstract class QtGraphics extends
182    private native void setFontNative(QtFontPeer font);    private native void setFontNative(QtFontPeer font);
183    private native QPainterPath getClipNative();    private native QPainterPath getClipNative();
184    
185    private void setAlpha(double alpha)    void setAlpha(double alpha)
186    {    {
187      currentAlpha = alpha;      currentAlpha = alpha;
188      setAlphaNative(currentAlpha);      setAlphaNative(currentAlpha);
# Line 205  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 249  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.1.2.1  
changed lines
  Added in v.1.1.2.2

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