Dear graphic geniuses
When using the cairo gem recently, I noticed that there seems to be an error built into the bounds checking for allowed operators.
Since 1.10, we should be able to use operators above CAIRO_OPERATOR_SATURATE, but the hard limits defined in rb_cairo_constants.c still list that value as CAIRO_OPERATOR_MAX.
When trying to set the operator with Context#operator=, therefore, this error is registered:
`set_operator': invalid operator: 15 (expect 0 <= operator <= 13)
I updated the max limit to be CAIRO_OPERATOR_HSL_LUMINOSITY, which is now the largest supported operator, and was able to make everything work. Please review the commit in this pull request for correctness.
Updated CAIRO_OPERATOR_MAX to CAIRO_OPERATOR_HSL_LUMINOSITY
update cairo_operator_t limitation check for cairo 1.10. fixes #6
Reported by Matt Bramlage. Thanks!!!
Thanks for your report!
We also need to support cairo < 1.10. So I add #if for cairo < 1.10.