mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Fix D2D DrawBitmap when source X/Y is not 0
This commit is contained in:
parent
31d717085e
commit
c7e172f906
@ -412,8 +412,9 @@ void CanvasD2D::DrawBitmap(Gdiplus::Bitmap* bitmap, const Gdiplus::Rect& dstRect
|
||||
// not using a hardware accelerated render target. Nevertheless, we will use it to avoid
|
||||
// the EndDraw() call needed for GDI+ drawing.
|
||||
Util::WICBitmapLockGDIP* bitmapLock = new Util::WICBitmapLockGDIP();
|
||||
Gdiplus::Rect lockRect(0, 0, bitmap->GetWidth(), bitmap->GetHeight());
|
||||
Gdiplus::Status status = bitmap->LockBits(
|
||||
&srcRect, Gdiplus::ImageLockModeRead, PixelFormat32bppPARGB, bitmapLock->GetBitmapData());
|
||||
&lockRect, Gdiplus::ImageLockModeRead, PixelFormat32bppPARGB, bitmapLock->GetBitmapData());
|
||||
if (status == Gdiplus::Ok)
|
||||
{
|
||||
D2D1_BITMAP_PROPERTIES props = D2D1::BitmapProperties(
|
||||
|
Loading…
Reference in New Issue
Block a user