Re: Printing lines, shapes and pixmaps from a gnome canvas



Chema Celorio wrote:

On Sun, 2003-01-26 at 03:43, Jean Bréfort wrote:
Chema Celorio wrote:
...
It should not go in gnome-print but in libgnomecanvas (IMHO).

Yes you are right, either libgnomecanvas or a different library that
retrofits the print method to the canvas objects.

It must be in libgnomecanvas, because it needs access to private item members.


	The only thing that I'd like to see, is if this code was developed as
part of an application or developed somewhere where it is getting real
life usage before putting it in a library.

I developped this code for use in GChemPaint. If it is not included in an official library I'll include a special canvas version with just what

I think it would be wise to avoid copying the code to your application,
you can do it if you want but you will end up with a maintenance problem
and others wont be able to benefit from your effort. I know it can be
discouraging to get the ball rolling as a newcomer to a Free Software
projects but believe me, you are on the right track.

I need in future versions. Current code is based on libgnomecanvas2.0.5 and is available at http;//jean.brefort.free.fr/info/libgnomeprintablecanvas.tar.bz2

Great, this changes the issue a lot. I wasn't aware that you where
developing this because you needed the functionality in an application
or just because it would be good to have. Not only that, but you have
working code already, which makes a good test case and a scenario where
this is needed. Is the version of GChemPaint in cvs using this
libgnomepirntablecanvas library?
Also, GChemPaint looks nice. For the benefit of others here is a
screenshot: http://www.nongnu.org/gchempaint/cholesterol.png

I downloaded libgnomeprintablecanvas.tar.bz2 an have a recommendation.

It would be very useful if the filenames where not changed, I wanted to
do a diff with libgnomecanvas to see how much code was changed an how
but because of the filename changes it wasn't possible to do so. Also,
it would be a lot easier to get the code accepted upstream if you where
distributing a patch to libgnomecanvas rather than a tarball. The
smaller the patch becomes the better, change as little as possible
current code, just add the new methods.

Can you make a diff (diff -u5) and then we can start polishing the patch
and start a discussion with a wider audience about where it should go?

I am aware of the mainainance problem. If I don't change the names (files and variables), GChemPaint will need a patched version of the canvas, which might be not so simple: installing GChemPaint would require recompilation of everything using the canvas... so I thought it would be better in a first step to use other names just for demonstrating that it works. Current cvs version of GChemPaint doesn't use libgnomeprintablecanvas just because text and rich text are not printed yet, I hope I'll can include it before version 0.4.0 (probably fall 2003). I have make a diff starting from libgnomecanvas-2.2.0.1 (it is large because of differences in configure essentially). I join it to this mail.

Best regards,

Jean

Attachment: libgnomecanvas-2.2.0.1.diff.bz2
Description: Binary data



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