Up: GEOS SDK TechDocs | Up | Prev: Color ... | Next: CompSizeHintArgs ...

ColorFlag

typedef ByteEnum ColorFlag;
#define CF_INDEX			0
#define CF_GRAY			1
#define CF_SAME			2
#define CF_RGB			0x80

Several color-related commands accept colors in a variety of formats. The ColorFlag enumerated type is used to specify how the color is being described. The ColorFlag is normally used as part of a ColorQuad . See ColorQuad for information about how to interpret color specifications using ColorFlag s.

ColorMapMode

typedef ByteFlags ColorMapMode;
#define CMM_ON_BLACK 0x04				/* Set this bit if you're drawing on black */
#define CMM_MAP_TYPE 0x01				/* Either CMT_CLOSEST or CMT_DITHER) */
#define LAST_MAP_MODE				(CMM_MAP_TYPE | CMM_ON_BLACK)

This structure defines how the system will try to simulate colors not in the palette. If the map type is CMT_CLOSEST, the closest available color will be used. If the map type is CMT_DITHER, the system will mix together two or more close colors in a dithered pattern. If you will be drawing against a black background, you may wish to set the CMM_ON_BLACK flag.

ColorQuad

typedef struct {
byte 		CQ_redOrIndex;
ColorFlag	 	CQ_info;
byte 		CQ_green;
byte 		CQ_blue;
} ColorQuad;

This structure represents a color. The CQ_info field determines how the color is being described.

If the info field is CF_INDEX, then the color is being specified by its index, its place in the window's palette. The index is in the CQ_redOrIndex field; the the CQ_green and CQ_blue fields are meaningless for this specification.

If the info field is CF_RGB, then the color is specified by RGB (red, green, and blue) components. CQ_redOrIndex contains the color's red component, a number ranging from 0 to 255. The CQ_green and CQ_blue fields contain the color's green and blue components, respectively.

If the info field is CF_GRAY, then the color is being expressed as a grey scale. This is basically an optimized way of describing RGB colors where the red, green, and blue components are equal. The CQ_redOrIndex field contains the brightess, a number between 0 and 255. The CQ_green and CQ_blue fields are ignored.

When defining hatch patterns, it is possible have a CF_SAME info field. This means that the hatch lines should use the "same" color when drawing. That is, when hatching text, the text color will be used; when filling an area, the area color will be used. The CQ_redOrIndex , CQ_green , and CQ_blue fields are all ignored.

ColorQuadAsDWord

typedef dword ColorQuadAsDWord;

 

ColorTransfer

typedef struct {
RGBDelta				CT_data[125]; 
} ColorTransfer;

This structure consists of a 5x5x5 matrix of RGBDelta structures. This and be used to specify what sorts of adjustments to make to the color when displaying to a specific device. For instance, some color printers will wipe out certain colors if they try to use the amounts of ink suggested by the raw RGB values. The ColorTransfer structure thus serves to hold an array of "fudge factors" to tell the printer to use more or less ink than the raw RGB values would suggest.

ColorTransferData

typedef union {
MonoTransfer		CTD_mono;
RGBTransfer		CTD_rgb;
CMYKTransfer		CTD_cmyk;
} ColorTransferData;

 

ColorTransferType

typedef ByteEnum ColorTransferType;
#define CTT_MONO				 0
#define CTT_RGB 				 1
#define CTT_CMYK 				 2

 

CommonParameters

typedef struct {
word	CP_row;
word	CP_column;
word	CP_maxRow;
word	CP_maxColumn;
void	* CP_callback;
void	* CP_cellParams; /* ptr to an instance of SpreadsheetClass */
} CommonParameters;

 

CompChildFlags

typedef WordFlags CompChildFlags;
#define CCF_MARK_DIRTY				0x8000
#define CCF_REFERENCE				0x7fff
#define 		CCO_FIRST			0x0000
#define		CCO_LAST			0x7FFF
#define CCF_REFERENCE_OFFSET 0

A record used when adding, moving, or removing children in an object tree. The record has one flag and a value, as follows:

CCF_MARK_DIRTY
A flag indicating whether the object should be marked dirty at the end of the operation.
CCF_REFERENCE
A child number; when adding or moving a child, this is the child number after which the new object should be inserted. It can be any number less than 32768, or it can be either of the two constants shown above (CCO_FIRST or CCO_LAST).

Up: GEOS SDK TechDocs | Up | Prev: Color ... | Next: CompSizeHintArgs ...