DynaPDF Manual - Page 106

Previous Page 105   Index   Next Page 107

Table Functions
Page 106 of 839
TLineCapStyle Style, // Line cap style
const float* Dash,
// Dash pattern
UI32 NumValues,
// Number of values in Dash
float Phase)
// Dash phase
The function sets or changes the line dash pattern of a cell, row, or of the table. See
SetLineDashPattern2() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetCellImage
Syntax:
LBOOL tblSetCellImage(
const ITBL* Table, // Table pointer
SI32 Row,
// Row index or -1
SI32 Col,
// Column index or -1
LBOOL ForeGround,
// If true, the cell will be expanded if necessary
TCellAlign HAlign, // Horizontal alignment
TCellAlign VAlign, // Vertical alignment
float Width,
// Must be greater or equal zero
float Height,
// Must be greater or equal zero
const char* Image, // This should be an absolute path
UI32 Index)
// Image index (TIFF images only)
The function inserts an image horizontally and vertically aligned as specified. The image will be
loaded when the table is drawn. Therefore, it is recommended to use absolute paths so that the
image can still be loaded if the working directory was changed.
If the image is inserted as a background object, then it will be clipped if it does not fit into the cell
boundary. A cell can contain a background and a foreground object.
An image can also be added to the table as background object.
Foreground objects have a strong width and height. That means the cell will be expanded if
necessary.
Image formats which support no transparency are inserted opaque. Transparent GIF images are
inserted transparent and alpha channels in images will be considered. Images should normally be
inserted in the native image color space. To achieve this, set the flag tfUseImageCS with SetFlags().
Images can be scaled into the cell as follows:
Width = 0 and Height = 0 -> The image is scaled to the cell width or height depending on the
cell orientation. The aspect ratio will be preserved. If the flag tfScaleToRect is set, the image is
scaled so that both sides fit into the cell width and height. The row height must be greater
zero to achieve a meaningful result.
 

Previous topic: SetCellAction, SetCellDashPattern

Next topic: SetCellImageEx