2016-06-08 19:17:12 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
@import Cocoa;
|
|
|
|
@import CoreText;
|
|
|
|
|
2016-06-18 12:43:37 +03:00
|
|
|
#import "NeoVimUiBridgeProtocol.h"
|
|
|
|
|
2016-06-08 19:17:12 +03:00
|
|
|
@interface TextDrawer : NSObject
|
|
|
|
|
2016-06-18 12:43:37 +03:00
|
|
|
@property (nonatomic, nonnull, retain) NSFont *font;
|
2016-07-30 19:31:33 +03:00
|
|
|
@property (nonatomic) bool useLigatures;
|
2016-06-19 14:39:20 +03:00
|
|
|
@property (nonatomic, readonly) CGFloat leading;
|
|
|
|
@property (nonatomic, readonly) CGFloat descent;
|
2016-06-18 12:43:37 +03:00
|
|
|
@property (nonatomic, readonly) CGSize cellSize;
|
|
|
|
|
2016-07-30 19:31:33 +03:00
|
|
|
- (instancetype _Nonnull)initWithFont:(NSFont *_Nonnull)font useLigatures:(bool)useLigatures;
|
2016-06-18 12:43:37 +03:00
|
|
|
|
|
|
|
- (void)drawString:(NSString *_Nonnull)string
|
|
|
|
positions:(CGPoint *_Nonnull)positions positionsCount:(NSInteger)positionsCount
|
|
|
|
highlightAttrs:(CellAttributes)attrs
|
2016-06-08 19:17:12 +03:00
|
|
|
context:(CGContextRef _Nonnull)context;
|
|
|
|
|
|
|
|
@end
|