[Gambas-user] Big change in revision #5382

Jussi Lahtinen jussi.lahtinen at ...626...
Tue Nov 27 21:49:43 CET 2012


OK, thanks, I will see.
I have used drawingarea to visualise rather complicated dynamic data.
And it was already bottleneck when I "fast forward" the data.
I know there is OpenGL, but right now it looks too much to learn, among
other topics.

Jussi



On Tue, Nov 27, 2012 at 10:36 PM, Benoît Minisini <
gambas at ...1...> wrote:

> Le 27/11/2012 21:26, Jussi Lahtinen a écrit :
> >>
> >> I have removed the old Draw class and replaced it with a new Draw class
> >> implemented in Gambas inside the gb.gui.base component, that emulates
> >> the old Draw class by using the Paint class.
> >>
> >> I'm starting to remove as much X11 specific code as possible in the
> >> Gambas source code, and the Draw class was completely based on the old
> >> deprecated X11 drawing API of GTK+, so...
> >>
> >> Many new methods were added to the Paint class to help the
> >> implementation of the Draw emulation class.
> >>
> >> Of course (!) expect some quirks:
> >>
> >> - The emulation is not perfect yet, and it won't be 100% compatible
> >> pixel to pixel.
> >>
> >> - Expect some performance loss, even if I try to avoid them as much as
> >> possible.
> >>
> >> - Drawing lines with Cairo is a lot slower that drawing lines with X11,
> >> even if antialiasing is disabled.
> >>
> >> - There is a bug at the moment if you imbricate calls to Paint.Begin()
> >> on the same device. It should work, but apparently it does not...
> >>
> >> - Source code clean-up is not finished.
> >>
> >> But there is one good news: if you have old printing code from Gambas 2
> >> based on the Draw class, you can now use it directly in Gambas 3 without
> >> having anything to change (theoritically).
> >>
> >> All that is an investment to the future, when Wayland will replace X11.
> >>
> >
> > I know too little about how these things work...
> > Does this performance loss apply only to GTK+, or does it have effect
> also
> > to Qt4?
> >
>
> Qt4 has one drawing model only, so you should not lose too much. Anyway,
> you will see that quickly in the IDE: GridView, TreeView, ListView,
> ColumnView, IconView, ListBox, MenuButton... All these controls are
> entirely implemented with Gambas code now.
>
> Note that there is a bit of speed loss because coordinates in Paint are
> Float and not Integer. So the floating-point versions of drawing methods
> are used, not the integer ones.
>
> Maybe Qt4 does more optimizations when using integer coordinates, I
> don't know. It depends on the drawing instruction I guess...
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Keep yourself connected to Go Parallel:
> DESIGN Expert tips on starting your parallel project right.
> http://goparallel.sourceforge.net
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list