mirror of
https://github.com/swaywm/sway.git
synced 2025-10-31 22:25:26 -04:00
extract cairo_set_source_u32()
This commit is contained in:
parent
d2af1f3395
commit
a5345e807e
5 changed files with 20 additions and 17 deletions
|
|
@ -1,6 +1,13 @@
|
|||
#include <cairo/cairo.h>
|
||||
#include "client/cairo.h"
|
||||
|
||||
void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
|
||||
cairo_set_source_rgba(cairo,
|
||||
(color >> (3*8) & 0xFF) / 255.0,
|
||||
(color >> (2*8) & 0xFF) / 255.0,
|
||||
(color >> (1*8) & 0xFF) / 255.0,
|
||||
(color >> (0*8) & 0xFF) / 255.0);
|
||||
}
|
||||
|
||||
#ifdef WITH_GDK_PIXBUF
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue