# NNS_G2dCharCanvasCalcCellDataSize*

## C Specification

      #include <nnsys/g2d/g2d_CharCanvas.h>

      size_t NNS_G2dCharCanvasCalcCellDataSize1D(
      const NNSG2dCharCanvas* pCC,
          BOOL makeBR
      );

      size_t NNS_G2dCharCanvasCalcCellDataSize2DRect(
      const NNSG2dCharCanvas* pCC,
          BOOL makeBR
      );

## Arguments

pCC | [IN] Pointer to CharCanvas
makeBR | [IN] Specifies whether bounding rectangle information should be attached.

## Return Values

Returns the buffer size (in units of bytes) that should be passed as the first argument of `NNS_G2dCharCanvasMakeCell1D()` or `NNS_G2dCharCanvasMakeCell2DRect()`.

## Description

Calculates the buffer size (in units of bytes) that should be passed as the first argument of `NNS_G2dCharCanvasMakeCell1D()` or `NNS_G2dCharCanvasMakeCell2DRect()`.

The expression for the calculation is shown below. Note that `{the number of OBJs needed to display CharCanvas}` in the expression is a value obtained using either `NNS_G2dArrangeOBJ1D()` or `NNS_G2dArrangeOBJ2DRect()`.

    {Buffer size} = sizeof(NNSG2dCellData)
    + sizeof(NNSG2dCellOAMAttrData) * {the number of OBJ needed to display CharCanvas}
    + sizeof(NNSG2dCellBoundingRectS16) * (makeBR ? 1: 0)

## See Also

``

## Revision History

07/12/2005 Initial version.