cairomm 1.14.6

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Cairo::RadialGradient Class Reference

`#include <cairomm/pattern.h>`

Inheritance diagram for Cairo::RadialGradient:
[legend]

## Public Member Functions
| RadialGradient (cairo_pattern_t *cobject, bool has_reference=false)
| Create a C++ wrapper for the C instance.
void | get_radial_circles (double & x0, double & y0, double & r0, double & x1, double & y1, double & r1) const
| Gets the gradient endpoint circles for a radial gradient, each specified as a center coordinate and a radius.
| ~RadialGradient () override
Public Member Functions inherited from Cairo::Gradient
| Gradient (cairo_pattern_t *cobject, bool has_reference=false)
| Create a C++ wrapper for the C instance.
| ~Gradient () override
void | add_color_stop_rgb (double offset, double red, double green, double blue)
| Adds an opaque color stop to a gradient pattern.
void | add_color_stop_rgba (double offset, double red, double green, double blue, double alpha)
| Adds a translucent color stop to a gradient pattern.
std::vector< ColorStop > | get_color_stops () const
| Gets the color stops and offsets for this Gradient.
Public Member Functions inherited from Cairo::Pattern
| Pattern (cairo_pattern_t *cobject, bool has_reference=false)
| Create a C++ wrapper for the C instance.
| Pattern (const Pattern &)=delete
Pattern & | operator= (const Pattern &)=delete
virtual | ~Pattern ()
void | set_matrix (const Matrix & matrix)
| Sets the pattern's transformation matrix to @matrix.
void | get_matrix (Matrix & matrix) const
| Returns the pattern's transformation matrix.
Matrix | get_matrix () const
| Returns the pattern's transformation matrix.
void | set_matrix (const cairo_matrix_t & matrix)
void | get_matrix (cairo_matrix_t & matrix) const
PatternType | get_type () const
| Returns the type of the pattern.
void | set_extend (Extend extend)
| Sets the mode to be used for drawing outside the area of a pattern.
Extend | get_extend () const
| Gets the current extend mode See Cairo::Extend for details on the semantics of each extend strategy.
cobject * | cobj ()
const cobject * | cobj () const
void | reference () const
void | unreference () const

## Static Public Member Functions
static RefPtr< RadialGradient > | create (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
| Creates a new radial gradient #cairo_pattern_t between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1).

## Protected Member Functions
| RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
Protected Member Functions inherited from Cairo::Gradient
| Gradient ()
Protected Member Functions inherited from Cairo::Pattern
| Pattern ()

## Additional Inherited Members
Public Types inherited from Cairo::Pattern
typedef cairo_pattern_t | cobject
Protected Attributes inherited from Cairo::Pattern
cobject * | m_cobject

## Constructor & Destructor Documentation

## ◆ RadialGradient() [1/2]

Cairo::RadialGradient::RadialGradient | ( | double | cx0,
|  | double | cy0,
|  | double | radius0,
|  | double | cx1,
|  | double | cy1,
|  | double | radius1 )
| protected

## ◆ RadialGradient() [2/2]

Cairo::RadialGradient::RadialGradient | ( | cairo_pattern_t * | cobject,
|  | bool | has_reference = false )
| explicit

Create a C++ wrapper for the C instance.

This C++ instance should then be given to a RefPtr.

Parameters

  cobject | The C instance.
  has_reference | Whether we already have a reference. Otherwise, the constructor will take an extra reference.

## ◆ ~RadialGradient()

Cairo::RadialGradient::~RadialGradient | ( |  | ) |
| override

## Member Function Documentation

## ◆ create()

RefPtr< RadialGradient > Cairo::RadialGradient::create | ( | double | cx0,
|  | double | cy0,
|  | double | radius0,
|  | double | cx1,
|  | double | cy1,
|  | double | radius1 )
| static

Creates a new radial gradient #cairo_pattern_t between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1).

Before using the gradient pattern, a number of color stops should be defined using Cairo::Gradient::add_color_stop_rgb() or Cairo::Gradient::add_color_stop_rgba().

Note
  The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with Cairo::Pattern::set_matrix().

Parameters

  cx0 | x coordinate for the center of the start circle
  cy0 | y coordinate for the center of the start circle
  radius0 | radius of the start circle
  cx1 | x coordinate for the center of the end circle
  cy1 | y coordinate for the center of the end circle
  radius1 | radius of the end circle

## ◆ get_radial_circles()

void Cairo::RadialGradient::get_radial_circles | ( | double & | x0,
|  | double & | y0,
|  | double & | r0,
|  | double & | x1,
|  | double & | y1,
|  | double & | r1 ) const

Gets the gradient endpoint circles for a radial gradient, each specified as a center coordinate and a radius.

Parameters

  x0 | return value for the x coordinate of the center of the first (inner) circle
  y0 | return value for the y coordinate of the center of the first (inner) circle
  r0 | return value for the radius of the first (inner) circle
  x1 | return value for the x coordinate of the center of the second (outer) circle
  y1 | return value for the y coordinate of the center of the second (outer) circle
  r1 | return value for the radius of the second (outer) circle

Since
  1.4

The documentation for this class was generated from the following file:

- cairomm/pattern.h