100 |
0x0000FF00, |
0x0000FF00, |
101 |
0x000000FF, |
0x000000FF, |
102 |
0xFF000000); |
0xFF000000); |
103 |
|
Vector painters; |
104 |
|
|
105 |
/** |
/** |
106 |
* Clears the image to RGBA 0 |
* Clears the image to RGBA 0 |
246 |
isLoaded = false; |
isLoaded = false; |
247 |
return; |
return; |
248 |
} |
} |
|
|
|
249 |
errorLoading = false; |
errorLoading = false; |
250 |
isLoaded = true; |
isLoaded = true; |
251 |
} |
} |
364 |
if (!isLoaded) |
if (!isLoaded) |
365 |
return null; |
return null; |
366 |
|
|
367 |
return new QtImageGraphics(this); |
QtImageGraphics qig = new QtImageGraphics(this); |
368 |
|
if( painters == null ) |
369 |
|
painters = new Vector(); |
370 |
|
painters.add( qig ); |
371 |
|
return qig; |
372 |
} |
} |
373 |
|
|
374 |
/** |
/** |
407 |
public void finalize() |
public void finalize() |
408 |
{ |
{ |
409 |
if (isLoaded) |
if (isLoaded) |
410 |
freeImage(); |
{ |
411 |
|
if( painters != null ) |
412 |
|
for(int i = 0; i < painters.size(); i++) |
413 |
|
((QtImageGraphics)painters.elementAt(i)).dispose(); |
414 |
|
freeImage(); |
415 |
|
} |
416 |
} |
} |
417 |
|
|
418 |
public void dispose() |
public void dispose() |
594 |
} |
} |
595 |
return false; |
return false; |
596 |
} |
} |
597 |
|
|
598 |
|
public String toString() |
599 |
|
{ |
600 |
|
return "QtImage [isLoaded="+isLoaded+", width="+width+", height="+height |
601 |
|
+"]"; |
602 |
|
} |
603 |
} |
} |