LinearGradient.this - multiple declarations

Function LinearGradient.this

Create a LinearGradient from a existing cairo_pattern_t*. LinearGradient is a garbage collected class. It will call cairo_pattern_destroy when it gets collected by the GC or when dispose() is called.

Prototype

this(
  cairo_pattern_t* ptr
);

Warning

ptr's reference count is not increased by this function! Adjust reference count before calling it if necessary

Only use this if you know what your doing! This function should not be needed for standard cairoD usage.

Function LinearGradient.this

Create a new linear gradient Pattern along the line defined by p1 and p2. Before using the gradient pattern, a number of color stops should be defined using Gradient.addColorStopRGB() or Gradient.addColorStopRGBA().

Prototypes

this(
  Point!(double) p1,
  Point!(double) p2
);

this(
  double x1,
  double y1,
  double x2,
  double y2
);

Parameters

NameDescription
p1 the start point
p2 the end point

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 Pattern.setMatrix().

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