Paint gradients rectangles on #onDraw: method

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

Paint gradients rectangles on #onDraw: method

gerard alis
Well, I´m continue working on a Grid widget.

My old grid was very slow in load data. I changed the old mechanism of columns and rows ( each row was a panel with cells in tableLayout  ) by #onDraw: mechanism, painting the cells and contents of it. Now is incredible much more faster. I believe than another people with more knowledge could do more fast too.

Now my next problem is implement the "styles" of widget. I need paint gradient rectangles, for color of rows , alternate rows, cells etc. Is possible do that with #onDraw: mechanism? exists some previous example?

Many thanks for the answer; regards.
Reply | Threaded
Open this post in threaded view
|

Re: Paint gradients rectangles on #onDraw: method

Henrik Sperre Johansen


Den 10.03.2010 16:36, skrev nullPointer:

> Well, I´m continue working on a Grid widget.
>
> My old grid was very slow in load data. I changed the old mechanism of
> columns and rows ( each row was a panel with cells in tableLayout  ) by
> #onDraw: mechanism, painting the cells and contents of it. Now is incredible
> much more faster. I believe than another people with more knowledge could do
> more fast too.
>
> Now my next problem is implement the "styles" of widget. I need paint
> gradient rectangles, for color of rows , alternate rows, cells etc. Is
> possible do that with #onDraw: mechanism? exists some previous example?
>
> Many thanks for the answer; regards.
>  

Not exactly sure what you mean by having switched the mechanism, but
have you tried using a GradientFillStyle as fill when drawing on canvas?

Cheers,
Henry

_______________________________________________
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: Paint gradients rectangles on #onDraw: method

gerard alis
>Not exactly sure what you mean by having switched the mechanism, but
>have you tried using a GradientFillStyle as fill when drawing on canvas?

Well, of that way the load of data in the widget is much more faster. Ignore if with old mechanism exists a some way for do that more fast, but the difference in velocity is huge.

I will see GradientFillStyle. Thanks.