Name
cairo.PatternRGBA -- create RGBA pattern
Synopsis
pat = cairo.PatternRGBA(red, green, blue, alpha)
Function
Creates a new Cairo pattern corresponding to a translucent color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

The color is specified in the same way as in ccontext:SetSourceRGB().

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
red
red component of the color
green
green component of the color
blue
blue component of the color
alpha
alpha component of the color
Results
pat
the newly created Cairo pattern

Show TOC