GimpCairo-utils: GIMP Widgets Library Reference Manual

## GimpCairo-utils GimpCairo-utils — Utility functions for cairo |

## Functions

gboolean | gimp_cairo_set_focus_line_pattern ()
cairo_surface_t * | gimp_cairo_surface_create_from_pixbuf ()

## Description

Utility functions that make cairo easier to use with common GIMP data types.

## Functions

### gimp_cairo_set_focus_line_pattern ()

    gboolean
    gimp_cairo_set_focus_line_pattern (cairo_t *cr,
                                       GtkWidget *widget);

Sets color and dash pattern for stroking a focus line on the given `cr` . The line pattern is taken from `widget` .

#### Parameters

cr | Cairo context |
widget | widget to draw the focus indicator on |

#### Returns

`TRUE` if the widget style has a focus line pattern, `FALSE` otherwise

Since: 2.6

### gimp_cairo_surface_create_from_pixbuf ()

    cairo_surface_t *
    gimp_cairo_surface_create_from_pixbuf (GdkPixbuf *pixbuf);

Create a Cairo image surface from a GdkPixbuf.

You should avoid calling this function as there are probably more efficient ways of achieving the result you are looking for.

#### Parameters

pixbuf | a GdkPixbuf |

#### Returns

a cairo_surface_t.

Since: 2.6