cpattern:AddColorStopRGBA(offset, red, green, blue, alpha)
The color is specified in the same way as in ccontext:SetSourceRGBA().
If two (or more) stops are specified with identical offset values, they will be sorted according to the order in which the stops are added (stops added earlier will compare less than stops added later). This can be useful for reliably making sharp color transitions instead of the typical blend.
Note: If the pattern is not a gradient pattern, (e.g. a linear or
radial pattern), then the pattern will be put into an error status
with a status of #CAIRO_STATUS_PATTERN_TYPE_MISMATCH
.