DynaPDF Manual - Page 99

Previous Page 98   Index   Next Page 100

Table Functions
Page 99 of 839
= 0x30000000
// Delete both fore- and background objects
The function deletes the specified object types from the table. The parameter Types is a bit mask. The
content types and the fore- and background flags can be combined with a binary or operator. If the
foreground and background flags are both absent, then nothing will be deleted!
In C/C++ the usage is as follows:
tblClearContent(tbl, TDeleteContent(dcText | dcForeGround));
Other programming languages require no type cast.
Note that it is not required to explicitely clear the contents of a table. Existing contents can be
overriden at any time. However, when it is not known whether all cells get new values, then it is
recommended to clear the table beforehand.
It is also possible to clear the contents of specific rows or columns only. See ClearColumn() and
ClearRow() for further information.
void tblClearRow(
const ITBL* Table,
// Table pointer
UI32 Row,
// Row index
TDeleteContent Types) // See ClearContent()
The function deletes the content in the specified row. The parameter Types is described in
ITBL* tblCreateTable(
const PPDF* IPDF,
// PDF instance
UI32 AllocRows,
// Must be greater zero
UI32 NumCols,
// Must be greater zero
float Width,
// Table width
float DefRowHeight) // Default row height
The function creates a new table object. The parameter AllocRows specifies the number of rows which
should be pre-allocated. The value should be large enough to avoid unnecessary memory re-
allocations. Note that this is just the size of the array that holds the rows which will be added later.
Unused rows require 4 or 8 bytes memory (32 bit / 64 bit).
The default row height is used if the parameter Height of AddRow() or AddRows() is set to a
negative value.
The widths of the columns is set to the table width divided by the number of columns (Width /
The table must be deleted with DeleteTable() when finish to avoid a memory leak.

Previous topic: AddRows, ClearColumn, ClearContent

Next topic: DeleteCol, DeleteRow, DeleteRows, DeleteTable