Name
cairo.PatternForSurface -- create pattern for surface
Synopsis
pat = cairo.PatternForSurface(surface)
Function
Create a new Cairo pattern for the given surface.

This function returns the newly created Cairo pattern if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cpattern:Free() when finished with it.

This function will always return a valid handle, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cpattern:Status().

Inputs
surface
the surface
Results
pat
the newly created Cairo pattern

Show TOC