Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 95

Previous Page 94   Index   Next Page 96

Table Functions
Page 95 of 750
The border with is inherited from columns and rows (in this order), but not from the table since the
table has its own border.
Individual values can be set to each side of a cell. Note that the properties will be not be rotated with
a cell. The left side is always left, independent of the cell orientation.
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.
Width > 0 and Height = 0 or Width = 0 and Height > 0 -> The image is scaled to the given width
or height. The aspect ratio will be preserved. If the flag tfScaleToRect is set, the image is
scaled so that both sides fit into the given width or height and into cell width or height
 

Previous topic: SetBoxProperty

Next topic: SetCellImageEx