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



I'd like to give my take on the idea of printing a Canvas.

[I'm not sure if Michael Meeks will remeber this, but the "Printing a
canvas idea" was the first conversation he and me had while in Paris
during Guadec 1 in the HelixCode Boart party.]

	A number of people have talked about this a number of times. I am
unsure if this will solve a real problem or not, but I have not yet
found a good scenario where this would be really the best solution. I'm
not saying there isn't such a scenario, I belive that there is a big
chance of me being wrong about this, just that I have not yet found it.

	Complex applications that want high quality printing are going to have
to tweak with great detail the print output. The rules for displaying
something on the screen where you have pixels and on printing where you
dealing with vectors is a different problem.

	Gnumeric and Evolution fall on this category, I don't this apps
benefiting from a canvas that can print itself. The way you display an
email message on the screen is different from how you want it to look on
the print out, same for a calendar, the calendar printing in evolution
looks nothing like how it looks on the screen. Gnumeric will also not
benefit from this, Jody has tried sharing the code used for printing and
for displaying in the screen, and from what he has told me having two
separate code paths that are very similar and are kept in sync is the
best way to go.

	On top of how you want things to look, the screen has an infinite
display area, you can scroll over this area all you want, think about an
email, a spreadsheet or a calendar. On the screen you don't have to
think about spliting things up, and making pages out of it. You have
items that might have to print in two pages for example, all this logic
needs to be defined somewhere, a problem that is not solved by the code
that displays things on the screen. This does not hold true for apps
like sodipodi or abiword where there is a page concept.

	For apps that don't need high quality printing or WYSIWYG, you want to
make the print code as simple as possible. I'm thinking about things
like gedit or ghex. On gedit you have a text buffer, that you want to
print, which the GtkTextView item knows how to deal with, when you print
the text file the logic is different than the one the widgets uses,
because it is simpler to do that way, same holds true for that said, I'm
not trying to imply that I don't want 	Apps that don't require






On Wed, 2003-01-22 at 17:24, Michael Meeks wrote:
> Hi Tambet,
> 
> On Tue, 2003-01-21 at 11:18, Tambet Ingo wrote:
> > >From gnome-print FAQ (from Lauris,
> > http://lists.ximian.com/archives/public/gnome-print/2001-May/000632.html
> >
> > It would be cool to have printing interface on canvas items! 
> ...
> > It is not so cool at all. In model-view-controller context both
> > current gnome-canvas and gnome-print-context implement single
> > view.
> 
> 	And ? why you need a shared controller for your printed output I don't
> know ;-), also why you need Model/View to print what you see on your
> canvas is somewhat opaque to me ;-)
> 
> >  Adding subview (printing interface) to existing view (canvas) is
> > not very good idea.
> > What would be cool is either:
> > - Make generic graphic object class, that can render to different
> >   views (canvas and gnome-print)
> 
> 	Ok - so we re-use the canvas object; and we retro-fit a Printing
> interface - good so far.
> 
> > - Make model-view based canvas, so objects are clearly distinct from
> >   display (and you can have multiple views of same object)
> 
> 	I really think that's a separate issue / battle. Ultimately what you
> want is two WYSIWYG views of the same thing - but I see no reason why we
> can't have a useful printing interface in the meantime ...
> 
> 	Regards,
> 
> 		Michael.	
-- 
Chema Celorio <chema ximian com>




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