internal float[][] GetEventWidths(float xPos, int firstRow, int lastRow, bool includeHeaders)
{
if (includeHeaders)
{
firstRow = Math.Max(firstRow, headerRows);
lastRow = Math.Max(lastRow, headerRows);
}
float[][] widths = new float[(includeHeaders ? headerRows : 0) + lastRow - firstRow][];
if (isColspan)
{
int n = 0;
if (includeHeaders)
{
for (int k = 0; k < headerRows; ++k)
{
PdfPRow row = rows[k];
if (row == null)
++n;
else
widths[n++] = row.GetEventWidth(xPos, absoluteWidths);
}
}
for (; firstRow < lastRow; ++firstRow)
{
PdfPRow row = rows[firstRow];
if (row == null)
++n;
else
widths[n++] = row.GetEventWidth(xPos, absoluteWidths);
}
}
else
{
int numCols = NumberOfColumns;
float[] width = new float[numCols + 1];
width[0] = xPos;
for (int k = 0; k < numCols; ++k)
width[k + 1] = width[k] + absoluteWidths[k];
for (int k = 0; k < widths.Length; ++k)
widths[k] = width;
}
return widths;
}