# SetTextCelSize

Sets new size for text in cel.

### Synopsis

`Err SetTextCelSize (TextCel *tCel, int32 width, int32 height)`

### Description

Sets a new size for the text cel. If width and/or height are zero, the cel is set to a 1 x 1 pixel size initially, and each time text is placed into the cel the size automatically changes to reflect the size of the characters actually in the cel.

Whenever you change a cel's size, you lose the cel's current contents, because the data buffer is discarded and reallocated at the new size, and after allocation all pixels in the buffer are set to zero.

### Arguments

tCel
  Pointer to a TextCel structure.

width
  New width for the cel.

height
  New height for the cel.

### Return Value

Non-negative if successful, or negative if a new cel data buffer can't be allocated.

### Associated Files

lib3do.lib, textlib.h