Function Context.setSourceRGBA

Sets the source pattern within cr to a translucent color. This color will then be used for any subsequent drawing operation until a new source pattern is set.

The color and alpha 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 default source pattern is opaque black, (that is, it is equivalent to setSourceRGBA(0.0, 0.0, 0.0, 1.0)).

Prototypes

void setSourceRGBA(
  double red,
  double green,
  double blue,
  double alpha
);

void setSourceRGBA(
  RGBA rgba
);

Authors

Johannes Pfau cairoD
Andrej Mitrovic cairoD
cairo team cairo

Copyright

License

cairoD wrapper/bindings Boost License 1.0
cairo LGPL 2.1 / MPL 1.1