DynaPDF Manual - Page 111
Previous Page 110 Index Next Page 112
Table Functions
Page 111 of 839
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColor
Syntax:
LBOOL tblSetColor(
const ITBL* Table, // Table pointer
SI32 Row,
// Row index or -1
SI32 Col,
// Column index or -1
TTableColor Type,
// see below
TPDFColorSpace CS, // Color space in which the color is defined
UI32 Color)
// Color value
typedef enum
{
tcBackColor
= 0, // Table, Columns, Rows, Cells -> default none
tcBorderColor
= 1, // Table, Columns, Rows, Cells -> default black
tcGridHorzColor = 2, // Table
-> default black
tcGridVertColor = 3, // Table
-> default black
tcImageColor
= 4, // Table, Columns, Rows, Cells -> default black
tcTextColor
= 5
// Table, Columns, Rows, Cells -> default black
}TTableColor;
The function sets or changes the specified color as well as the corresponding device color space.
Colors of an extended color space can be set with SetColorEx().
The text color is inherited from the table, column, and row, in this order. The border color is
inherited from columns and rows but not from the table since the table has its own border.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColorEx
Syntax:
LBOOL tblSetColorEx(
const ITBL* Table, // Table pointer
SI32 Row,
// Row index or -1
SI32 Col,
// Column index or -1
TTableColor Type,
// see below
float* Color,
// One value per component
UI32 NumComps,
// Number of components
TExtColorSpace CS, // Color space
SI32 Handle)
// Color space handle of non-device color space
typedef enum
{
tcBackColor
= 0, // Table, Columns, Rows, Cells -> default none
tcBorderColor
= 1, // Table, Columns, Rows, Cells -> default black
Previous topic: SetCellText
Next topic: SetColWidth