mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Add [GSFontInfo -appendBezierPathWithGlyphs:count:toBezierPath:] and use it to implement NSBezierPath's glyph methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16903 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02ef01adc7
commit
a55cd8adda
4 changed files with 32 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-06-11 15:34 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Headers/gnustep/gui/GSFontInfo.h, Source/GSFontInfo.m: Add
|
||||
-appendBezierPathWithGlyphs:count:toBezierPath: method.
|
||||
|
||||
* Source/NSBezierPath.m: Use it to implement the glyph methods.
|
||||
|
||||
2003-06-09 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Headers/gnustep/gui/NSDataLinkPanel.h: Added ivar declarations
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
@class NSMutableDictionary;
|
||||
@class NSArray;
|
||||
@class NSBezierPath;
|
||||
|
||||
@interface GSFontEnumerator : NSObject
|
||||
{
|
||||
|
@ -132,6 +133,11 @@
|
|||
- (NSFontTraitMask) traits;
|
||||
- (int) weight;
|
||||
|
||||
|
||||
-(void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
|
||||
count: (int)count
|
||||
toBezierPath: (NSBezierPath *)path;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __GSFontInfo_h_INCLUDE_ */
|
||||
|
|
|
@ -539,4 +539,12 @@ static GSFontEnumerator *sharedEnumerator = nil;
|
|||
return weight;
|
||||
}
|
||||
|
||||
|
||||
-(void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
|
||||
count: (int)count
|
||||
toBezierPath: (NSBezierPath *)path
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -27,11 +27,14 @@
|
|||
59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA.
|
||||
*/
|
||||
|
||||
#include <AppKit/NSAffineTransform.h>
|
||||
#include <AppKit/NSBezierPath.h>
|
||||
|
||||
#include <AppKit/NSAffineTransform.h>
|
||||
#include <AppKit/NSFont.h>
|
||||
#include <AppKit/NSImage.h>
|
||||
#include <AppKit/PSOperators.h>
|
||||
#include <AppKit/GSFontInfo.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifndef PI
|
||||
|
@ -1119,19 +1122,20 @@ static float default_miter_limit = 10.0;
|
|||
|
||||
- (void)appendBezierPathWithGlyph:(NSGlyph)glyph inFont:(NSFont *)font
|
||||
{
|
||||
[self appendBezierPathWithGlyphs: &glyph count: 1 inFont: font];
|
||||
[[font fontInfo] appendBezierPathWithGlyphs: &glyph
|
||||
count: 1
|
||||
toBezierPath: self];
|
||||
}
|
||||
|
||||
- (void)appendBezierPathWithGlyphs:(NSGlyph *)glyphs
|
||||
count:(int)count
|
||||
inFont:(NSFont *)font
|
||||
{
|
||||
char buffer[4 * count + 1];
|
||||
|
||||
NSConvertGlyphsToPackedGlyphs(glyphs, count, [font glyphPacking], buffer);
|
||||
[self appendBezierPathWithPackedGlyphs: buffer];
|
||||
[[font fontInfo] appendBezierPathWithGlyphs: glyphs
|
||||
count: count
|
||||
toBezierPath: self];
|
||||
}
|
||||
|
||||
|
||||
- (void)appendBezierPathWithPackedGlyphs:(const char *)packedGlyphs
|
||||
{
|
||||
// TODO
|
||||
|
|
Loading…
Reference in a new issue