Gradient.addColorStopRGB - multiple declarations

Function Gradient.addColorStopRGB

Adds an opaque color stop to a gradient pattern. The offset specifies the location along the gradient's control vector. For example, a LinearGradient's control vector is from (x0,y0) to (x1,y1) while a RadialGradient's control vector is from any point on the start circle to the corresponding point on the end circle.

The color is specified in the same way as in context.setSourceRGB().

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.

Prototypes

void addColorStopRGB(
  double offset,
  RGB color
);

void addColorStopRGB(
  double offset,
  double red,
  double green,
  double blue
);

Parameters

NameDescription
offset an offset in the range [0.0 .. 1.0]

Note

If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH.

Function Gradient.addColorStopRGB

Adds an opaque color stop to a gradient pattern. The offset specifies the location along the gradient's control vector. For example, a LinearGradient's control vector is from (x0,y0) to (x1,y1) while a RadialGradient's control vector is from any point on the start circle to the corresponding point on the end circle.

The color is specified in the same way as in context.setSourceRGB().

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.

Prototypes

void addColorStopRGB(
  double offset,
  RGB color
);

void addColorStopRGB(
  double offset,
  double red,
  double green,
  double blue
);

Parameters

NameDescription
offset an offset in the range [0.0 .. 1.0]

Note

If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH.

Function Gradient.addColorStopRGB

Adds an opaque color stop to a gradient pattern. The offset specifies the location along the gradient's control vector. For example, a LinearGradient's control vector is from (x0,y0) to (x1,y1) while a RadialGradient's control vector is from any point on the start circle to the corresponding point on the end circle.

The color is specified in the same way as in context.setSourceRGB().

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.

Prototypes

void addColorStopRGB(
  double offset,
  RGB color
);

void addColorStopRGB(
  double offset,
  double red,
  double green,
  double blue
);

Parameters

NameDescription
offset an offset in the range [0.0 .. 1.0]

Note

If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH.

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