cairomm  1.16.2
Public Member Functions | Static Public Member Functions | List of all members
Cairo::SolidPattern Class Reference

#include <cairomm/pattern.h>

Inheritance diagram for Cairo::SolidPattern:
Inheritance graph
[legend]

Public Member Functions

 SolidPattern (cairo_pattern_t *cobject, bool has_reference=false)
 Create a C++ wrapper for the C instance. More...
 
void get_rgba (double & red, double & green, double & blue, double & alpha) const
 Gets the solid color for a solid color pattern. More...
 
 ~SolidPattern () override
 
- Public Member Functions inherited from Cairo::Pattern
 Pattern (cairo_pattern_t *cobject, bool has_reference=false)
 Create a C++ wrapper for the C instance. More...
 
 Pattern (const Pattern &)=delete
 
Patternoperator= (const Pattern &)=delete
 
virtual ~Pattern ()
 
void set_matrix (const Matrix & matrix)
 Sets the pattern's transformation matrix to @matrix. More...
 
void get_matrix (Matrix & matrix) const
 Returns the pattern's transformation matrix. More...
 
Matrix get_matrix () const
 Returns the pattern's transformation matrix. More...
 
Type get_type () const
 Returns the type of the pattern. More...
 
void set_extend (Extend extend)
 Sets the mode to be used for drawing outside the area of a pattern. More...
 
Extend get_extend () const
 Gets the current extend mode See Cairo::Extend for details on the semantics of each extend strategy. More...
 
cobjectcobj ()
 
const cobjectcobj () const
 
void reference () const
 
void unreference () const
 

Static Public Member Functions

static RefPtr< SolidPatterncreate_rgb (double red, double green, double blue)
 Creates a new Cairo::Pattern corresponding to an opaque color. More...
 
static RefPtr< SolidPatterncreate_rgba (double red, double green, double blue, double alpha)
 Creates a new Cairo::Pattern corresponding to a translucent color. More...
 

Additional Inherited Members

- Public Types inherited from Cairo::Pattern
enum class  Type {
  SOLID = CAIRO_PATTERN_TYPE_SOLID ,
  SURFACE = CAIRO_PATTERN_TYPE_SURFACE ,
  LINEAR = CAIRO_PATTERN_TYPE_LINEAR ,
  RADIAL = CAIRO_PATTERN_TYPE_RADIAL
}
 Type is used to describe the type of a given pattern. More...
 
enum class  Extend {
  NONE = CAIRO_EXTEND_NONE ,
  REPEAT = CAIRO_EXTEND_REPEAT ,
  REFLECT = CAIRO_EXTEND_REFLECT ,
  PAD = CAIRO_EXTEND_PAD
}
 Cairo::Extend is used to describe how pattern color/alpha will be determined for areas "outside" the pattern's natural area, (for example, outside the surface bounds or outside the gradient geometry). More...
 
typedef cairo_pattern_t cobject
 
- Protected Member Functions inherited from Cairo::Pattern
 Pattern ()
 
- Protected Attributes inherited from Cairo::Pattern
cobjectm_cobject
 

Constructor & Destructor Documentation

◆ SolidPattern()

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

Create a C++ wrapper for the C instance.

Parameters
cobjectThe C instance.
has_referenceWhether we already have a reference. Otherwise, the constructor will take an extra reference.

◆ ~SolidPattern()

Cairo::SolidPattern::~SolidPattern ( )
override

Member Function Documentation

◆ create_rgb()

static RefPtr<SolidPattern> Cairo::SolidPattern::create_rgb ( double  red,
double  green,
double  blue 
)
static

Creates a new Cairo::Pattern corresponding to an opaque color.

The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

Parameters
redred component of the color
greengreen component of the color
blueblue component of the color

◆ create_rgba()

static RefPtr<SolidPattern> Cairo::SolidPattern::create_rgba ( double  red,
double  green,
double  blue,
double  alpha 
)
static

Creates a new Cairo::Pattern corresponding to a translucent color.

The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.

Parameters
redred component of the color
greengreen component of the color
blueblue component of the color
alphaalpha component of the color

◆ get_rgba()

void Cairo::SolidPattern::get_rgba ( double &  red,
double &  green,
double &  blue,
double &  alpha 
) const

Gets the solid color for a solid color pattern.

Parameters
redreturn value for red component of color
greenreturn value for green component of color
bluereturn value for blue component of color
alphareturn value for alpha component of color
Since
1.4

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