utils/cairo.h file

Cairo utilities.

Contents

Functions

void z_cairo_get_text_extents_for_widget(GtkWidget* widget, const char* text, int* width, int* height)
Gets the width of the given text in pixels for the given widget when z_cairo_draw_text() is used.
void z_cairo_get_text_extents_for_widget_full(GtkWidget* widget, const char* text, int* width, int* height, const char* font)
Gets the width of the given text in pixels for the given widget when using the given font settings.
void z_cairo_draw_text_full(cairo_t* cr, const char* text, int start_x, int start_y, const char* font)
Draws the given text using the given font starting at the given position.
static void z_cairo_diamond(cairo_t* cr, double x, double y, double width, double height)
Draws a diamond shape.
auto z_cairo_get_surface_from_icon_name(const char* icon_name, int size, int scale) -> cairo_surface_t*
Returns a surface for the icon name.

Defines

#define Z_CAIRO_FONT
Default font for drawing pango text.
#define Z_CAIRO_TEXT_PADDING
Padding to leave from the top/left edges when drawing text.