Am 06.08.2010 03:31, schrieb Derek Fawcus:
> I see that most of the other DPS text output routines are implemented in 
> terms of the
> above helper routine.  Maybe I'm missing something,  but is there any reason 
> why
> DPSshow cannot also be implemented by it?  Maybe something like:
> 
> - (void) DPSshow: (const char*)s
> {
>   float arr[2];
> 
>   arr[0] = 0; arr[1] = 0;
>   [self _showString: s
>     xCharAdj: 0 yCharAdj: 0 char: 0 adjArray: arr arrType: show_delta
>     isRelative: YES];
> }
> 
> added to Source/gsc/GSGState.m ?
> 
> Which would then allow all of the backends (barring 
> Source/xdps/NSDPSContextOps.m) to be simplified?

Sounds like an excellent idea to me. This will bring us down to just one
real string drawing implementation per backend. When implementing a new
backend I always wonder which of the different methods actually require
an implementation.
Perhaps we could even move all that code over to gui, but as far as I
remember from moving this up from the art backend this wasn't possible
at that time.

This implementation should be a lot slower then the old DPSshow in the
specific backends, but we could add a bit of optimisation in _showString
and then this code path isn't used anywhere in gui, so the slow down
would only affect old OpenStep applications still using the PS drawing
functions.

_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to