API 0.9.5
CPImage Class Reference

#import <CPImage.h>

Inheritance diagram for CPImage:

List of all members.

Instance Methods

(id) - delegate
(CPString- description
(void) - encodeWithCoder:
(CPString- filename
(id) - init
(id) - initByReferencingFile:size:
(id) - initWithCoder:
(id) - initWithContentsOfFile:
(id) - initWithContentsOfFile:size:
(BOOL) - isNinePartImage
(BOOL) - isThreePartImage
(void) - load
(unsigned) - loadStatus
(CPString- name
(void) - setDelegate:
(BOOL) - setName:
(void) - setSize:
(CGSize) - size

Class Methods

(id) + imageNamed:

Detailed Description

CPImage is used to represent images in the Cappuccino framework. It supports loading all image types supported by the browser.

Delegate Methods

-(void)imageDidLoad:(CPImage)image; Called when the specified image has finished loading.

Parameters:
imagethe image that loaded

-(void)imageDidError:(CPImage)image; Called when the specified image had an error loading.

Parameters:
imagethe image with the loading error

-(void)imageDidAbort:(CPImage)image; Called when the image loading was aborted.

Parameters:
imagethe image that was aborted

Definition at line 2 of file CPImage.h.


Method Documentation

- (id) delegate

Returns the receiver's delegate

Definition at line 236 of file CPImage.j.

- (CPString) description

Definition at line 322 of file CPImage.j.

- (void) encodeWithCoder: (CPCoder aCoder

Writes the image data from memory into the coder.

Parameters:
aCoderthe coder to which the data will be written

Definition at line 401 of file CPImage.j.

- (CPString) filename

Returns the path of the file associated with this image.

Definition at line 158 of file CPImage.j.

+ (id) imageNamed: (CPString aName

Definition at line 180 of file CPImage.j.

- (id) init

Definition at line 96 of file CPImage.j.

- (id) initByReferencingFile: (CPString aFilename
size: (CGSize)  aSize 

Initializes the image, by associating it with a filename. The image denoted in aFilename is not actually loaded. It will be loaded once needed.

Parameters:
aFilenamethe file containing the image
aSizethe image's size
Returns:
the initialized image

Definition at line 109 of file CPImage.j.

- (id) initWithCoder: (CPCoder aCoder

Initializes the image with data from a coder.

Parameters:
aCoderthe coder from which to read the image data
Returns:
the initialized image

Definition at line 392 of file CPImage.j.

- (id) initWithContentsOfFile: (CPString aFilename

Initializes the receiver with the contents of the specified image file. The method loads the data into memory.

Parameters:
aFilenamethe file name of the image
Returns:
the initialized image

Definition at line 145 of file CPImage.j.

- (id) initWithContentsOfFile: (CPString aFilename
size: (CGSize)  aSize 

Initializes the image. Loads the specified image into memory.

Parameters:
aFilenamethe image to load
aSizethe size of the image
Returns:
the initialized image.

Definition at line 129 of file CPImage.j.

- (BOOL) isNinePartImage

Definition at line 317 of file CPImage.j.

- (BOOL) isThreePartImage

Definition at line 312 of file CPImage.j.

- (void) load

Loads the image data from the file into memory. You should not call this method directly. Instead use one of the initializers.

Definition at line 255 of file CPImage.j.

- (unsigned) loadStatus

Returns the load status, which will be CPImageLoadStatusCompleted if the image data has already been loaded.

Definition at line 244 of file CPImage.j.

- (CPString) name

Definition at line 219 of file CPImage.j.

- (void) setDelegate: (id)  aDelegate

Sets the receiver's delegate.

Parameters:
thedelegate

Definition at line 228 of file CPImage.j.

- (BOOL) setName: (CPString aName

Definition at line 204 of file CPImage.j.

- (void) setSize: (CGSize)  aSize

Sets the size of the image.

Parameters:
thesize of the image

Definition at line 167 of file CPImage.j.

- (CGSize) size

Returns the size of the image

Definition at line 175 of file CPImage.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines