Re: Using libart_lgpl directly



Hi,

Thanks for the commments.  The gnome-print stuff sounds pretty good,
and I had already been thinking about using it.  The lack of actual
code put me off a bit :-).  I am willing to help write the code, as
it would be a really cool addition to R, and we already have a very
functional PostScript driver which should be simple to port.
However, I don't understand the libart source, so I would need a bit
of hand holding to get started.  It also depends a bit on how much
work is involved, as my boss might think that other things are more
urgent (though he did like the look of the aa stuff).
Another advantage is that a gnome-print R driver would give us
access to any Gnome printer drivers (eg. color inkjets).

Lyndon

> I'd recommend going one of two ways with this. Your first choice is to
> implement a custom canvas item for drawing lots of points. This item
> could simply store a big list of coordinates, so roughly 16 bytes per
> point. Then, the render method would render it as appropriate.
> 
> You could save a little time by precalculating the svp for the "point"
> shape, then translating it for each point before rendering. This way you
> only need one svp for the item, rather than one for each point, which is
> where the memory is being eaten right now.
> 
> Your second possibility is to wait for the RGB-rendered gnome-print
> backend. This probably will happen pretty soon. Basically, you'd open a
> gnome-print context coupled to an RGB buffer. You do drawing operations
> very similar to PostScript operators in this context, and at the end you
> have an RGB buffer, which you can easily display in a window. The
> gnome-print api is designed to be quite consistent with PostScript - if
> you have code to draw into PS, doing a gnome-print driver ought to be a
> piece of cake. This is also a good way to print.
> 
> The disadvantage of the second method is that you have to either wait
> for the code or start writing it yourself :)
> 
> Raph



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