aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/draw.c
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-04 15:53:08 +0200
committerGitHub <noreply@github.com>2019-06-04 15:53:08 +0200
commit97f4b5f70b67ea5cc142fbd1f3982c36b915a5d9 (patch)
treebd3fb3325db3743eef00cf3ddffafdeb644370a9 /src/libui_sdl/libui/unix/draw.c
parentf769d6e23f7635910e3f6659c6b55d8c6a8e96ff (diff)
parent3134c8fc66d1fbd5706930a3e3e64ce118406fe5 (diff)
Merge branch 'master' into fast-forward-hotkey
Diffstat (limited to 'src/libui_sdl/libui/unix/draw.c')
-rw-r--r--src/libui_sdl/libui/unix/draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libui_sdl/libui/unix/draw.c b/src/libui_sdl/libui/unix/draw.c
index e55397e..5befcd3 100644
--- a/src/libui_sdl/libui/unix/draw.c
+++ b/src/libui_sdl/libui/unix/draw.c
@@ -143,13 +143,13 @@ void uiDrawRestore(uiDrawContext *c)
// bitmap API
-uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height)
+uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height, int alpha)
{
uiDrawBitmap* bmp;
bmp = uiNew(uiDrawBitmap);
- bmp->bmp = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
+ bmp->bmp = cairo_image_surface_create(alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, width, height);
if (cairo_surface_status(bmp->bmp) != CAIRO_STATUS_SUCCESS)
implbug("error creating bitmap: %s",
cairo_status_to_string(cairo_surface_status(bmp->bmp)));