API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPImage Class Reference

#import <CPImage.h>

+ Inheritance diagram for CPImage:

Instance Methods

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

Class Methods

(CPImage+ cachedImageWithContentsOfFile:
 
(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

+ (CPImage) cachedImageWithContentsOfFile: (CPString aFile
implementation

Provided by category CPImage(CachedImage).

Definition at line 579 of file CPImageView.j.

- (CPData) data
implementation

Returns the data associated with this image. Returns nil if the reciever was not initialized with -initWithData: and the browser does not support the canvas feature;

Definition at line 214 of file CPImage.j.

- (id) delegate
implementation

Returns the receiver's delegate

Definition at line 322 of file CPImage.j.

- (CPString) description
implementation

Definition at line 413 of file CPImage.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Writes the image data from memory into the coder.

Parameters
aCoderthe coder to which the data will be written

Provided by category CPImage(CPCoding).

Definition at line 492 of file CPImage.j.

- (CPString) filename
implementation

Returns the path of the file associated with this image.

Definition at line 205 of file CPImage.j.

- (Image) image
implementation

Returns the underlying Image element for a single image.

Definition at line 305 of file CPImage.j.

+ (id) imageNamed: (CPString aName
implementation

Definition at line 258 of file CPImage.j.

- (id) init
implementation

Definition at line 124 of file CPImage.j.

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

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 138 of file CPImage.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the image with data from a coder.

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

Provided by category CPImage(CPCoding).

Definition at line 483 of file CPImage.j.

- (id) initWithContentsOfFile: (CPString aFilename
implementation

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 178 of file CPImage.j.

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

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 162 of file CPImage.j.

- (id) initWithData: (CPData someData
implementation

Initializes the receiver with the specified data. The method loads the data into memory.

Parameters
someDatathe CPData object representing the image
Returns
the initialized image

Definition at line 193 of file CPImage.j.

- (BOOL) isNinePartImage
implementation

Definition at line 408 of file CPImage.j.

- (BOOL) isSingleImage
implementation

Definition at line 398 of file CPImage.j.

- (BOOL) isThreePartImage
implementation

Definition at line 403 of file CPImage.j.

- (void) load
implementation

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 341 of file CPImage.j.

- (unsigned) loadStatus
implementation

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

Definition at line 330 of file CPImage.j.

- (CPString) name
implementation

Definition at line 297 of file CPImage.j.

- (void) setDelegate: (id)  aDelegate
implementation

Sets the receiver's delegate.

Parameters
thedelegate

Definition at line 314 of file CPImage.j.

- (BOOL) setName: (CPString aName
implementation

Definition at line 282 of file CPImage.j.

- (void) setSize: (CGSize)  aSize
implementation

Sets the size of the image.

Parameters
thesize of the image

Definition at line 245 of file CPImage.j.

- (CGSize) size
implementation

Returns the size of the image

Definition at line 253 of file CPImage.j.


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