Re: Printing a Gnome canvas (2nd episode)
- From: Chema Celorio <chema ximian com>
- To: Jean Bréfort <jbrefort wanadoo fr>
- Cc: gnome-hackers gnome org
- Subject: Re: Printing a Gnome canvas (2nd episode)
- Date: 15 Dec 2002 13:07:05 -0600
On Sat, 2002-12-14 at 07:29, Jean Bréfort wrote:
> Hi,
>
> I have not written much code yet, being very busy thehe times, but I
> have perhaps found a solution to avoid making libgnomecanvas dependent
> to libgnomeprint. The drwoback is that it will add a new dependency to
> libgnomeprint. Here is my idea:
>
> The only thing I need to print the canvas is a GnomePrintContext. If we
> have a parent type for GnomePrintContext, say GPrintContext, we just
> have to make GnomePrintContext a descendant of GPrintContext and put
> into GPrintContextClass pointers to almost every
> gnome_print_context_xxx(...). The default corresponding
> g_print_context_xxx just emit a warning.
I don't understand why having a parent object to GnomePrintContext would
help you print a canvas. The printing-canvas-code should be using
libgnomeprint, not the other way around. I would start of by adding a
print method to the base CanvasItem which given a GnomePrintContext
draws itself into.
Also, libgnomeprint does not depend on the canvas (libgnomeprintui does)
it is a non-gui library. It depends on: libart_lgpl, glib & pango only.
> Where to put this new type? There are et leat three possibilities: a
> separate library (just for that, it will be very thin), libgnomecanvas
> or glib. I don't think that the second option is the good one because
> other types could use the GPrintContext mechanism (may be PangoLayout
> (would be great in my opinion)). I don't know if the GLib option is
> acceptable (does GLib have something o do with printing?) so the
> separate library might be the best solution unless someone has a better
> idea.
The best place to develop this code is outside of any of the current
libraries, libgnomecanvasprint or something, I don't see a reason to
have it be part of a library while it is being developed, but if it has
to, then it has to be developed on a branch. The code should be somewhat
working before we can consider integrating it as part of any of the
libraries. Long term I think the canvas should depend on libgnomeprint
if printing is a functionality that the canvas maintainers want it to be
part of.
Writing the code is going to clear up a lot of the issues that we have
right now and raise some new interesting ones that we need to solve.
regards,
Chema
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]