summaryrefslogtreecommitdiff
path: root/core/fxge/win32/fx_win32_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/win32/fx_win32_device.cpp')
-rw-r--r--core/fxge/win32/fx_win32_device.cpp60
1 files changed, 29 insertions, 31 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index ac13266444..41c3dc3ff1 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -781,13 +781,12 @@ void CGdiDeviceDriver::RestoreState(bool bKeepSaved) {
SaveDC(m_hDC);
}
-bool CGdiDeviceDriver::GDI_SetDIBits(
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap1,
- const FX_RECT* pSrcRect,
- int left,
- int top) {
+bool CGdiDeviceDriver::GDI_SetDIBits(const RetainPtr<CFX_DIBitmap>& pBitmap1,
+ const FX_RECT* pSrcRect,
+ int left,
+ int top) {
if (m_DeviceClass == FXDC_PRINTER) {
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1->FlipImage(false, true);
+ RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1->FlipImage(false, true);
if (!pBitmap)
return false;
@@ -806,7 +805,7 @@ bool CGdiDeviceDriver::GDI_SetDIBits(
dst_height, pBuffer, (BITMAPINFO*)info.c_str(),
DIB_RGB_COLORS, SRCCOPY);
} else {
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
+ RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
if (pBitmap->IsCmykImage()) {
pBitmap = pBitmap->CloneConvert(FXDIB_Rgb);
if (!pBitmap)
@@ -824,13 +823,13 @@ bool CGdiDeviceDriver::GDI_SetDIBits(
}
bool CGdiDeviceDriver::GDI_StretchDIBits(
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap1,
+ const RetainPtr<CFX_DIBitmap>& pBitmap1,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
uint32_t flags) {
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
+ RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
if (!pBitmap || dest_width == 0 || dest_height == 0)
return false;
@@ -845,7 +844,7 @@ bool CGdiDeviceDriver::GDI_StretchDIBits(
} else {
SetStretchBltMode(m_hDC, COLORONCOLOR);
}
- CFX_RetainPtr<CFX_DIBitmap> pToStrechBitmap = pBitmap;
+ RetainPtr<CFX_DIBitmap> pToStrechBitmap = pBitmap;
if (m_DeviceClass == FXDC_PRINTER &&
((int64_t)pBitmap->GetWidth() * pBitmap->GetHeight() >
(int64_t)abs(dest_width) * abs(dest_height))) {
@@ -862,14 +861,14 @@ bool CGdiDeviceDriver::GDI_StretchDIBits(
}
bool CGdiDeviceDriver::GDI_StretchBitMask(
- const CFX_RetainPtr<CFX_DIBitmap>& pBitmap1,
+ const RetainPtr<CFX_DIBitmap>& pBitmap1,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
uint32_t bitmap_color,
uint32_t flags) {
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
+ RetainPtr<CFX_DIBitmap> pBitmap = pBitmap1;
if (!pBitmap || dest_width == 0 || dest_height == 0)
return false;
@@ -1161,7 +1160,7 @@ CGdiDisplayDriver::CGdiDisplayDriver(HDC hDC)
CGdiDisplayDriver::~CGdiDisplayDriver() {}
-bool CGdiDisplayDriver::GetDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
+bool CGdiDisplayDriver::GetDIBits(const RetainPtr<CFX_DIBitmap>& pBitmap,
int left,
int top) {
bool ret = false;
@@ -1201,7 +1200,7 @@ bool CGdiDisplayDriver::GetDIBits(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
return ret;
}
-bool CGdiDisplayDriver::SetDIBits(const CFX_RetainPtr<CFX_DIBSource>& pSource,
+bool CGdiDisplayDriver::SetDIBits(const RetainPtr<CFX_DIBSource>& pSource,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
@@ -1242,14 +1241,14 @@ bool CGdiDisplayDriver::SetDIBits(const CFX_RetainPtr<CFX_DIBSource>& pSource,
return SetDIBits(bitmap, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL);
}
CFX_DIBExtractor temp(pSource);
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
+ RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
if (!pBitmap)
return false;
return GDI_SetDIBits(pBitmap, pSrcRect, left, top);
}
bool CGdiDisplayDriver::UseFoxitStretchEngine(
- const CFX_RetainPtr<CFX_DIBSource>& pSource,
+ const RetainPtr<CFX_DIBSource>& pSource,
uint32_t color,
int dest_left,
int dest_top,
@@ -1265,7 +1264,7 @@ bool CGdiDisplayDriver::UseFoxitStretchEngine(
dest_top += dest_height;
bitmap_clip.Offset(-dest_left, -dest_top);
- CFX_RetainPtr<CFX_DIBitmap> pStretched =
+ RetainPtr<CFX_DIBitmap> pStretched =
pSource->StretchTo(dest_width, dest_height, render_flags, &bitmap_clip);
if (!pStretched)
return true;
@@ -1275,16 +1274,15 @@ bool CGdiDisplayDriver::UseFoxitStretchEngine(
pClipRect->top, FXDIB_BLEND_NORMAL);
}
-bool CGdiDisplayDriver::StretchDIBits(
- const CFX_RetainPtr<CFX_DIBSource>& pSource,
- uint32_t color,
- int dest_left,
- int dest_top,
- int dest_width,
- int dest_height,
- const FX_RECT* pClipRect,
- uint32_t flags,
- int blend_type) {
+bool CGdiDisplayDriver::StretchDIBits(const RetainPtr<CFX_DIBSource>& pSource,
+ uint32_t color,
+ int dest_left,
+ int dest_top,
+ int dest_width,
+ int dest_height,
+ const FX_RECT* pClipRect,
+ uint32_t flags,
+ int blend_type) {
ASSERT(pSource && pClipRect);
if (flags || dest_width > 10000 || dest_width < -10000 ||
dest_height > 10000 || dest_height < -10000) {
@@ -1301,7 +1299,7 @@ bool CGdiDisplayDriver::StretchDIBits(
clip_rect.Intersect(*pClipRect);
clip_rect.Offset(-image_rect.left, -image_rect.top);
int clip_width = clip_rect.Width(), clip_height = clip_rect.Height();
- CFX_RetainPtr<CFX_DIBitmap> pStretched(
+ RetainPtr<CFX_DIBitmap> pStretched(
pSource->StretchTo(dest_width, dest_height, flags, &clip_rect));
if (!pStretched)
return true;
@@ -1325,7 +1323,7 @@ bool CGdiDisplayDriver::StretchDIBits(
(CWin32Platform*)CFX_GEModule::Get()->GetPlatformData();
if (pPlatform->m_GdiplusExt.IsAvailable() && !pSource->IsCmykImage()) {
CFX_DIBExtractor temp(pSource);
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
+ RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
if (!pBitmap)
return false;
return pPlatform->m_GdiplusExt.StretchDIBits(
@@ -1336,14 +1334,14 @@ bool CGdiDisplayDriver::StretchDIBits(
dest_width, dest_height, pClipRect, flags);
}
CFX_DIBExtractor temp(pSource);
- CFX_RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
+ RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
if (!pBitmap)
return false;
return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width,
dest_height, flags);
}
-bool CGdiDisplayDriver::StartDIBits(const CFX_RetainPtr<CFX_DIBSource>& pBitmap,
+bool CGdiDisplayDriver::StartDIBits(const RetainPtr<CFX_DIBSource>& pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,