gnustep-dev
[Top][All Lists]
Advanced

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

Backend functions


From: Fred Kiefer
Subject: Backend functions
Date: Sat, 21 Apr 2001 20:16:14 +0200

Now that the great unified front-end has become reality there are a few
smaller issues that need to be sorted out.

First there is this code snipplet in gui/Source/NSStringDrawing:

#ifdef XDPS_BACKEND_LIBRARY
  /* FIXME: Hack to force DGS to flush the text */
  DPSrectfill(draw->ctxt, 0, 0, 0.5, 0.5);
#endif

Could any user of the xdps back end confirm that we can safely drop
this. It probably wont be compiled anyway.

Next I would like to move some of the implementation of the xgps drawing
functions from the file XGDrawingEngine over to NSGraphicsContext. The
xgps implementation uses DPS primitives to implement those functions so
this implementation could be used as a fallback for all back ends,
whereas back ends that are able to optimize this operation (as the xdps
back end) will overwrite those methods. Of course, this would include
the replacement of CUR_CONTEXT with self.
For some of this functions (ok, they are now methods, but they have been
functions for so long that I still think of them as such) this is not
that easy as they use the gState to find out if the current view is
flipped. For this I would like to introduce a new function (OK, once
again a method) GSWViewFlipped. The standard implementation would get
the locked view and check if it is flipped, xgps version would be
optimized to ask the gState. The make this concept a bit cleared to the
programmer, I would also like to rename GSWViewFliepped: into
GSWSetViewFlipped:, this would have an empty standard implementation, as
this is not really needed for subclasses.

After this I would like to introduce a lot more methods on
NSGraphicsContext. There should be one method to set a NSBezierPath
(Which would in the standard implementation just include the current
code of NSBezierPath _doPath, xgps would overwrite this to replace the
Bezier path directly. Than we need a method to set the NSFont, or find a
way to really use the current ones. We need methods to display Unicode
strings, additional methods for NSImage and so on.

If nobody objects to any of this proposals I would like to start on this
as soon as I find time for GNUstep again. (Which may not be very soon)

Fred




reply via email to

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