93 |
{ |
{ |
94 |
super( g ); |
super( g ); |
95 |
parentImage = g.parentImage; |
parentImage = g.parentImage; |
96 |
if( g.topParent == null ) |
if( parentImage instanceof QtImage ) |
97 |
topParent = g; |
((QtImage)parentImage).painters.add( this ); |
|
else |
|
|
topParent = g.topParent; |
|
|
topParent.owners.push( this ); |
|
98 |
} |
} |
99 |
|
|
100 |
public void dispose() |
public void dispose() |
101 |
{ |
{ |
102 |
while(!owners.empty()) |
delete(); |
|
((QtImageGraphics)owners.pop()).delete(); |
|
103 |
} |
} |
104 |
|
|
|
|
|
105 |
/** |
/** |
106 |
* Create a copy of this context. |
* Create a copy of this context. |
107 |
*/ |
*/ |