From 4a4415fc2ec067fb79881e17e14953b69ef80e0c Mon Sep 17 00:00:00 2001 From: Arisotura Date: Mon, 3 Jun 2019 15:00:49 +0200 Subject: more work on OSD --- src/libui_sdl/libui/windows/draw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libui_sdl/libui/windows') diff --git a/src/libui_sdl/libui/windows/draw.cpp b/src/libui_sdl/libui/windows/draw.cpp index 11a777d..9a815b9 100644 --- a/src/libui_sdl/libui/windows/draw.cpp +++ b/src/libui_sdl/libui/windows/draw.cpp @@ -522,7 +522,7 @@ 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; HRESULT hr; @@ -532,7 +532,8 @@ uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height) D2D1_BITMAP_PROPERTIES bp2 = D2D1::BitmapProperties(); bp2.dpiX = 0; bp2.dpiY = 0; - bp2.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE); + bp2.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, + alpha ? D2D1_ALPHA_MODE_PREMULTIPLIED : D2D1_ALPHA_MODE_IGNORE); //c->rt->BeginDraw(); -- cgit v1.2.3