Extract cairo_clear_surface.
This commit refactors the i3bar drawing code to also define an abstraction function for clearing a surface. This is needed to fully abstract i3bar/xcb.c's drawing code so that we can introduce a switch to easily exchange the underlying drawing mechanism.
This commit is contained in:
@ -89,6 +89,13 @@ void cairo_draw_text(i3String *text, surface_t *surface, color_t fg_color, color
|
||||
*/
|
||||
void cairo_draw_rectangle(surface_t *surface, color_t color, double x, double y, double w, double h);
|
||||
|
||||
/**
|
||||
* Clears a surface with the given color.
|
||||
* Note that the drawing is done using CAIRO_OPERATOR_SOURCE.
|
||||
*
|
||||
*/
|
||||
void cairo_clear_surface(surface_t *surface, color_t color);
|
||||
|
||||
/**
|
||||
* Copies a surface onto another surface.
|
||||
* Note that the drawing is done using CAIRO_OPERATOR_SOURCE.
|
||||
|
Reference in New Issue
Block a user