Yes.
The ClockMorph is not specified as transparent, thus is responsible
for redrawing it's entire extent.
It uses StringMorph's draw method though, and all that does is draw
the pixels in the appropriate color for the string to appear.
Try:
strMorph := (StringMorph contents: 'Hello world!') openInWorld.
strMorph contents: 'Hello warld-'.
and you will see the same behaviour as the clock.
Previously, all morphs below would be updated no matter whether the
one on top was opaque, so the code "worked".
To fix, you can either
- "Trick" it bysetting a slightly Translucent fillStyle, f.ex. in
initialize method (this is the color of the text though, so slows down
text rendering as well)
- Do as other partially translucent morphs, and implement:
StringMorph>>areasRemainingToFill: aRectangle
^ Array with: aRectangle
Either way, the next underlaying Morph will then also redraw the
damagerect.
Cheers,
Henry
On Aug 20, 2009, at 10:39 37AM, Stéphane Ducasse wrote:
> Hi
>
> if you take a morph like ClockMorph you will see that once on the
> world it will get refresh problems.
> this is the same with an animatedMorph
> Here you see that the current gif is displayed but that the
> background was not cleaned up
> Henrik may be this is related to your invalidateDamage changes?
>
>
> <Picture 8.png>
> http://code.google.com/p/pharo/issues/detail?id=1078
>
> Stef_______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project