[Top][All Lists]

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

Re: Comments on Artlib backend

From: BALATON Zoltan
Subject: Re: Comments on Artlib backend
Date: Thu, 29 Aug 2002 19:36:03 +0200 (MEST)

On Wed, 28 Aug 2002, Richard Frith-Macdonald wrote:
> So the issue should not be whether or not to implement stuff in the gui
> library, but how to implement it in the gui in such a way that it can be
> used by *or* replaced by backends efficiently and easily.

I agree with this. Now I start to see the design more clearly. Thanks for

On Wed, 28 Aug 2002, Alexander Malmberg wrote:
> For NSGraphicsContext, this is easy. The backend has to provide a
> However, doing the same thing with classes like NSAffineTransform or
> NSColor would be much trickier, and I don't think that it'd be a good
> idea.

For NSAffineTransform it probably wouldn't. That is a simple class with a
well defined, simple to implement behaviour. Even if the backend uses a
different implementation it will likely be equivalent. For more complex
classes however such as NSColor it might be useful. E.g. ghostscript
implements it's own color handling and if the gui has a different
implementation the two might be different. Also it is hard to synchronize
the two. If you use NSColor methods you change things in the GNUstep
implementation which might not update the corresponding values in the
backend. Or vice versa, if you use DPS color setting functions you change
things in the backend context which might not be reflected in NSColor.
Similarly for NSFont and NSBezierPath.

On Wed, 28 Aug 2002, Alexander Malmberg wrote:
> Subject: Re: "Jaguar" additions
> I didn't mean that I was uncertain about these. What I meant was that I
> don't see anything wrong with returning opaque structures for
> references, eg. to colorspaces, or images, or patterns..., nor do I see
> any reason why doing things that way would me much better. However,
> whenever possible, I think that the 'structures' used when the user
> wants to pass data to the backend should be standard objects,
> implemented in -base or -gui.

I'd say: _defined_ in the gui or base. (If they are also implemented there
it should be done in such a way that the backend can easily replace them
if it has an implementation for these objects.) Using standard objects to
pass data to the backend is a good idea, as this ensures that they are
well defined and their definition is independent from any backend so
backends can be swapped easily.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]