discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Rotating text


From: Alexander Malmberg
Subject: Re: Rotating text
Date: Sun, 25 May 2003 15:50:12 +0200

Fred Kiefer wrote:
> I just looked at your back-art charpath code and this loks like a good
> starting point to implement the backend handling for NSBezierPaths glyph
> handling. Not having any backend support always kept me from writing the
> needed interface methods. Would you mind if I define such a new method
> on NSGraphicsContext and implement it of back-art. Or even better let
> you do the actual implementaion?
> 
> Would you like this interface:
> 
> [NSGraphicsContext appendBezierPath: (NSBezierPath*) path
>                     withPackedGlyphs:(const char *)packedGlyphs]
> 
> (If you don't like the packed glyph concept we could as well use an
> array of glyphs plus the length)

Yes, that would be better. Also, for consistency with other "operators",
and NSBezierPath methods, and to make it completely (as opposed to
partially) independent of the current gstate, I'd suggest something
like:

[NSGraphicsContext -GSAppendBezierPathWithGlyphs: (NSGlyph *)glyphs
        count: (int)count
        inFont: (NSFont *)font
        toBezierPath: (NSBezierPath *)path;

I could implement this in ARGGState and GSContext.

> This could than be used to impelement PSCharPath: for all gsc based
> backends, of course still back-art would be the only one with working code.

Unfortunately, no:

-(void) DPScharpath: (const char *)str : (int)b;

Like show, charpath expects a string of characters in the font's
mostCompatibleEncoding, which maps to glyphs in a font and backend
specific way. (There's also the flag 'b', which has to do with handling
stroked fonts, but I don't think that would be a significant problem.)

- Alexander Malmberg




reply via email to

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