//
//  OTBaseBen.h
//  GlyphsCore
//
//  Created by Georg Seifert on 16.11.11.
//  Copyright 2011 schriftgestaltung.de. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class COFont;
@class FTPointArray;

@protocol OTPenProtocol

/** Begin a new sub path, set the current point to 'pt'. You must
end each sub path with a call to pen.closePath() or pen.endPath().
 */
- (void)moveTo:(NSPoint)pt;

/** Draw a straight line from the current point to 'pt'.*/
- (void)lineTo:(NSPoint)pt;

/** Draw a cubic bezier with an arbitrary number of control points.

 The last point specified is on-curve, all others are off-curve
 (control) points. If the number of control points is > 2, the
 segment is split into multiple bezier segments.
 */
- (void)curveTo:(NSPoint)pt off1:(NSPoint)off1 off2:(NSPoint)off2;

/** Draw a whole string of quadratic curve segments.

The last point specified is on-curve, all others are off-curve
points.
 */
- (void)qCurveTo:(FTPointArray *)points;

/** Close the current sub path. You must call either pen.closePath()
or pen.endPath() after each sub path.
 */
- (void)closePath;

/** End the current sub path, but don't close it. You must call
either pen.closePath() or pen.endPath() after each sub path.
 */
- (void)endPath;

- (void)addComponent:(NSString *)baseName transformation:(NSAffineTransform *)transformation;
@end

@interface OTBasePen : NSObject <OTPenProtocol> {
	COFont *_glyphSet;
	NSPoint _currPoint;
}
@property (nonatomic, assign) NSPoint currPoint;
- (id)initWithGlyphSet:(id)glyphSet;
@end

@interface OTSegmentPen_ : NSObject /*<GSPenProtocol>*/ {
	NSMutableArray *_contour;
}

@end
