//
//  GSBoundsPen.h
//  GlyphsCore
//
//  Created by Georg Seifert on 29.07.15.
//  Copyright (c) 2015 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSPenProtocol.h>

@interface GSBoundsPen : NSObject <GSPenProtocol>

/// `CGRectNull` when `hasContent == NO`.
@property (nonatomic, readonly) NSRect bounds;
/// Whether the bounds may be larger than the actual bounds.
@property (readonly, getter=isOverestimated) BOOL overestimated;

+ (instancetype)boundsPen;

/// The computed bounds are guaranteed to be no smaller than the bounds computed by a pen returned by `-boundsPen`.
///
/// The implementation of this pen may be more efficient than the one of `-boundsPen`.
/// For example, a Bézier path may report the bounds of its nodes instead of computing the bounds of its curves.
+ (instancetype)overestimatingBoundsPen;

@end
