Re: Canvas shortcomings



On 16 Jun 2001, Lauris Kaplinski wrote:

> Hello!
>
> Unreachable goal IMHO :(
> I have not yet find a way to make a graphic API, that:
> 1) has reasonable speed and quality
> 2) can be used for both interactive and output graphics
> 3) has single, consistent API

  It can. For example, I think libplot has reasonable speed and quality
(except for bad font quality -- X's fault). Even if it the speed isn't so
great, it can be used interactively, with some adjustments.

  Let me explain what concerns with GnomeCanvas programs. They try to do
interaction of objects (dragging, resizing) the easy way (in terms of
programming): to move a object, redraw it somewhere else, wherever the
mouse pointer is.  It can be very slow with lots of objects or a single
object the renders slowly.

 In the old days, when hardware was slower, programmers would use
tricks like rubber banding or drawing only the object's bounding box when
moving it, with lines drawn with the XOR function to be easy to restore
them.

 So this is what GnomeCanvas needs, IMHO:
    1- A very general, simple, and possibly expensive API for drawing
objects and printing them with the same API;
    2- A framework for doing rubber banding-like efects when moving and
resizing objects, which is very inexpensive graphically (it is all done in
the server side), but is a real pain to program manually.


>
> If anybody knows the solution, I would be very interested.
>
> Best wishes,
> Lauris Kaplinski
>
> On 15 Jun 2001 14:28:03 -0400, Havoc Pennington wrote:
> > Gustavo João Alves Marques Carneiro <ee96090 fe up pt> writes:
> > >   Hmm. In GTK? You mean we could *print* widgets to postscript? That would
> > > be very interesting.. :)
> >
> > Well, sort of. ;-)
> >
> > >   Anyway, I have made a small library called nxplot. There is a base class
> > > GObject, Nxplot, that has virtual methods (the rendering API). Its API is
> > > modeled after libplot.
> > >   Derived from Nxplot is NxplotLibplot that is a libplot (from GNU
> > > plotting utils) based implementation that can render either to a
> > > GtkDrawingArea or to a file with any of the libplot's supported types
> > > (too many to remember).
> > >   Also I have NxplotArtft, that is a libart_lgpl and freetype2 based
> > > renderer, that renderes to a pixel buffer and draws into a GtkDrawingArea
> > > with GdkRgb.
> > >   A Gdk based renderer should be easy too.
> > >   So, it's not that hard to implement such a thing. And GnomePrint could
> > > easily be extended with a Gdk based renderer, I guess. Then, GnomeCanvas
> > > would use a single API (GnomePrint) and the world would become a better
> > > place. :)
> > >   Anyway I can help, I'm available, if given plenty of time (I'm a slow
> > > programmer :)
> >
> > We want something a bit more ambitious, along the lines of Java2D I
> > believe. That's why it's hard. ;-)
> >
> > Havoc
>
>

-- 
Gustavo João Alves Marques Carneiro <ee96090 fe up pt>
 __                          _
/__      _ _|_  _.     _    /   _. ._ ._   _  o ._ _
\_| |_| _>  |_ (_| \/ (_)   \_ (_| |  | | (/_ | | (_)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]