Coconut Data Framework
beta
|
Define CNPixmap class. More...
#import <CoconutXML/CoconutXML.h>
#import <libxml/tree.h>
#import <assert.h>
Go to the source code of this file.
Classes | |
struct | CNPixmap |
Data structure for pixmap. More... | |
struct | CNPixmapMethods |
Table of methods for CNPixmap instance. More... | |
Typedefs | |
typedef struct CNColor * | CNPixel |
Type for pixel. | |
Functions | |
struct CNPixmap * | CNAllocatePixmap (struct CNString *name, unsigned int width, unsigned int height, struct CNResource *resource) |
Initialize the content of pixmap. | |
static void | CNReleasePixmap (struct CNPixmap *dst) |
Release CNPixmap object. | |
struct CNPixmap * | CNClonePixmap (struct CNPixmap *src) |
Allocate the clone of pixmap. | |
static struct CNString * | CNNameOfPixmap (const struct CNPixmap *src) |
Get name of pixmap. | |
static void | CNSetNameToPixmap (struct CNPixmap *dst, struct CNString *newname) |
Set name of pixmap. | |
void | CNFillPixmap (struct CNPixmap *dst, CNPixel src) |
Fill the pixmap by a pixel. | |
void | CNCopyPixmap (struct CNPixmap *dst, const struct CNPixmap *src) |
Copy pixmap context from src to dst. | |
static const CNPixel * | CNPixelsInPixmap (const struct CNPixmap *src) |
Get array of pixels in pixmap. | |
static CNPixel | CNPixelInPixmap (const struct CNPixmap *src, unsigned int x, unsigned int y) |
Get pixel in pixmap. | |
static void | CNSetPixelToPixmap (struct CNPixmap *dst, unsigned int x, unsigned int y, const struct CNColor *src) |
Set pixel to pixmap. | |
static unsigned int | CNWidthOfPixmap (const struct CNPixmap *src) |
Get width of the CNPixmap instance. | |
static unsigned int | CNHeightOfPixmap (const struct CNPixmap *src) |
Get height of the CNPixmap instance. | |
static struct CNColor ** | CNVectorOfPixmap (const struct CNPixmap *src) |
Get array of pixels of the CNPixmap instance. | |
NSInteger | CNComparePixmap (const struct CNPixmap *s0, const struct CNPixmap *s1) |
Compare pixmaps. | |
const xmlChar * | CNElementNameOfPixmap (void) |
Get the element name for CNPixmap. | |
xmlNodePtr | CNEncodePixmap (const struct CNPixmap *src) |
Encode CNPixmap into XML. | |
struct CNPixmap * | CNDecodePixmap (xmlNodePtr src, struct CNResource *resource, struct CNXMLDecodeError *error) |
Decode XML node and generate CNPixmap object. |
Define CNPixmap class.
struct CNPixmap* CNAllocatePixmap | ( | struct CNString * | name, |
unsigned int | width, | ||
unsigned int | height, | ||
struct CNResource * | resource | ||
) | [read] |
Initialize the content of pixmap.
name | Name of pixmap (You can pass NULL) |
width | Width of this pixmap |
height | Height of this pixmap |
resource | Resource to allocate pixmap |
static void CNReleasePixmap | ( | struct CNPixmap * | dst | ) | [inline, static] |
Allocate the clone of pixmap.
src | Source pixmap |
static struct CNString* CNNameOfPixmap | ( | const struct CNPixmap * | src | ) | [static, read] |
Get name of pixmap.
src | Source pixmap |
References CNPixmap::name.
static void CNSetNameToPixmap | ( | struct CNPixmap * | dst, |
struct CNString * | newname | ||
) | [inline, static] |
Set name of pixmap.
dst | Destination pixmap |
newname | Pixmap name |
References CNPixmap::name.
Fill the pixmap by a pixel.
dst | Destination pixmap |
src | Source color to fill the pixel |
Copy pixmap context from src to dst.
dst | Destination pixmap |
src | Source pixmap |
Get array of pixels in pixmap.
src | Source pixmap |
References CNPixmap::pixels.
static CNPixel CNPixelInPixmap | ( | const struct CNPixmap * | src, |
unsigned int | x, | ||
unsigned int | y | ||
) | [inline, static] |
Get pixel in pixmap.
src | Source pixmap |
x | X position in the source pixmap |
y | Y position in the source pixmap |
References CNPixmap::pixels, and CNPixmap::width.
static void CNSetPixelToPixmap | ( | struct CNPixmap * | dst, |
unsigned int | x, | ||
unsigned int | y, | ||
const struct CNColor * | src | ||
) | [inline, static] |
Set pixel to pixmap.
dst | Destination pixmap |
x | X position of the pixel to be set |
y | Y position of the pixel to be set |
src | Source pixel to set |
References CNPixmap::pixels, and CNPixmap::width.
static unsigned int CNWidthOfPixmap | ( | const struct CNPixmap * | src | ) | [inline, static] |
Get width of the CNPixmap instance.
src | Source pixmap |
References CNPixmap::width.
static unsigned int CNHeightOfPixmap | ( | const struct CNPixmap * | src | ) | [inline, static] |
Get height of the CNPixmap instance.
src | Source pixmap |
References CNPixmap::height.
Get array of pixels of the CNPixmap instance.
src | Source pixmap |
References CNPixmap::pixels.
Compare pixmaps.
negative | s0 is smaller than s1 |
0 | s0 and s1 are same |
positive | s0 is bigger than s0 |
s0 | Source pixmap 0 |
s1 | Source pixmap 1 |
const xmlChar* CNElementNameOfPixmap | ( | void | ) |
Get the element name for CNPixmap.
xmlNodePtr CNEncodePixmap | ( | const struct CNPixmap * | src | ) |
struct CNPixmap* CNDecodePixmap | ( | xmlNodePtr | src, |
struct CNResource * | resource, | ||
struct CNXMLDecodeError * | error | ||
) | [read] |
Decode XML node and generate CNPixmap object.
pixmap | Allocated pixmap |
NULL | Allocation failed |
src | Source XML node + |
resource | Resource to allocate the new object |
error | Error information |