color.h File Reference

Descripes the Color struct and the corresponding functions and constants. More...

#include "../jnilib.h"

Include dependency graph for color.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Color
 Struct Color descripes a RGBA color. More...

Defines

#define CLS_COLOR   "java/awt/Color"
 Defines the full name of the Java Color-Class.

Typedefs

typedef Color Color
 Struct Color descripes a RGBA color.

Functions

jobject convertColor (const Color *color)
 Converts a Color struct to a Java Color-Object.
Color convertJavaColor (jobject color)
 Converts a Java Color-Object to a Color struct.

Variables

static const Color BLACK = {0, 0, 0, 255}
static const Color BLUE = {0, 0, 255, 255}
static const Color GRAY = {190, 190, 190, 255}
static const Color GREEN = {0, 255, 0, 255}
static const Color ORANGE = {255, 165, 0, 255}
static const Color RED = {255, 0, 0, 255}
static const Color WHITE = {255, 255, 255, 255}
static const Color YELLOW = {255, 255, 0, 255}


Detailed Description

Descripes the Color struct and the corresponding functions and constants.

This Color structure is an "equivalent" to the Java color. It holds the same values namely red, green, blue and alpha. Each value can be a number from 0 to 255. An alpha value of 0 means transparent and an alpha value of 255 means opaque.

Author:
Stefan Gruber
Date:
13.01.2005

Definition in file color.h.


Define Documentation

#define CLS_COLOR   "java/awt/Color"
 

Defines the full name of the Java Color-Class.

Definition at line 24 of file color.h.


Typedef Documentation

typedef struct Color Color
 

Struct Color descripes a RGBA color.

It holds the values for red, green, blue and alpha part of a color.


Function Documentation

jobject convertColor const Color color  ) 
 

Converts a Color struct to a Java Color-Object.

Parameters:
color - a Color struct
Returns:
Java Color-Object
See also:
convertJavaColor(jobject color)

Definition at line 65 of file color.c.

Color convertJavaColor jobject  color  ) 
 

Converts a Java Color-Object to a Color struct.

Parameters:
color - a Java Color-Object
Returns:
The Color struct with the values of the Color-Object
See also:
convertColor(const Color* color)

Definition at line 29 of file color.c.


Variable Documentation

const Color BLACK = {0, 0, 0, 255} [static]
 

Definition at line 39 of file color.h.

const Color BLUE = {0, 0, 255, 255} [static]
 

Definition at line 43 of file color.h.

const Color GRAY = {190, 190, 190, 255} [static]
 

Definition at line 40 of file color.h.

const Color GREEN = {0, 255, 0, 255} [static]
 

Definition at line 42 of file color.h.

const Color ORANGE = {255, 165, 0, 255} [static]
 

Definition at line 45 of file color.h.

const Color RED = {255, 0, 0, 255} [static]
 

Definition at line 41 of file color.h.

const Color WHITE = {255, 255, 255, 255} [static]
 

Definition at line 38 of file color.h.

const Color YELLOW = {255, 255, 0, 255} [static]
 

Definition at line 44 of file color.h.


Generated on Sat Nov 19 14:11:12 2005 for GrubC by  doxygen 1.4.4