//
//  GSLayer+Drawing.h
//  Glyphs
//
//  Created by Georg Seifert on 21.09.10.
//  Copyright 2010 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSLayer.h>

typedef NS_ENUM(uint8_t, GSLayerExtraInfoDrawing) {
	GSLayerExtraInfoDrawingCustomInfo = 1 << 0,
	GSLayerExtraInfoDrawingOnDark = 1 << 1,
	GSLayerExtraInfoDrawingMetricsKeysState = 1 << 2,
};

@interface GSLayer (Drawing)

- (void)drawInFrame:(const NSRect)frame metrics:(GSGlyphMetrics *)metrics color:(NSColor *)color dark:(BOOL)dark;

- (void)drawAtPoint:(NSPoint)origin scale:(CGFloat)scale color:(NSColor *)color dark:(BOOL)dark;

- (void)drawExtraInfoInFrame:(const NSRect)frame options:(GSLayerExtraInfoDrawing)options inView:(NSView *)view;

+ (CGFloat)layerDrawingScale:(CGFloat)height metrics:(GSGlyphMetrics *)metrics;

+ (CGFloat)layerDrawingScale:(CGFloat)height ascender:(CGFloat)ascender descender:(CGFloat)descender;

+ (NSPoint)layerDrawingOrigin:(const NSRect *)frame scale:(CGFloat)scale metrics:(GSGlyphMetrics *)metrics script:(NSString *)script;

@end
