awn-cairo-utils

awn-cairo-utils

Functions

Types and Values

Object Hierarchy


Description

Functions

awn_cairo_rounded_rect ()

void
awn_cairo_rounded_rect (cairo_t *cr,
                        double x0,
                        double y0,
                        double width,
                        double height,
                        double radius,
                        AwnCairoRoundCorners state);

Draws a rounded rectangle via cairo.


awn_cairo_rounded_rect_shadow ()

void
awn_cairo_rounded_rect_shadow (cairo_t *cr,
                               double rx0,
                               double ry0,
                               double width,
                               double height,
                               double radius,
                               AwnCairoRoundCorners state,
                               double shadow_radius,
                               double shadow_alpha);

Draws a shadow for rounded rectangle via cairo.


awn_cairo_set_source_color ()

void
awn_cairo_set_source_color (cairo_t *cr,
                            DesktopAgnosticColor *color);

A convenience function which wraps cairo_set_source_rgba by using the values from the color parameter.

Parameters

cr

A cairo context.

 

color

The source color.

 

awn_cairo_set_source_color_with_alpha_multiplier ()

void
awn_cairo_set_source_color_with_alpha_multiplier
                               (cairo_t *cr,
                                DesktopAgnosticColor *color,
                                gdouble multiplier);

Similar to awn_cairo_set_source_color, except for the multiplier parameter.

Parameters

cr

A cairo context.

 

color

The source color.

 

multiplier

The number (between 0 and 1.0 inclusive) that the alpha value is multiplied by.

 

awn_cairo_set_source_color_with_multipliers ()

void
awn_cairo_set_source_color_with_multipliers
                               (cairo_t *cr,
                                DesktopAgnosticColor *color,
                                gdouble color_multiplier,
                                gdouble alpha_multiplier);

Similar to awn_cairo_set_source_color_with_alpha_multiplier, except that there is an additional color_multiplier parameter.

Parameters

cr

A cairo context.

 

color

The source color.

 

color_multiplier

The number that the color values are multiplied by.

 

alpha_multiplier

The number that the alpha value is multiplied by.

 

awn_cairo_pattern_add_color_stop_color ()

void
awn_cairo_pattern_add_color_stop_color
                               (cairo_pattern_t *pattern,
                                double offset,
                                DesktopAgnosticColor *color);

A convenience function which wraps cairo_pattern_add_color_stop_rgba by using the values from the color parameter.

Parameters

pattern

A cairo pattern.

 

offset

An offset in the range [0.0 .. 1.0].

 

color

The source color.

 

awn_cairo_pattern_add_color_stop_color_with_alpha_multiplier ()

void
awn_cairo_pattern_add_color_stop_color_with_alpha_multiplier
                               (cairo_pattern_t *pattern,
                                double offset,
                                DesktopAgnosticColor *color,
                                gdouble multiplier);

Similar to awn_cairo_pattern_add_color_stop_color, except for the multiplier parameter.

Parameters

pattern

A cairo pattern.

 

offset

An offset in the range [0.0 .. 1.0].

 

color

The source color.

 

multiplier

The number (between 0 and 1.0 inclusive) that the alpha value is multiplied by.

 

Types and Values

enum AwnCairoRoundCorners

Members

ROUND_NONE

   

ROUND_TOP_LEFT

   

ROUND_TOP_RIGHT

   

ROUND_BOTTOM_RIGHT

   

ROUND_BOTTOM_LEFT

   

ROUND_TOP

   

ROUND_BOTTOM

   

ROUND_LEFT

   

ROUND_RIGHT

   

ROUND_ALL