Chipmunk2D Pro API Reference  7.0.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Instance Methods | Class Methods | List of all members
ChipmunkImageSampler Class Reference

A CGBitmapContext sampler initialized with an CGImage. More...

#import <ChipmunkImageSampler.h>

Inherits ChipmunkCGContextSampler.

Instance Methods

(id) - initWithImage:isMask:contextWidth:contextHeight:
 Initialize an image sampler of a certain size with a CGImage. More...
 
(id) - initWithImageFile:isMask:
 Initialize an image sampler with an image file. More...
 
- Instance Methods inherited from ChipmunkCGContextSampler
(id) - initWithWidth:height:colorSpace:bitmapInfo:component:
 Initialize a context based sampler. More...
 
- Instance Methods inherited from ChipmunkBitmapSampler
(id) - initWithWidth:height:stride:bytesPerPixel:component:flip:pixelData:
 Init a sampler from bitmap data. More...
 
(void) - setBorderRepeat
 Set the border of the bitmap to repeat the edge pixels.
 
(void) - setBorderValue:
 Set the border of the bitmap to be a specific value.
 
(ChipmunkPolylineSet *) - marchAllWithBorder:hard:
 March the entire image.
 
- Instance Methods inherited from ChipmunkAbstractSampler
(id) - initWithSamplingFunction:
 Designated initializer.
 
(cpFloat- sample:
 Sample at a specific point.
 
(ChipmunkPolylineSet *) - march:xSamples:ySamples:hard:
 March a certain area of the sampler.
 

Class Methods

(CGImageRef) + loadImage:
 Helper method to easily load CGImageRefs by path. You are responsible for releasing the CGImage.
 
(ChipmunkImageSampler *) + samplerWithImageFile:isMask:
 Return an autoreleased image sampler initialized with an image file. More...
 

Additional Inherited Members

- Properties inherited from ChipmunkCGContextSampler
CGContextRef context
 CGBitmapContext for this sampler.
 
NSMutableData * pixelData
 NSMutableData object holding the pixel data.
 

Detailed Description

A CGBitmapContext sampler initialized with an CGImage.

Method Documentation

- (id) initWithImage: (CGImageRef)  image
isMask: (bool)  isMask
contextWidth: (NSUInteger)  width
contextHeight: (NSUInteger)  height 

Initialize an image sampler of a certain size with a CGImage.

If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded.

- (id) initWithImageFile: (NSURL *)  url
isMask: (bool)  isMask 

Initialize an image sampler with an image file.

If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded.

+ (ChipmunkImageSampler *) samplerWithImageFile: (NSURL *)  url
isMask: (bool)  isMask 

Return an autoreleased image sampler initialized with an image file.

If isMask is TRUE, the image will be loaded as a black and white image, if FALSE only the image alpha will be loaded.


The documentation for this class was generated from the following file: