Re: Canvas shortcomings


On 21 Jun 2001 09:44:32 +1000, Nathan Hurst wrote:
> On Thu, 21 Jun 2001, Lauris Kaplinski wrote:
> > The biggest problem with PostScript-like API is, that you have to
> > document it damn well. 
> Lauris, if you aren't going to document the _core_ rendering technology of
> a _Graphical_ UI well, then is there any point in using it?  If it is
> poorly documented then a) it will never really be used, and b) when it is
> used, it will never be able to be extended properly, because people have
> (mis)used subtle behaviour explicitly in their code(knowingly, or more
> likely, due to 'good enough for me programming').

Wait, wait...
Good API is self-documenting. So if you call something like:

gnome_2d_draw_shape (ctx, path, style)

with poorly rendered path, or NULL style, it is quite clear, that 
nothing is rendered, and error returned. You have only specify, whether 
path is autoclosed, or open segments omitted...

While doing next call to:

gnome_2d_draw_shape (ctx, path, style)

It is immediately clear, what is rendered (given path + style).

Having PS like API, gives you much more possibilities, because
all style and path parameters ar accumulated on some internal
state, and that state is sometimes reset, sometimes not.

... some path operators ...
... some path operators ...


... some path operators ...
... some path operators ...

For some unknown reason fill and clip behave differently, in
respect of currentpath.

> This is probably the biggest argument in favour of PDF you have given,
> because that is already well defined, and known to work.

Unfortunately, if you are supporting some of PDF, better support all
of it, or you are generating confusion. And this is biiiiig.

Best wishes,

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