A CGBitmapContext sampler initialized with an CGImage. More...
#import <ChipmunkImageSampler.h>
Inherits ChipmunkCGContextSampler.
Public Member Functions | |
(id) | - initWithImage:isMask:contextWidth:contextHeight: |
Initialize an image sampler of a certain size with a CGImage. | |
(id) | - initWithImageFile:isMask: |
Initialize an image sampler with an image file. | |
Static Public Member Functions | |
(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. |
A CGBitmapContext sampler initialized with an CGImage.
- (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.