Re: Canvas shortcomings
- From: Lauris Kaplinski <lauris ximian com>
- To: Mark <jamess1 wwnet net>
- Cc: gnome-devel-list gnome org
- Subject: Re: Canvas shortcomings
- Date: 21 Jun 2001 01:32:42 +0200
On 19 Jun 2001 13:34:49 -0400, Mark wrote:
> On 19 Jun 2001, Owen Taylor wrote:
> > - Basic API is painting, not a canvas. There is no heirarchy
> > of objects, or idea of having the entire scene in memory.
> >
> > - But instead of a PS-like "moveto lineto" scheme, you
> > lightweight shape objects that you can create for primitives
> > like circles and rectangles.
> >
>
> The PS-like operators come in handy when you want to describe generalized
> paths. Actually, the API that is closest to what you describe, Java2D, has
> such an object to describe paths in that way.
>
> http://java.sun.com/j2se/1.3/docs/api/java/awt/geom/GeneralPath.html
>
> It would probably be nice to have both general paths and primitive shapes,
> instead of either or.
Very similar problem is solved in gnome-print. The core API is
basically:
fill_path
stroke_path
clip_path
draw_image
But in frontend you can use PostScript-like operators to construct
paths, set colors etc. It is extremely trivial to program, so there
certainly could be one.
The biggest problem with PostScript-like API is, that you have to
document it damn well. There are loads of questions, that have to
be answered soewhere:
Is there default color, or is drawing without def. color error?
Do filling shape close open paths.
etc.
One can just take PostScript conventions, of course.
Best wishes,
Lauris Kaplinski
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]