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

Diff of /classpath/gnu/java/awt/peer/qt/QtImageGraphics.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 69  public class QtImageGraphics extends QtG Line 69  public class QtImageGraphics extends QtG
69        {        {
70          w = ((QtImage)image).width;          w = ((QtImage)image).width;
71          h = ((QtImage)image).height;          h = ((QtImage)image).height;
72            initImage((QtImage) image );
73            ((QtImage)image).putPainter( this );
74        }        }
75      else      else
76        {        {
77          w = ((QtVolatileImage)image).width;          w = ((QtVolatileImage)image).width;
78          h = ((QtVolatileImage)image).height;          h = ((QtVolatileImage)image).height;
79            initVolatileImage((QtVolatileImage) image );
80            ((QtVolatileImage)image).putPainter( this );
81        }        }
82    
     initImage( image );  
83      parentImage = image;      parentImage = image;
84      initialClip = new Rectangle( 0, 0, w, h );      initialClip = new Rectangle( 0, 0, w, h );
85      setClip( initialClip );      setClip( initialClip );
# Line 93  public class QtImageGraphics extends QtG Line 96  public class QtImageGraphics extends QtG
96    {    {
97      super( g );      super( g );
98      parentImage = g.parentImage;      parentImage = g.parentImage;
99      if( g.topParent == null )      if(parentImage instanceof QtImage)
100        topParent = g;        ((QtImage)parentImage).putPainter( this );
101      else      else
102        topParent = g.topParent;        ((QtVolatileImage)parentImage).putPainter( this );
     topParent.owners.push( this );  
103    }    }
104    
105    public void dispose()    public void dispose()
106    {    {
107      while(!owners.empty())      delete();
108        ((QtImageGraphics)owners.pop()).delete();      if( parentImage instanceof QtImage )
109          ((QtImage)parentImage).removePainter( this );
110        else
111          ((QtVolatileImage)parentImage).removePainter( this );
112    }    }
113    
   
114    /**    /**
115     * Create a copy of this context.     * Create a copy of this context.
116     */     */

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