//
//  ANContextHelper.h
//  AvisNocturnaCrossCore
//
//  Created by Mendel Kucharzeck on 19.12.11.
//  Copyright 2011 AvisNocturna Software. All rights reserved.
//

@interface ANContextHelper : NSObject

//Bitmap Contexts
+ (CGContextRef) beginCGContextWithSize:(CGSize)size andBytes:(unsigned char*)bytes withColorSpace:(CGColorSpaceRef)colorSpaceRef andFlipped:(BOOL)flipped;
+ (CGContextRef) beginCGContextWithSize:(CGSize)size withColorSpace:(CGColorSpaceRef)colorSpaceRef andFlipped:(BOOL)flipped;
+ (CGContextRef) beginCGContextWithSize:(CGSize)size andFlipped:(BOOL)flipped;
+ (CGContextRef) beginCGContextWithSize:(CGSize)size;
+ (CGImageRef) releaseCGContextAndCreateImage:(CGContextRef)context;
+ (id) releaseContextAndCreatePlattformImage:(CGContextRef)context;

//Begin/End Plattform contexts
+ (void) beginPlattformContextWithCGContext:(CGContextRef)context flipped:(BOOL)flipped;
+ (void) beginPlattformContextWithCGContext:(CGContextRef)context;
+ (void) endPlattformContextWithCGContext:(CGContextRef)context;

//Paths
+ (void) addRoundRectPathInCGContext:(CGContextRef)context inRect:(CGRect)rect withCornerRadius:(float)radius;
+ (void) addInvertedRoundRectPathInCGContext:(CGContextRef)context inRect:(CGRect)rect withCornerRadius:(float)radius;
+ (void) addStraightEdgeRectPathInCGContext:(CGContextRef)context inRect:(CGRect)rect withCornerRadius:(float)radius;
+ (void) addStraightInnerEdgeRectPathInCGContext:(CGContextRef)context inRect:(CGRect)rect withCornerRadius:(float)radius;

@end
