Class CPGraphicsContext

CPObject
    extended byCPGraphicsContext

@implementation CPGraphicsContext : CPObject

Provides an interface for drawing to the screen.


Method Summary
+(CPGraphicsContext)currentContext
          Returns the current graphics context.
+(CPGraphicsContext)graphicsContextWithGraphicsPort:(CGContext)aContext flipped:(BOOL)aFlag
          Creates a graphics context with a provided port.
+(void)setCurrentContext:(CPGraphicsContext)aGraphicsContext
          Sets the current graphics context.
-(id)initWithGraphicsPort:(CPContext)aGraphicsPort
          Initializes the context with a graphics port.
-(CGContext)graphicsPort
          Returns the graphics context's port.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass


Method Detail

currentContext

+(CPGraphicsContext)currentContext
Returns the current graphics context.

graphicsContextWithGraphicsPort

+(CPGraphicsContext)graphicsContextWithGraphicsPort:(CGContext)aContext flipped:(BOOL)aFlag
Creates a graphics context with a provided port.
Parameters:
aContext - the context to initialize with
aFlag - whether the context should be flipped
Returns:
the initialized graphics context

setCurrentContext

+(void)setCurrentContext:(CPGraphicsContext)aGraphicsContext
Sets the current graphics context
Parameters:
aGraphicsContext

initWithGraphicsPort

-(id)initWithGraphicsPort:(CPContext)aGraphicsPort
Initializes the context with a graphics port.
Parameters:
aGraphicsPort - the graphics port to initialize with
Returns:
the initialized context

graphicsPort

-(CGContext)graphicsPort
Returns the graphics context's port.

Created on Sat Sep 13 14:15:43 PDT 2008