Shadow in Watery2

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

Shadow in Watery2

Marcus Denker
Gary,

Watery2 looks better and better :-) Great!

One question regarding the shadow: Now the active window has
a translucent shadow (like macos), very nice.

But it's turned off and replaced with the hard non-translucend
Morphic shadow while moving the window.
Would it be possible to render the same shadow, even wen picking
up windows? This would result in a much smoother apperance, and I
think it even would feel faster.

        Marcus

--
Marcus Denker  --  [hidden email]
http://www.marcusdenker.de


_______________________________________________
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: Shadow in Watery2

Igor Stasenko
2009/2/21 Marcus Denker <[hidden email]>:

> Gary,
>
> Watery2 looks better and better :-) Great!
>
> One question regarding the shadow: Now the active window has
> a translucent shadow (like macos), very nice.
>
> But it's turned off and replaced with the hard non-translucend
> Morphic shadow while moving the window.
> Would it be possible to render the same shadow, even wen picking
> up windows? This would result in a much smoother apperance, and I
> think it even would feel faster.
>
Good luck with that.. For shadow when picking up responds the hand morph..
There is quite sophisticated logic which caching the morph appearance
when its in hand.. along with shadow.
I tried to reproduce this effect on my GLCanvas, but found it
impossible to do without support of render buffers extension :)

>        Marcus
>
> --
> Marcus Denker  --  [hidden email]
> http://www.marcusdenker.de
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Shadow in Watery2

Gary Chambers-4
Yeah, the ordinary drop shadow was quite simple to implement.
Hand-grabbed drop shadows are altogether much nastier!
Not impossible but would require some evil hacking.

Regards, Gary

----- Original Message -----
From: "Igor Stasenko" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, February 21, 2009 1:58 PM
Subject: Re: [Pharo-project] Shadow in Watery2


> 2009/2/21 Marcus Denker <[hidden email]>:
>> Gary,
>>
>> Watery2 looks better and better :-) Great!
>>
>> One question regarding the shadow: Now the active window has
>> a translucent shadow (like macos), very nice.
>>
>> But it's turned off and replaced with the hard non-translucend
>> Morphic shadow while moving the window.
>> Would it be possible to render the same shadow, even wen picking
>> up windows? This would result in a much smoother apperance, and I
>> think it even would feel faster.
>>
> Good luck with that.. For shadow when picking up responds the hand morph..
> There is quite sophisticated logic which caching the morph appearance
> when its in hand.. along with shadow.
> I tried to reproduce this effect on my GLCanvas, but found it
> impossible to do without support of render buffers extension :)
>
>>        Marcus
>>
>> --
>> Marcus Denker  --  [hidden email]
>> http://www.marcusdenker.de
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> 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: Shadow in Watery2

Rob Rothwell
For that, I would ask "is it worth it?"  How many users are just going to turn on the fastDragWindowForMorphic preference anyway?!

For some reason that little delay when you grab a window to move it always prompts me to do so!

Just my thought on the matter...

Take care,

Rob

On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]> wrote:
Yeah, the ordinary drop shadow was quite simple to implement.
Hand-grabbed drop shadows are altogether much nastier!
Not impossible but would require some evil hacking.

Regards, Gary

----- Original Message -----
From: "Igor Stasenko" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, February 21, 2009 1:58 PM
Subject: Re: [Pharo-project] Shadow in Watery2


> 2009/2/21 Marcus Denker <[hidden email]>:
>> Gary,
>>
>> Watery2 looks better and better :-) Great!
>>
>> One question regarding the shadow: Now the active window has
>> a translucent shadow (like macos), very nice.
>>
>> But it's turned off and replaced with the hard non-translucend
>> Morphic shadow while moving the window.
>> Would it be possible to render the same shadow, even wen picking
>> up windows? This would result in a much smoother apperance, and I
>> think it even would feel faster.
>>
> Good luck with that.. For shadow when picking up responds the hand morph..
> There is quite sophisticated logic which caching the morph appearance
> when its in hand.. along with shadow.
> I tried to reproduce this effect on my GLCanvas, but found it
> impossible to do without support of render buffers extension :)
>
>>        Marcus
>>
>> --
>> Marcus Denker  --  [hidden email]
>> http://www.marcusdenker.de
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Shadow in Watery2

Igor Stasenko
2009/2/22 Rob Rothwell <[hidden email]>:
> For that, I would ask "is it worth it?"  How many users are just going to
> turn on the fastDragWindowForMorphic preference anyway?!
>
> For some reason that little delay when you grab a window to move it always
> prompts me to do so!
>
> Just my thought on the matter...
>
Well, of course its not worth doing. On my place, i would delete all
shadowing logic/support at all :)

But for keeping consistency , i think this is the right way to make
shadows working similar for all cases.

> Take care,
>
> Rob
>
> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]>
> wrote:
>>
>> Yeah, the ordinary drop shadow was quite simple to implement.
>> Hand-grabbed drop shadows are altogether much nastier!
>> Not impossible but would require some evil hacking.
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Igor Stasenko" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Saturday, February 21, 2009 1:58 PM
>> Subject: Re: [Pharo-project] Shadow in Watery2
>>
>>
>> > 2009/2/21 Marcus Denker <[hidden email]>:
>> >> Gary,
>> >>
>> >> Watery2 looks better and better :-) Great!
>> >>
>> >> One question regarding the shadow: Now the active window has
>> >> a translucent shadow (like macos), very nice.
>> >>
>> >> But it's turned off and replaced with the hard non-translucend
>> >> Morphic shadow while moving the window.
>> >> Would it be possible to render the same shadow, even wen picking
>> >> up windows? This would result in a much smoother apperance, and I
>> >> think it even would feel faster.
>> >>
>> > Good luck with that.. For shadow when picking up responds the hand
>> > morph..
>> > There is quite sophisticated logic which caching the morph appearance
>> > when its in hand.. along with shadow.
>> > I tried to reproduce this effect on my GLCanvas, but found it
>> > impossible to do without support of render buffers extension :)
>> >
>> >>        Marcus
>> >>
>> >> --
>> >> Marcus Denker  --  [hidden email]
>> >> http://www.marcusdenker.de
>> >>
>> >>
>> >> _______________________________________________
>> >> Pharo-project mailing list
>> >> [hidden email]
>> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >>
>> >
>> >
>> >
>> > --
>> > Best regards,
>> > Igor Stasenko AKA sig.
>> >
>> > _______________________________________________
>> > 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
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Shadow in Watery2

Alexandre Bergel
In reply to this post by Rob Rothwell
If this would help grabbing and dragging windows faster, I would use it.

Alexandre


On 22 Feb 2009, at 14:43, Rob Rothwell wrote:

> For that, I would ask "is it worth it?"  How many users are just  
> going to turn on the fastDragWindowForMorphic preference anyway?!
>
> For some reason that little delay when you grab a window to move it  
> always prompts me to do so!
>
> Just my thought on the matter...
>
> Take care,
>
> Rob
>
> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]
> > wrote:
> Yeah, the ordinary drop shadow was quite simple to implement.
> Hand-grabbed drop shadows are altogether much nastier!
> Not impossible but would require some evil hacking.
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Igor Stasenko" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, February 21, 2009 1:58 PM
> Subject: Re: [Pharo-project] Shadow in Watery2
>
>
> > 2009/2/21 Marcus Denker <[hidden email]>:
> >> Gary,
> >>
> >> Watery2 looks better and better :-) Great!
> >>
> >> One question regarding the shadow: Now the active window has
> >> a translucent shadow (like macos), very nice.
> >>
> >> But it's turned off and replaced with the hard non-translucend
> >> Morphic shadow while moving the window.
> >> Would it be possible to render the same shadow, even wen picking
> >> up windows? This would result in a much smoother apperance, and I
> >> think it even would feel faster.
> >>
> > Good luck with that.. For shadow when picking up responds the hand  
> morph..
> > There is quite sophisticated logic which caching the morph  
> appearance
> > when its in hand.. along with shadow.
> > I tried to reproduce this effect on my GLCanvas, but found it
> > impossible to do without support of render buffers extension :)
> >
> >>        Marcus
> >>
> >> --
> >> Marcus Denker  --  [hidden email]
> >> http://www.marcusdenker.de
> >>
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [hidden email]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >
> >
> >
> > --
> > Best regards,
> > Igor Stasenko AKA sig.
> >
> > _______________________________________________
> > 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

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
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: Shadow in Watery2

Gary Chambers-4
In reply to this post by Marcus Denker
Thanks Markus... glad people like it.

As Igor suggests, dropShadow handling in Canvas and HandMorph would be
better located elsewhere to make things cleaner.

Now, if only I had the time to redo Morphic layout behaviour to work
accurately...

Regards, Gary

----- Original Message -----
From: "Marcus Denker" <[hidden email]>
To: "Pharo Mailing List" <[hidden email]>
Sent: Saturday, February 21, 2009 1:15 PM
Subject: [Pharo-project] Shadow in Watery2


> Gary,
>
> Watery2 looks better and better :-) Great!
>
> One question regarding the shadow: Now the active window has
> a translucent shadow (like macos), very nice.
>
> But it's turned off and replaced with the hard non-translucend
> Morphic shadow while moving the window.
> Would it be possible to render the same shadow, even wen picking
> up windows? This would result in a much smoother apperance, and I
> think it even would feel faster.
>
> Marcus
>
> --
> Marcus Denker  --  [hidden email]
> http://www.marcusdenker.de
>
>
> _______________________________________________
> 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
|

Just downloaded pharo

tblanchard
And WOW the new UI skins are beautiful!

So pretty, I almost hate to ask about integrating the mythical  
ffenesteri native window support that I've never been able to make  
work (which would obsolete all that work, but would help squeak fit  
into the real world better).

-Todd Blanchard

_______________________________________________
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: Just downloaded pharo

Alexandre Bergel
Thanks Todd for your nice words, and thanks (one more time!) to the  
Pinesoft crew to make it happen.

Cheers,
Alexandre


On 22 Feb 2009, at 22:31, Todd Blanchard wrote:

> And WOW the new UI skins are beautiful!
>
> So pretty, I almost hate to ask about integrating the mythical
> ffenesteri native window support that I've never been able to make
> work (which would obsolete all that work, but would help squeak fit
> into the real world better).
>
> -Todd Blanchard
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
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: Just downloaded pharo

Michael Rueger-6
In reply to this post by tblanchard
Todd Blanchard wrote:
> And WOW the new UI skins are beautiful!
>
> So pretty, I almost hate to ask about integrating the mythical  
> ffenesteri native window support that I've never been able to make  
> work (which would obsolete all that work, but would help squeak fit  
> into the real world better).

The event support is part of the new VMs and native windows per se
wouldn't obsolete the current UI work. It is rather difficult though to
make Morphic work with multiple windows AFAIK.

Michael

_______________________________________________
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: Just downloaded pharo

Igor Stasenko
2009/2/22 Michael Rueger <[hidden email]>:

> Todd Blanchard wrote:
>> And WOW the new UI skins are beautiful!
>>
>> So pretty, I almost hate to ask about integrating the mythical
>> ffenesteri native window support that I've never been able to make
>> work (which would obsolete all that work, but would help squeak fit
>> into the real world better).
>
> The event support is part of the new VMs and native windows per se
> wouldn't obsolete the current UI work. It is rather difficult though to
> make Morphic work with multiple windows AFAIK.
>
Indeed. It is difficult,  but possible :)
I want to refactor VM code to make all windowing stuff be exclusively
driven from language side.
So, when you run:
squeak -headless myimage.image

and -headless flag is handled not by VM itself, but by language side.
So, you can ignore such flag, or can honor it - all is in your hands.

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


--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Just downloaded pharo

Michael Rueger-6
Igor Stasenko wrote:

> Indeed. It is difficult,  but possible :)
> I want to refactor VM code to make all windowing stuff be exclusively
> driven from language side.
> So, when you run:
> squeak -headless myimage.image
>
> and -headless flag is handled not by VM itself, but by language side.
> So, you can ignore such flag, or can honor it - all is in your hands.

Well, while you are at it ;-) everything related to display, input and
clipboard should be moved out of the core VM into plugins so one could
build a truely headless VM e.g. for running scripts.

Michael

_______________________________________________
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: Just downloaded pharo

Igor Stasenko
2009/2/23 Michael Rueger <[hidden email]>:

> Igor Stasenko wrote:
>
>> Indeed. It is difficult,  but possible :)
>> I want to refactor VM code to make all windowing stuff be exclusively
>> driven from language side.
>> So, when you run:
>> squeak -headless myimage.image
>>
>> and -headless flag is handled not by VM itself, but by language side.
>> So, you can ignore such flag, or can honor it - all is in your hands.
>
> Well, while you are at it ;-) everything related to display, input and
> clipboard should be moved out of the core VM into plugins so one could
> build a truely headless VM e.g. for running scripts.
>
exactly, that's my point.
In a longer perspective, i'd also would like to be able to build VM as
a library,
so one can embed it into own project.

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



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
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: Just downloaded pharo

Stéphane Ducasse
Yes I want that too santaIgor :)

Stef

On Feb 23, 2009, at 7:20 AM, Igor Stasenko wrote:

> 2009/2/23 Michael Rueger <[hidden email]>:
>> Igor Stasenko wrote:
>>
>>> Indeed. It is difficult,  but possible :)
>>> I want to refactor VM code to make all windowing stuff be  
>>> exclusively
>>> driven from language side.
>>> So, when you run:
>>> squeak -headless myimage.image
>>>
>>> and -headless flag is handled not by VM itself, but by language  
>>> side.
>>> So, you can ignore such flag, or can honor it - all is in your  
>>> hands.
>>
>> Well, while you are at it ;-) everything related to display, input  
>> and
>> clipboard should be moved out of the core VM into plugins so one  
>> could
>> build a truely headless VM e.g. for running scripts.
>>
> exactly, that's my point.
> In a longer perspective, i'd also would like to be able to build VM as
> a library,
> so one can embed it into own project.
>
>> Michael
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> 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: Shadow in Watery2

Gary Chambers-4
In reply to this post by Alexandre Bergel
Latest Polymorph has theme-handled drop shadow support when carried by hand.

Doesn't help grabbing faster since for the cached form it needs to draw the
window on the cached form and also redraw the world without the window as a
submorph. Dragging more complex windows will always be slower to initially
respond, unfortunately.

Regards, Gary

----- Original Message -----
From: "Alexandre Bergel" <[hidden email]>
To: <[hidden email]>; <[hidden email]>
Sent: Sunday, February 22, 2009 1:51 PM
Subject: Re: [Pharo-project] Shadow in Watery2


> If this would help grabbing and dragging windows faster, I would use it.
>
> Alexandre
>
>
> On 22 Feb 2009, at 14:43, Rob Rothwell wrote:
>
>> For that, I would ask "is it worth it?"  How many users are just
>> going to turn on the fastDragWindowForMorphic preference anyway?!
>>
>> For some reason that little delay when you grab a window to move it
>> always prompts me to do so!
>>
>> Just my thought on the matter...
>>
>> Take care,
>>
>> Rob
>>
>> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]
>> > wrote:
>> Yeah, the ordinary drop shadow was quite simple to implement.
>> Hand-grabbed drop shadows are altogether much nastier!
>> Not impossible but would require some evil hacking.
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Igor Stasenko" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Saturday, February 21, 2009 1:58 PM
>> Subject: Re: [Pharo-project] Shadow in Watery2
>>
>>
>> > 2009/2/21 Marcus Denker <[hidden email]>:
>> >> Gary,
>> >>
>> >> Watery2 looks better and better :-) Great!
>> >>
>> >> One question regarding the shadow: Now the active window has
>> >> a translucent shadow (like macos), very nice.
>> >>
>> >> But it's turned off and replaced with the hard non-translucend
>> >> Morphic shadow while moving the window.
>> >> Would it be possible to render the same shadow, even wen picking
>> >> up windows? This would result in a much smoother apperance, and I
>> >> think it even would feel faster.
>> >>
>> > Good luck with that.. For shadow when picking up responds the hand
>> morph..
>> > There is quite sophisticated logic which caching the morph
>> appearance
>> > when its in hand.. along with shadow.
>> > I tried to reproduce this effect on my GLCanvas, but found it
>> > impossible to do without support of render buffers extension :)
>> >
>> >>        Marcus
>> >>
>> >> --
>> >> Marcus Denker  --  [hidden email]
>> >> http://www.marcusdenker.de
>> >>
>> >>
>> >> _______________________________________________
>> >> Pharo-project mailing list
>> >> [hidden email]
>> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >>
>> >
>> >
>> >
>> > --
>> > Best regards,
>> > Igor Stasenko AKA sig.
>> >
>> > _______________________________________________
>> > 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
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> 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: Shadow in Watery2

Alexandre Bergel
Ok

Alexandre


On 24 Feb 2009, at 16:53, Gary Chambers wrote:

> Latest Polymorph has theme-handled drop shadow support when carried  
> by hand.
>
> Doesn't help grabbing faster since for the cached form it needs to  
> draw the
> window on the cached form and also redraw the world without the  
> window as a
> submorph. Dragging more complex windows will always be slower to  
> initially
> respond, unfortunately.
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Alexandre Bergel" <[hidden email]>
> To: <[hidden email]>; <[hidden email]>
> Sent: Sunday, February 22, 2009 1:51 PM
> Subject: Re: [Pharo-project] Shadow in Watery2
>
>
>> If this would help grabbing and dragging windows faster, I would  
>> use it.
>>
>> Alexandre
>>
>>
>> On 22 Feb 2009, at 14:43, Rob Rothwell wrote:
>>
>>> For that, I would ask "is it worth it?"  How many users are just
>>> going to turn on the fastDragWindowForMorphic preference anyway?!
>>>
>>> For some reason that little delay when you grab a window to move it
>>> always prompts me to do so!
>>>
>>> Just my thought on the matter...
>>>
>>> Take care,
>>>
>>> Rob
>>>
>>> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]
>>>> wrote:
>>> Yeah, the ordinary drop shadow was quite simple to implement.
>>> Hand-grabbed drop shadows are altogether much nastier!
>>> Not impossible but would require some evil hacking.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Igor Stasenko" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Saturday, February 21, 2009 1:58 PM
>>> Subject: Re: [Pharo-project] Shadow in Watery2
>>>
>>>
>>>> 2009/2/21 Marcus Denker <[hidden email]>:
>>>>> Gary,
>>>>>
>>>>> Watery2 looks better and better :-) Great!
>>>>>
>>>>> One question regarding the shadow: Now the active window has
>>>>> a translucent shadow (like macos), very nice.
>>>>>
>>>>> But it's turned off and replaced with the hard non-translucend
>>>>> Morphic shadow while moving the window.
>>>>> Would it be possible to render the same shadow, even wen picking
>>>>> up windows? This would result in a much smoother apperance, and I
>>>>> think it even would feel faster.
>>>>>
>>>> Good luck with that.. For shadow when picking up responds the hand
>>> morph..
>>>> There is quite sophisticated logic which caching the morph
>>> appearance
>>>> when its in hand.. along with shadow.
>>>> I tried to reproduce this effect on my GLCanvas, but found it
>>>> impossible to do without support of render buffers extension :)
>>>>
>>>>>       Marcus
>>>>>
>>>>> --
>>>>> Marcus Denker  --  [hidden email]
>>>>> http://www.marcusdenker.de
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- 
>>>>> project
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Igor Stasenko AKA sig.
>>>>
>>>> _______________________________________________
>>>> 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
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
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: UI dragging improvement? [was: Shadow in Watery2]

Henrik Sperre Johansen
In reply to this post by Gary Chambers-4
For me, dragging is pretty snappy once the cache has been created.
However, that doesn't happen till you actually move the window (ie.
after 5 pixels or so of mouse movement while holding down).
Did a small experiment moving cache updating to mouseUp/Down events
instead, felt snappier to me at least.
Bad thing is, I had to introduce things like:
- A setter for the cache.
- Direct manipulation of hand in SystemWindow mouseDown (at least I
didn't cross that boundry first :) )

Attached a changeset (based on 243core with PolyMorph-Widgets-gvc.52
merged in)
you can try, and merge in if you feel the gain worth the nastiness.
Otherwise feel free to reimplement in a better way :)

Cheers,
Henry

Gary Chambers skrev:

> Latest Polymorph has theme-handled drop shadow support when carried by hand.
>
> Doesn't help grabbing faster since for the cached form it needs to draw the
> window on the cached form and also redraw the world without the window as a
> submorph. Dragging more complex windows will always be slower to initially
> respond, unfortunately.
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Alexandre Bergel" <[hidden email]>
> To: <[hidden email]>; <[hidden email]>
> Sent: Sunday, February 22, 2009 1:51 PM
> Subject: Re: [Pharo-project] Shadow in Watery2
>
>
>  
>> If this would help grabbing and dragging windows faster, I would use it.
>>
>> Alexandre
>>
>>
>> On 22 Feb 2009, at 14:43, Rob Rothwell wrote:
>>
>>    
>>> For that, I would ask "is it worth it?"  How many users are just
>>> going to turn on the fastDragWindowForMorphic preference anyway?!
>>>
>>> For some reason that little delay when you grab a window to move it
>>> always prompts me to do so!
>>>
>>> Just my thought on the matter...
>>>
>>> Take care,
>>>
>>> Rob
>>>
>>> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers <[hidden email]
>>>      
>>>> wrote:
>>>>        
>>> Yeah, the ordinary drop shadow was quite simple to implement.
>>> Hand-grabbed drop shadows are altogether much nastier!
>>> Not impossible but would require some evil hacking.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Igor Stasenko" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Saturday, February 21, 2009 1:58 PM
>>> Subject: Re: [Pharo-project] Shadow in Watery2
>>>
>>>
>>>      
>>>> 2009/2/21 Marcus Denker <[hidden email]>:
>>>>        
>>>>> Gary,
>>>>>
>>>>> Watery2 looks better and better :-) Great!
>>>>>
>>>>> One question regarding the shadow: Now the active window has
>>>>> a translucent shadow (like macos), very nice.
>>>>>
>>>>> But it's turned off and replaced with the hard non-translucend
>>>>> Morphic shadow while moving the window.
>>>>> Would it be possible to render the same shadow, even wen picking
>>>>> up windows? This would result in a much smoother apperance, and I
>>>>> think it even would feel faster.
>>>>>
>>>>>          
>>>> Good luck with that.. For shadow when picking up responds the hand
>>>>        
>>> morph..
>>>      
>>>> There is quite sophisticated logic which caching the morph
>>>>        
>>> appearance
>>>      
>>>> when its in hand.. along with shadow.
>>>> I tried to reproduce this effect on my GLCanvas, but found it
>>>> impossible to do without support of render buffers extension :)
>>>>
>>>>        
>>>>>        Marcus
>>>>>
>>>>> --
>>>>> Marcus Denker  --  [hidden email]
>>>>> http://www.marcusdenker.de
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>          
>>>>
>>>> --
>>>> Best regards,
>>>> Igor Stasenko AKA sig.
>>>>
>>>> _______________________________________________
>>>> 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
>>>      
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
>  

'From Pharo0.1 of 16 May 2008 [Latest update: #10243] on 24 February 2009 at 8:04:22 pm'!

!HandMorph methodsFor: 'drawing' stamp: 'Henrik Sperre Johansen 2/24/2009 18:25'!
cacheCanvas: aCanvas
        cacheCanvas := aCanvas! !

!HandMorph methodsFor: 'drawing' stamp: 'Henrik Sperre Johansen 2/24/2009 20:03'!
updateCacheCanvas: aCanvas
        "Update the cached image of the morphs being held by this hand."

        "Note: The following is an attempt to quickly get out if there's no change"

        | subBnds rectList nPix |
        subBnds := Rectangle merging: (submorphs collect: [:m | m fullBounds]).
        rectList := damageRecorder invalidRectsFullBounds: subBnds.
        damageRecorder reset.
        (rectList isEmpty
                and: [cacheCanvas notNil and: [cacheCanvas extent = subBnds extent]])
                        ifTrue: [^self].

        "Always check for real translucency -- can't be cached in a form"
        self submorphsDo:
                        [:m |
                        m wantsToBeCachedByHand
                                ifFalse:
                                        [cacheCanvas := nil.
                                        cachedCanvasHasHoles := true.
                                        ^self]].
        (cacheCanvas extent ~= subBnds extent)
                ifTrue:
                        [cacheCanvas translateBy: subBnds origin negated
                                during: [:tempCanvas | self drawSubmorphsOn: tempCanvas].
                        self submorphsDo:
                                        [:m |
                                        (m areasRemainingToFill: subBnds) isEmpty
                                                ifTrue: [^cachedCanvasHasHoles := false]].
                        nPix := cacheCanvas form tallyPixelValues first.
                        "--> begin rounded corners hack <---"
                        cachedCanvasHasHoles := (nPix = 48
                                                and: [submorphs size = 1 and: [submorphs first wantsRoundedCorners]])
                                                        ifTrue: [false]
                                                        ifFalse: [nPix > 0].
                        "--> end rounded corners hack <---"
                        ^self].

        "incrementally update the cache canvas"
        cacheCanvas translateBy: subBnds origin negated
                during:
                        [:cc |
                        rectList do:
                                        [:r |
                                        cc clipBy: r
                                                during:
                                                        [:c |
                                                        c fillColor: Color transparent.
                                                        self drawSubmorphsOn: c]]]! !


!SystemWindow methodsFor: 'events' stamp: 'Henrik Sperre Johansen 2/24/2009 18:43'!
mouseUp: evt
        | cp |
        evt hand resourceJustLoaded.
        model windowActiveOnFirstClick ifTrue:
                ["Normally window takes control on first click.
                Need explicit transmission for first-click activity."
                cp _ evt cursorPoint.
                submorphs do: [:m | (m containsPoint: cp) ifTrue: [m mouseUp: evt]]]! !


_______________________________________________
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: UI dragging improvement? [was: Shadow in Watery2]

Henrik Sperre Johansen
And... of course there's a bug in it :)
Don't have time to fix right now, but basically, if you have a window
selected, then start dragging another window, the old windows' bounds
will be used. (ie: cache updating needs a little more refining)

Cheers,
Henry

Henrik Johansen skrev:

> For me, dragging is pretty snappy once the cache has been created.
> However, that doesn't happen till you actually move the window (ie.
> after 5 pixels or so of mouse movement while holding down).
> Did a small experiment moving cache updating to mouseUp/Down events
> instead, felt snappier to me at least.
> Bad thing is, I had to introduce things like:
> - A setter for the cache.
> - Direct manipulation of hand in SystemWindow mouseDown (at least I
> didn't cross that boundry first :) )
>
> Attached a changeset (based on 243core with PolyMorph-Widgets-gvc.52
> merged in)
> you can try, and merge in if you feel the gain worth the nastiness.
> Otherwise feel free to reimplement in a better way :)
>
> Cheers,
> Henry
>
> Gary Chambers skrev:
>> Latest Polymorph has theme-handled drop shadow support when carried
>> by hand.
>>
>> Doesn't help grabbing faster since for the cached form it needs to
>> draw the window on the cached form and also redraw the world without
>> the window as a submorph. Dragging more complex windows will always
>> be slower to initially respond, unfortunately.
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Alexandre Bergel"
>> <[hidden email]>
>> To: <[hidden email]>; <[hidden email]>
>> Sent: Sunday, February 22, 2009 1:51 PM
>> Subject: Re: [Pharo-project] Shadow in Watery2
>>
>>
>>  
>>> If this would help grabbing and dragging windows faster, I would use
>>> it.
>>>
>>> Alexandre
>>>
>>>
>>> On 22 Feb 2009, at 14:43, Rob Rothwell wrote:
>>>
>>>    
>>>> For that, I would ask "is it worth it?"  How many users are just
>>>> going to turn on the fastDragWindowForMorphic preference anyway?!
>>>>
>>>> For some reason that little delay when you grab a window to move it
>>>> always prompts me to do so!
>>>>
>>>> Just my thought on the matter...
>>>>
>>>> Take care,
>>>>
>>>> Rob
>>>>
>>>> On Sun, Feb 22, 2009 at 7:10 AM, Gary Chambers
>>>> <[hidden email]
>>>>      
>>>>> wrote:
>>>>>        
>>>> Yeah, the ordinary drop shadow was quite simple to implement.
>>>> Hand-grabbed drop shadows are altogether much nastier!
>>>> Not impossible but would require some evil hacking.
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message -----
>>>> From: "Igor Stasenko" <[hidden email]>
>>>> To: <[hidden email]>
>>>> Sent: Saturday, February 21, 2009 1:58 PM
>>>> Subject: Re: [Pharo-project] Shadow in Watery2
>>>>
>>>>
>>>>      
>>>>> 2009/2/21 Marcus Denker <[hidden email]>:
>>>>>        
>>>>>> Gary,
>>>>>>
>>>>>> Watery2 looks better and better :-) Great!
>>>>>>
>>>>>> One question regarding the shadow: Now the active window has
>>>>>> a translucent shadow (like macos), very nice.
>>>>>>
>>>>>> But it's turned off and replaced with the hard non-translucend
>>>>>> Morphic shadow while moving the window.
>>>>>> Would it be possible to render the same shadow, even wen picking
>>>>>> up windows? This would result in a much smoother apperance, and I
>>>>>> think it even would feel faster.
>>>>>>
>>>>>>          
>>>>> Good luck with that.. For shadow when picking up responds the hand
>>>>>        
>>>> morph..
>>>>      
>>>>> There is quite sophisticated logic which caching the morph
>>>>>        
>>>> appearance
>>>>      
>>>>> when its in hand.. along with shadow.
>>>>> I tried to reproduce this effect on my GLCanvas, but found it
>>>>> impossible to do without support of render buffers extension :)
>>>>>
>>>>>        
>>>>>>        Marcus
>>>>>>
>>>>>> --
>>>>>> Marcus Denker  --  [hidden email]
>>>>>> http://www.marcusdenker.de
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> [hidden email]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>>          
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko AKA sig.
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>      
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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


_______________________________________________
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
|

UI dragging improvement

Henrik Sperre Johansen
Had a look at drawWorld:submorphs:invalidAreasOn: today, the
"Experimental top-down drawing" there does not seem to be working
optimally.
Basically, when there's many windows behind one you're resizing, this
many times leads to ALL of them getting repainted.
Attached is a fix for this, so only the system window areas which are
visible and affected are updated.
It will not speed up cases when resizing a complex morph (like the
Changes Log), but helps when resizing simple ones with many other
windows in the background.
If anyone interested in faster resizing (without fastDragWindow) would
review the code/check if it helps them it'd be nice.
A simple test is to open up a couple system browsers, put them on top of
eachother, and resize a simple window (Like the "Welcome to Pharo"
window) over their bounds.
Then load the changes, and see if you notice a difference.
 
In a test i did (same windows open/resized, as described above), time
spent in drawWorld:submorphs:invalidAreasOn: was reduced from 86% to
65.7% after filing in changes.

If anyone with a better understanding of Morphic know if anything larger
than the clippingBounds is safe to use as default in
Morph>>areasRemainingToFill: , that would probably help as well.

Cheers,
Henry

'From Pharo0.1 of 16 May 2008 [Latest update: #10243] on 25 February 2009 at 2:30:25 pm'!

!Morph methodsFor: 'drawing' stamp: 'Henrik Sperre Johansen 2/25/2009 12:06'!
areasRemainingToFill: aRectangle
        "May be overridden by any subclasses with opaque regions"

        ^ Array withAll: (aRectangle areasOutside: self clippingBounds)! !


!WorldState methodsFor: 'update cycle' stamp: 'Henrik Sperre Johansen 2/25/2009 13:52'!
drawWorld: aWorld submorphs: submorphs invalidAreasOn: aCanvas
        "Redraw the damaged areas of the given canvas and clear the damage list. Return a collection of the areas that
were redrawn."

        | rectList c i n mm morphs rects rectToFill remnants remnantIntersects rect validList |
        rectList := damageRecorder invalidRectsFullBounds: aWorld viewBox.
        "sort by areas to draw largest portions first"
        rectList := rectList asArray sort: [:r1 :r2 | r1 area > r2 area].
        damageRecorder reset.
        n := submorphs size.
        morphs := OrderedCollection new: n * 2.
        rects := OrderedCollection new: n * 2.
        validList := OrderedCollection new: n * 2.
        rectList do:
                        [:dirtyRect |
                        dirtyRect allAreasOutsideList: validList
                                do:
                                        [:r |
                                        "Experimental top-down drawing --
                        Traverses top to bottom, stopping if the entire area is filled.
                        If only a single rectangle remains, then continue with the reduced rectangle."

                                        rectToFill := r.
                                        remnants := OrderedCollection with: r.
                                        i := 1.
                                        [remnants isEmpty or: [i > n]] whileFalse:
                                                        [mm := submorphs at: i.
                                                        ((remnantIntersects := remnants select: [:each | (mm fullBounds intersects: each)]) notEmpty and: [mm visible])
                                                                ifTrue:
                                                                        [morphs addLast: mm.
                                                                       
                                                                        rects addLast: (Rectangle merging: (remnantIntersects collect: [:each | mm fullBounds intersect: each])).
                                                                        remnants removeAll: remnantIntersects.
                                                                        remnantIntersects do: [:eachIntersect | remnants addAll: (mm areasRemainingToFill: eachIntersect)].
                                                                        remnants size = 1 ifTrue: [rectToFill := remnants first].
                                                                        remnants isEmpty ifTrue: [rectToFill := nil]].
                                                        i := i + 1].
                                        "Now paint from bottom to top, but using the reduced rectangles."
                                        rectToFill
                                                ifNotNil: [aWorld drawOn: (c := aCanvas copyClipRect: rectToFill)].
                                        [morphs isEmpty] whileFalse:
                                                        [(rect := rects removeLast) == rectToFill
                                                                ifFalse: [c := aCanvas copyClipRect: (rectToFill := rect)].
                                                        c fullDrawMorph: morphs removeLast].
                                        morphs reset.
                                        rects reset.
                                        validList add: r]].
        ^validList! !


_______________________________________________
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: UI dragging improvement

Marcus Denker
Hi,

cool stuff... I will have a look (as a morpic non-expert :-) after  
moving 900 books from switerland to germany saturday...).
One small thing: could you attach .gz or .zip version of the  
changeset? Some mail-clients are overly clever to show you
changeset not as attachments but as inline text.

        Marcus




On 25.02.2009, at 14:36, Henrik Johansen wrote:

> Had a look at drawWorld:submorphs:invalidAreasOn: today, the  
> "Experimental top-down drawing" there does not seem to be working  
> optimally.
> Basically, when there's many windows behind one you're resizing,  
> this many times leads to ALL of them getting repainted.
> Attached is a fix for this, so only the system window areas which  
> are visible and affected are updated.
> It will not speed up cases when resizing a complex morph (like the  
> Changes Log), but helps when resizing simple ones with many other  
> windows in the background.
> If anyone interested in faster resizing (without fastDragWindow)  
> would review the code/check if it helps them it'd be nice.
> A simple test is to open up a couple system browsers, put them on  
> top of eachother, and resize a simple window (Like the "Welcome to  
> Pharo" window) over their bounds.
> Then load the changes, and see if you notice a difference.
> In a test i did (same windows open/resized, as described above),  
> time spent in drawWorld:submorphs:invalidAreasOn: was reduced from  
> 86% to 65.7% after filing in changes.
>
> If anyone with a better understanding of Morphic know if anything  
> larger than the clippingBounds is safe to use as default in  
> Morph>>areasRemainingToFill: , that would probably help as well.
>
> Cheers,
> Henry
> 'From Pharo0.1 of 16 May 2008 [Latest update: #10243] on 25 February  
> 2009 at 2:30:25 pm'!
>
> !Morph methodsFor: 'drawing' stamp: 'Henrik Sperre Johansen  
> 2/25/2009 12:06'!
> areasRemainingToFill: aRectangle
> "May be overridden by any subclasses with opaque regions"
>
> ^ Array withAll: (aRectangle areasOutside: self clippingBounds)! !
>
>
> !WorldState methodsFor: 'update cycle' stamp: 'Henrik Sperre  
> Johansen 2/25/2009 13:52'!
> drawWorld: aWorld submorphs: submorphs invalidAreasOn: aCanvas
> "Redraw the damaged areas of the given canvas and clear the damage  
> list. Return a collection of the areas that
> were redrawn."
>
> | rectList c i n mm morphs rects rectToFill remnants  
> remnantIntersects rect validList |
> rectList := damageRecorder invalidRectsFullBounds: aWorld viewBox.
> "sort by areas to draw largest portions first"
> rectList := rectList asArray sort: [:r1 :r2 | r1 area > r2 area].
> damageRecorder reset.
> n := submorphs size.
> morphs := OrderedCollection new: n * 2.
> rects := OrderedCollection new: n * 2.
> validList := OrderedCollection new: n * 2.
> rectList do:
> [:dirtyRect |
> dirtyRect allAreasOutsideList: validList
> do:
> [:r |
> "Experimental top-down drawing --
> Traverses top to bottom, stopping if the entire area is filled.
> If only a single rectangle remains, then continue with the  
> reduced rectangle."
>
> rectToFill := r.
> remnants := OrderedCollection with: r.
> i := 1.
> [remnants isEmpty or: [i > n]] whileFalse:
> [mm := submorphs at: i.
> ((remnantIntersects := remnants select: [:each | (mm  
> fullBounds intersects: each)]) notEmpty and: [mm visible])
> ifTrue:
> [morphs addLast: mm.
>
> rects addLast: (Rectangle merging: (remnantIntersects  
> collect: [:each | mm fullBounds intersect: each])).
> remnants removeAll: remnantIntersects.
> remnantIntersects do: [:eachIntersect | remnants addAll:  
> (mm areasRemainingToFill: eachIntersect)].
> remnants size = 1 ifTrue: [rectToFill := remnants first].
> remnants isEmpty ifTrue: [rectToFill := nil]].
> i := i + 1].
> "Now paint from bottom to top, but using the reduced rectangles."
> rectToFill
> ifNotNil: [aWorld drawOn: (c := aCanvas copyClipRect:  
> rectToFill)].
> [morphs isEmpty] whileFalse:
> [(rect := rects removeLast) == rectToFill
> ifFalse: [c := aCanvas copyClipRect: (rectToFill := rect)].
> c fullDrawMorph: morphs removeLast].
> morphs reset.
> rects reset.
> validList add: r]].
> ^validList! !
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
Marcus Denker  --  [hidden email]
http://www.marcusdenker.de


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