Name
cpattern:GetCornerColorRGBA -- get corner color RGBA
Synopsis
status, r, g, b, a = cpattern:GetCornerColorRGBA(patch_num, corner_num)
Function
Gets the color information in corner corner_num of patch patch_num for a mesh pattern.

patch_num can range from 0 to n-1 where n is the number returned by cpattern:GetPatchCount().

Valid values for corner_num are from 0 to 3 and identify the corners as explained in cairo.PatternMesh().

Note that the color and alpha values are not premultiplied.

This function also returns #CAIRO_STATUS_SUCCESS, or #CAIRO_STATUS_INVALID_INDEX if patch_num or corner_num is not valid for the pattern. If the pattern is not a mesh pattern, #CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned.

Inputs
patch_num
the patch number to return data for
corner_num
the corner number to return data for
Results
status
#CAIRO_STATUS_SUCCESS or #CAIRO_STATUS_INVALID_INDEX
r
red component of color
g
green component of color
b
blue component of color
a
alpha component of color

Show TOC