CPImage Class Reference
List of all members.
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:
-
| image | the image that loaded |
-(void)imageDidError:(CPImage)image; Called when the specified image had an error loading.
- Parameters:
-
| image | the image with the loading error |
-(void)imageDidAbort:(CPImage)image; Called when the image loading was aborted.
- Parameters:
-
| image | the image that was aborted |
Definition at line 69 of file CPImage.j.
Member Function Documentation
- (id) delegate |
|
|
|
[implementation] |
Returns the receiver's delegate
Definition at line 171 of file CPImage.j.
- (void) encodeWithCoder: |
|
(CPCoder) |
aCoder |
|
[implementation] |
Writes the image data from memory into the coder.
- Parameters:
-
| aCoder | the coder to which the data will be written |
Definition at line 303 of file CPImage.j.
Returns the path of the file associated with this image.
Definition at line 137 of file CPImage.j.
- (CPImage) 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:
-
| aFilename | the file containing the image |
| aSize | the image's size |
- Returns:
- the initialized image
Definition at line 88 of file CPImage.j.
- (id) initWithCoder: |
|
(CPCoder) |
aCoder |
|
[implementation] |
Initializes the image with data from a coder.
- Parameters:
-
| aCoder | the coder from which to read the image data |
- Returns:
- the initialized image
Definition at line 294 of file CPImage.j.
Initializes the receiver with the contents of the specified image file. The method loads the data into memory.
- Parameters:
-
| aFilename | the file name of the image |
- Returns:
- the initialized image
Definition at line 124 of file CPImage.j.
- (CPImage) initWithContentsOfFile: |
|
(CPString) |
aFilename |
size: |
|
(CGSize) |
aSize | |
|
|
| | [implementation] |
Initializes the image. Loads the specified image into memory.
- Parameters:
-
| aFilename | the image to load |
| aSize | the size of the image |
- Returns:
- the initialized image.
Definition at line 108 of file CPImage.j.
- (BOOL) isNinePartImage |
|
|
|
[implementation] |
- (BOOL) isThreePartImage |
|
|
|
[implementation] |
- (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 190 of file CPImage.j.
- (BOOL) loadStatus |
|
|
|
[implementation] |
Returns YES
if the image data has already been loaded.
Definition at line 179 of file CPImage.j.
- (void) setDelegate: |
|
(id) |
aDelegate |
|
[implementation] |
Sets the receiver's delegate.
- Parameters:
-
Definition at line 163 of file CPImage.j.
- (void) setSize: |
|
(CGSize) |
aSize |
|
[implementation] |
Sets the size of the image.
- Parameters:
-
Definition at line 146 of file CPImage.j.
- (CGSize) size |
|
|
|
[implementation] |
Returns the size of the image
Definition at line 154 of file CPImage.j.
The documentation for this class was generated from the following file: