handle = csurface:CreateSimilar(content, width, height)
The content parameter can be set to one of the following constants:
#CAIRO_CONTENT_COLOR#CAIRO_CONTENT_ALPHA#CAIRO_CONTENT_COLOR_ALPHAInitially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)
Use csurface:CreateSimilarImage() if you need an image surface which can be painted quickly to the target surface.
This function returns a handle to the newly allocated surface. The caller owns the surface and should call csurface:Free() when done with it.
This function always returns a valid handle, but it will return a handle to a "nil" surface if the source surface is already in an error state or any other error occurs.