Set the size of a widget's canvas
int PtResizeCanvas( PtWidget_t *widget, PhDim_t const *render );
This function changes the canvas belonging to the given widget to be the size specified in the PhDim_t pointed to by render.
This function is similar to PtAttemptResize(), but is easier to use.
The widget's actual size, widget->area.size, is modified. If the widget's resize policy prevents PtResizeCanvas() from adjusting the widget's size (i.e. the canvas won't fit within the provided render rectangle), PtResizeCanvas() sets the Pt_UCLIP bit in the widget's resize flags. If this bit is set, the widget's Draw method should apply clipping via PtClipAdd() before rendering its data.
0 if the size didn't change, or nonzero if the height or width changed.
PtAttemptResize(), PtChildBoundingBox(), PtClipAdd(), PtClipRemove()
PgExtentText(), PhDim_t, PtCalcCanvas() in the Photon Library Reference