[BUG] Morph cleaning background problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[BUG] Morph cleaning background problem

Stéphane Ducasse
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?


 

http://code.google.com/p/pharo/issues/detail?id=1078

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Picture 8.png (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [BUG] Morph cleaning background problem

Henrik Sperre Johansen
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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [BUG] Morph cleaning background problem

Stéphane Ducasse
Thanks it works :)

http://code.google.com/p/pharo/issues/detail?id=1079


On Aug 20, 2009, at 11:10 AM, Henrik Johansen wrote:

> 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
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project