summaryrefslogtreecommitdiff
path: root/core/fxge/win32
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/win32')
-rw-r--r--core/fxge/win32/fx_win32_device.cpp2
-rw-r--r--core/fxge/win32/fx_win32_dib.cpp10
-rw-r--r--core/fxge/win32/fx_win32_gdipext.cpp5
3 files changed, 7 insertions, 10 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index c67ed526d3..6e960f95b4 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -852,7 +852,7 @@ bool CGdiDeviceDriver::GDI_StretchDIBits(
if (m_DeviceClass == FXDC_PRINTER &&
((int64_t)pBitmap->GetWidth() * pBitmap->GetHeight() >
(int64_t)abs(dest_width) * abs(dest_height))) {
- pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height);
+ pToStrechBitmap = pBitmap->StretchTo(dest_width, dest_height, 0, nullptr);
}
CFX_ByteString toStrechBitmapInfo =
CFX_WindowsDIB::GetBitmapInfo(pToStrechBitmap);
diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp
index 677fb3ab80..d1e5688ee1 100644
--- a/core/fxge/win32/fx_win32_dib.cpp
+++ b/core/fxge/win32/fx_win32_dib.cpp
@@ -86,13 +86,11 @@ CFX_RetainPtr<CFX_DIBitmap> _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi,
temp_buf = nullptr;
}
if (pbmi->bmiHeader.biBitCount == 1) {
- for (int i = 0; i < 2; i++) {
- pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000);
- }
+ for (int i = 0; i < 2; i++)
+ pBitmap->SetPaletteArgb(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000);
} else if (pbmi->bmiHeader.biBitCount == 8) {
- for (int i = 0; i < 256; i++) {
- pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000);
- }
+ for (int i = 0; i < 256; i++)
+ pBitmap->SetPaletteArgb(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000);
}
return pBitmap;
}
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index 87172ffff8..d718dc8abf 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -647,9 +647,8 @@ static void OutputImage(GpGraphics* pGraphics,
UINT pal[258];
pal[0] = 0;
pal[1] = 256;
- for (int i = 0; i < 256; i++) {
- pal[i + 2] = pBitmap->GetPaletteEntry(i);
- }
+ for (int i = 0; i < 256; i++)
+ pal[i + 2] = pBitmap->GetPaletteArgb(i);
CallFunc(GdipSetImagePalette)(bitmap, (ColorPalette*)pal);
break;
}