[vwnc] Cairo Ribon experiments

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

[vwnc] Cairo Ribon experiments

Maarten Mostert-2
Hi,
 
I have been experimenting a bit to get rid of ExtraIconsToo and make a Ribon like toolbar that can take simple Menus with Assets as input.
As the interaction here is not so complicated I wanted to avoid the extra activity loop when hovering and selecting buttons and menu items.
The thing is that this gets really flashy as the gradients are slow to draw and everything gets re-rendered when invalidating even when using explicit double buffering.
I have some ideas to draw again over the original context avoiding invalidating it, but I wondered if other techniques might be more approriate.
 
Regards,
 
@+Maarten,
 
 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Cairo Ribon experiments

Travis Griggs-3
On Oct 26, 2008, at 3:23 PM, Maarten MOSTERT wrote:

> Hi,
>
> I have been experimenting a bit to get rid of ExtraIconsToo and make  
> a Ribon like toolbar that can take simple Menus with Assets as input.
> As the interaction here is not so complicated I wanted to avoid the  
> extra activity loop when hovering and selecting buttons and menu  
> items.
> The thing is that this gets really flashy as the gradients are slow  
> to draw and everything gets re-rendered when invalidating even when  
> using explicit double buffering.
> I have some ideas to draw again over the original context avoiding  
> invalidating it, but I wondered if other techniques might be more  
> approriate.

Do you have some example code you can share? Hard to help improve it  
without looking at code.

--
Travis Griggs
Objologist
If you can't say "Did it First!", you'd better be able to say "Did it  
Better!"


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Cairo Ribon experiments

Maarten Mostert-2
Hi Travis,

So here you go for some code.
It normally works from a clean image with Cairo preloaded as I override the
checkstatus error.

I added some handy paths to the context notably open rounded rectangles.

I would say that drawing on top would be less flashy then buffering but I
really wonder how you would tackle this one.

@+Maarten,


----- Original Message -----
From: "Travis Griggs" <[hidden email]>
To: "Maarten MOSTERT" <[hidden email]>
Cc: "VWNC" <[hidden email]>
Sent: Monday, October 27, 2008 2:55 PM
Subject: Re: [vwnc] Cairo Ribon experiments


>
> On Oct 26, 2008, at 3:23 PM, Maarten MOSTERT wrote:
>
>> Hi,
>>
>> I have been experimenting a bit to get rid of ExtraIconsToo and make  a
>> Ribon like toolbar that can take simple Menus with Assets as input.
>> As the interaction here is not so complicated I wanted to avoid the
>> extra activity loop when hovering and selecting buttons and menu  items.
>> The thing is that this gets really flashy as the gradients are slow  to
>> draw and everything gets re-rendered when invalidating even when  using
>> explicit double buffering.
>> I have some ideas to draw again over the original context avoiding
>> invalidating it, but I wondered if other techniques might be more
>> approriate.
>
> Do you have some example code you can share? Hard to help improve it
> without looking at code.
>
> --
> Travis Griggs
> Objologist
> If you can't say "Did it First!", you'd better be able to say "Did it
> Better!"
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG. Version: 7.5.549 / Virus Database: 270.8.4/1749 - Release
> Date: 27/10/2008 07:57
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

ARibbon.zip (41K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Cairo Ribon experiments

Mark Plas
Hi Maarten,

I did a quick experiment and adding this to your application:

postBuildWith: aBuilder

        super postBuildWith: aBuilder.

        aBuilder window damageRepairPolicy: DoubleBufferingWindowDisplayPolicy new.

This fixes the problem of the flickering. The reason why it flickers so much without is because of the WindowDisplayPolicy that's used by default. It repaints the background of the components needing invalidation with gray rectangles before asking the widgets to repaint themselves. Since you always invalidate your entire RibbonView you get your flashing effect. If you would limit the invalidation rectangles to the buttons that require invalidation, it would flash a lot less, and perhaps also redisplay faster.

Mark

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Maarten MOSTERT
Sent: dinsdag 28 oktober 2008 23:21
To: Travis Griggs
Cc: VWNC
Subject: Re: [vwnc] Cairo Ribon experiments

Hi Travis,

So here you go for some code.
It normally works from a clean image with Cairo preloaded as I override the
checkstatus error.

I added some handy paths to the context notably open rounded rectangles.

I would say that drawing on top would be less flashy then buffering but I
really wonder how you would tackle this one.

@+Maarten,


----- Original Message -----
From: "Travis Griggs" <[hidden email]>
To: "Maarten MOSTERT" <[hidden email]>
Cc: "VWNC" <[hidden email]>
Sent: Monday, October 27, 2008 2:55 PM
Subject: Re: [vwnc] Cairo Ribon experiments


>
> On Oct 26, 2008, at 3:23 PM, Maarten MOSTERT wrote:
>
>> Hi,
>>
>> I have been experimenting a bit to get rid of ExtraIconsToo and make  a
>> Ribon like toolbar that can take simple Menus with Assets as input.
>> As the interaction here is not so complicated I wanted to avoid the
>> extra activity loop when hovering and selecting buttons and menu  items.
>> The thing is that this gets really flashy as the gradients are slow  to
>> draw and everything gets re-rendered when invalidating even when  using
>> explicit double buffering.
>> I have some ideas to draw again over the original context avoiding
>> invalidating it, but I wondered if other techniques might be more
>> approriate.
>
> Do you have some example code you can share? Hard to help improve it
> without looking at code.
>
> --
> Travis Griggs
> Objologist
> If you can't say "Did it First!", you'd better be able to say "Did it
> Better!"
>
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG. Version: 7.5.549 / Virus Database: 270.8.4/1749 - Release
> Date: 27/10/2008 07:57
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Cairo Ribon experiments

Maarten Mostert-2

Wow.. Thanks Mark this actually works, the flickering is gone !

This means that my ribbon actuallay can stay with a pritty simple design.

@+Maarten,

> Message du 29/10/08 09:28

> De : "Mark Plas" <a href="http://webmail1a.orange.fr/webmail/fr_FR/write.html" onclick="javascript:Write_Valid();return false">document.write (BT_SUBMIT);envoyer
> A : "Maarten MOSTERT" , "Travis Griggs"
> Copie à : "VWNC"
> Objet : RE: [vwnc] Cairo Ribon experiments
>
>
> Hi Maarten,
>
> I did a quick experiment and adding this to your application:
>
> postBuildWith: aBuilder
>
> super postBuildWith: aBuilder.
>
> aBuilder window damageRepairPolicy: DoubleBufferingWindowDisplayPolicy new.
>
> This fixes the problem of the flickering. The reason why it flickers so much without is because of the WindowDisplayPolicy that's used by default. It repaints the background of the components needing invalidation with gray rectangles before asking the widgets to repaint themselves. Since you always invalidate your entire RibbonView you get your flashing effect. If you would limit the invalidation rectangles to the buttons that require invalidation, it would flash a lot less, and perhaps also redisplay faster.
>
> Mark
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Maarten MOSTERT
> Sent: dinsdag 28 oktober 2008 23:21
> To: Travis Griggs
> Cc: VWNC
> Subject: Re: [vwnc] Cairo Ribon experiments
>
> Hi Travis,
>
> So here you go for some code.
> It normally works from a clean image with Cairo preloaded as I override the
> checkstatus error.
>
> I added some handy paths to the context notably open rounded rectangles.
>
> I would say that drawing on top would be less flashy then buffering but I
> really wonder how you would tackle this one.
>
> @+Maarten,
>
>
> ----- Original Message -----
> From: "Travis Griggs"
> To: "Maarten MOSTERT"
> Cc: "VWNC"
> Sent: Monday, October 27, 2008 2:55 PM
> Subject: Re: [vwnc] Cairo Ribon experiments
>
>
> >
> > On Oct 26, 2008, at 3:23 PM, Maarten MOSTERT wrote:
> >
> >> Hi,
> >>
> >> I have been experimenting a bit to get rid of ExtraIconsToo and make a
> >> Ribon like toolbar that can take simple Menus with Assets as input.
> >> As the interaction here is not so complicated I wanted to avoid the
> >> extra activity loop when hovering and selecting buttons and menu items.
> >> The thing is that this gets really flashy as the gradients are slow to
> >> draw and everything gets re-rendered when invalidating even when using
> >> explicit double buffering.
> >> I have some ideas to draw again over the original context avoiding
> >> invalidating it, but I wondered if other techniques might be more
> >> approriate.
> >
> > Do you have some example code you can share? Hard to help improve it
> > without looking at code.
> >
> > --
> > Travis Griggs
> > Objologist
> > If you can't say "Did it First!", you'd better be able to say "Did it
> > Better!"
> >
> >
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG. Version: 7.5.549 / Virus Database: 270.8.4/1749 - Release
> > Date: 27/10/2008 07:57
> >
> >
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc