Re: Canvas shortcomings



On 19 Jun 2001, Owen Taylor wrote:

> 
> 
> Lauris Kaplinski <lauris ximian com> writes:
> 
> > Hello!
> > 
> > Owen and everybody! What exactly we are talking about?
> > 
> > 1. Sreamlined API, i.e.
> > 
> > errval = gnome_2d_shape_draw (Shape_Def, Drawing_Context)
> > 
> > 2. Object-based API, i.e.
> > 
> > Gnome2DObject *obj = gnome_2d_shape_create (Shape_Def, Parent_Object)
> > 
> > IMHO this makes big difference.
> 
> I don't really understand the distinction, or what you mean
> by Shape_Def.
> 
> My ideas are simply:
>  
>  - 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.

Mark





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