|
| void | load_icon_themes (void) |
| |
| char * | color_to_string (struct color c, char buf[10]) |
| | Stringify a color struct to a RRGGBBAA string.
|
| |
| struct gradient * | gradient_alloc (size_t length) |
| |
| struct gradient * | gradient_acquire (struct gradient *grad) |
| |
| static void | gradient_free (struct gradient *grad) |
| |
| void | gradient_release (struct gradient *grad) |
| |
| void | gradient_pattern (struct gradient *grad) |
| |
| char * | gradient_to_string (const struct gradient *grad) |
| |
| void | draw_setup (void) |
| |
| static double | color_apply_delta (double base, double delta) |
| |
| static struct color | calculate_foreground_color (struct color bg) |
| |
| static struct color | layout_get_sepcolor (struct colored_layout *cl, struct colored_layout *cl_next) |
| |
| static int | get_horizontal_text_icon_padding (struct notification *n) |
| |
| static int | get_vertical_text_icon_padding (struct notification *n) |
| |
| static bool | have_progress_bar (const struct colored_layout *cl) |
| |
| static void | get_text_size (PangoLayout *l, int *w, int *h, double scale) |
| |
| static void | layout_setup_pango (PangoLayout *layout, int width, int height, bool word_wrap, PangoEllipsizeMode ellipsize_mode, PangoAlignment alignment) |
| |
| static void | layout_setup (struct colored_layout *cl, int width, int height, double scale) |
| |
| static void | free_colored_layout (void *data) |
| |
| static struct dimensions | calculate_notification_dimensions (struct colored_layout *cl, double scale) |
| |
| static struct dimensions | calculate_dimensions (GSList *layouts) |
| |
| static PangoLayout * | layout_create (cairo_t *c) |
| |
| static struct colored_layout * | layout_init_shared (cairo_t *c, struct notification *n) |
| |
| static struct colored_layout * | layout_derive_xmore (cairo_t *c, struct notification *n, int qlen) |
| |
| static struct colored_layout * | layout_from_notification (cairo_t *c, struct notification *n) |
| |
| static GSList * | create_layouts (cairo_t *c) |
| |
| static int | layout_get_height (struct colored_layout *cl, double scale) |
| |
| static int | frame_internal_radius (int r, int w, int h) |
| |
| static void | draw_rect (cairo_t *c, double x, double y, double width, double height, double scale) |
| | A small wrapper around cairo_rectange for drawing a scaled rectangle.
|
| |
| void | draw_rounded_rect (cairo_t *c, float x, float y, int width, int height, int corner_radius, double scale, enum corner_pos corners) |
| | Create a path on the given cairo context to draw the background of a notification.
|
| |
| static cairo_surface_t * | render_background (cairo_surface_t *srf, struct colored_layout *cl, struct colored_layout *cl_next, int y, int width, int height, int corner_radius, enum corner_pos corners, int *ret_width, double scale) |
| |
| static void | render_content (cairo_t *c, struct colored_layout *cl, int width, int height, double scale) |
| |
| static struct dimensions | layout_render (cairo_surface_t *srf, struct colored_layout *cl, struct colored_layout *cl_next, struct dimensions dim, enum corner_pos corners) |
| |
| void | calc_window_pos (const struct screen_info *scr, int width, int height, int *ret_x, int *ret_y) |
| | Calculates the position the window should be placed at given its width and height and stores them in ret_x and ret_y.
|
| |
| void | draw (void) |
| |
| void | draw_deinit (void) |
| |
| double | draw_get_scale (void) |
| |
- Copyright
- Copyright 2018-2026 Dunst contributors
- License
- BSD-3-Clause
Definition in file draw.c.
| void draw_rounded_rect |
( |
cairo_t * | c, |
|
|
float | x, |
|
|
float | y, |
|
|
int | width, |
|
|
int | height, |
|
|
int | corner_radius, |
|
|
double | scale, |
|
|
enum corner_pos | corners ) |
Create a path on the given cairo context to draw the background of a notification.
The top corners will get rounded by corner_radius, if first is set. Respectably the same for last with the bottom corners.
TODO: Pass additional frame width information to fix blurry lines due to fractional scaling X and Y can then be calculated as: x = round(x*scale) + half_frame_width
Definition at line 556 of file draw.c.