[Top][All Lists]

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

Re: Why does GSShowText (and its varients) exist?

From: Fred Kiefer
Subject: Re: Why does GSShowText (and its varients) exist?
Date: Mon, 09 Aug 2010 20:56:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv: Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6

Am 09.08.2010 01:26, schrieb Derek Fawcus:
> On Sun, Aug 08, 2010 at 04:52:20PM +0200, Fred Kiefer wrote:
>> Am 06.08.2010 02:53, schrieb Derek Fawcus:
>>> As far as I can see,  nothing invokes this.
>>> But there is a cairo backend implementation.
>>> So is it cruft that was being removed,  or something being added?
>> I think you are right about this. We should drop GSShowText as we
>> replaced its use long ago by GSShowGlyphs.
>> I am not quite sure what you mean by "its varients" though.
> The following code locations,  including the varient named method table slots.
> Headers/Additions/GNUstepGUI/GSMethodTable.h:111:  void (*GSShowText__)
> Headers/AppKit/DPSOperators.h:165:GSShowText(GSCTXT *ctxt, const char * 
> string, size_t length)
> Headers/AppKit/DPSOperators.h:690:GSShowText(GSCTXT *ctxt, const char * 
> string, size_t length)
> Headers/AppKit/DPSOperators.h:692:  (ctxt->methods->GSShowText__)
> Headers/AppKit/DPSOperators.h:693:    (ctxt, @selector(GSShowText: :), 
> string, length);
> Headers/AppKit/NSGraphicsContext.h:308:- (void) GSShowText: (const char 
> *)string : (size_t) length;
> Source/NSGraphicsContext.m:559:  methodTable.GSShowText__ =
> Source/NSGraphicsContext.m:560:    GET_IMP(@selector(GSShowText::));
> Source/NSGraphicsContext.m:1069:- (void) GSShowText: (const char *)string : 
> (size_t) length
> Headers/gsc/GSGStateOps.h:75:- (void) GSShowText: (const char *)string : 
> (size_t) length;
> Source/cairo/CairoGState.m:416:- (void) GSShowText: (const char *)string : 
> (size_t)length
> Source/gsc/GSContext.m:420:- (void) GSShowText: (const char *)string : 
> (size_t) length
> Source/gsc/GSContext.m:422:  [gstate GSShowText: string : length];
> Source/gsc/GSGState.m:626:- (void) GSShowText: (const char *)string : 
> (size_t) length
> Source/gsc/GSStreamContext.m:286:- (void) GSShowText: (const char *)string : 
> (size_t)length

Ah yes, too me this is all the same method. But looking at them your way
I can now see plenty of these :-)

> Also the same applies to the similarly named Text methods in the method table 
> located alongside GSShowText:
> GSGetTextPosition
> GSSetTextPosition
> GSSetTextDrawingMode  (and the GSTextDrawingMode enum typedef)
> GSGetTextCTM
> GSSetTextCTM
> GSSetCharacterSpacing
> GSSetFontSize
> There are few or no backend specific implementations,  and no gui calls;
> so do they actually serve a useful purpose?
> The comments in NSGraphicsContext could be read as them having some future 
> use wrt
> to implementing Quartz.  But I guess not while still bearing the GS prefix.

Yes, this was the actual aim at that time. I agree that this is obsolete
now. We shouldn't be adding pseudo CoreGraphic code in gui now that we
have Opal. Best to remove all of this. (There is more dealing with
colours and so on)

reply via email to

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