Zrythm
a highly automated and intuitive digital audio workstation
|
Cairo utilities. More...
#include "gtk_wrapper.h"
Go to the source code of this file.
Data Structures | |
struct | CairoCaches |
Caches for cairo. More... | |
Macros | |
#define | CAIRO_CACHES (gZrythm->cairo_caches) |
#define | Z_CAIRO_FONT "Bold 9" |
Default font for drawing pango text. | |
#define | Z_CAIRO_TEXT_PADDING 2 |
Padding to leave from the top/left edges when drawing text. | |
#define | z_cairo_get_text_extents_for_widget(_widget, _layout, _text, _width, _height) |
#define | z_cairo_draw_text(cr, widget, layout, text) |
Draw text with default padding. | |
Functions | |
void | z_cairo_draw_horizontal_line (cairo_t *cr, double y, double from_x, double to_x, double line_width, double alpha) |
void | z_cairo_draw_vertical_line (cairo_t *cr, double x, double from_y, double to_y, double line_width) |
void | _z_cairo_get_text_extents_for_widget (GtkWidget *widget, PangoLayout *layout, const char *text, int *width, int *height) |
Gets the width of the given text in pixels for the given widget. | |
void | z_cairo_draw_text_full (cairo_t *cr, GtkWidget *widget, PangoLayout *layout, const char *text, int start_x, int start_y) |
Draws the given text using the given font starting at the given position. | |
cairo_surface_t * | z_cairo_get_surface_from_icon_name (const char *icon_name, int size, int scale) |
Returns a surface for the icon name. | |
PangoLayout * | z_cairo_create_pango_layout_from_string (GtkWidget *widget, const char *font, PangoEllipsizeMode ellipsize_mode, int ellipsize_padding) |
Creates a PangoLayout to be cached in widgets based on the given settings. | |
PangoLayout * | z_cairo_create_pango_layout_from_description (GtkWidget *widget, PangoFontDescription *descr, PangoEllipsizeMode ellipsize_mode, int ellipsize_padding) |
Creates a PangoLayout to be cached in widgets based on the given settings. | |
PangoLayout * | z_cairo_create_default_pango_layout (GtkWidget *widget) |
Creates a PangoLayout with default settings. | |
void | z_cairo_reset_caches (cairo_t **cr_cache, cairo_surface_t **surface_cache, int width, int height, cairo_t *new_cr) |
Resets a surface and cairo_t with a new surface and cairo_t based on the given rectangle and cairo_t. | |
CairoCaches * | z_cairo_caches_new (void) |
void | z_cairo_caches_free (CairoCaches *self) |
Cairo utilities.
Definition in file cairo.h.