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.cpp165
-rw-r--r--core/fxge/win32/fx_win32_print.cpp52
-rw-r--r--core/fxge/win32/win32_int.h44
3 files changed, 91 insertions, 170 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index a8ad1a37cd..c2084f2877 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -753,6 +753,8 @@ CGdiDeviceDriver::CGdiDeviceDriver(HDC hDC, int device_class) {
}
}
+CGdiDeviceDriver::~CGdiDeviceDriver() {}
+
int CGdiDeviceDriver::GetDeviceCaps(int caps_id) {
switch (caps_id) {
case FXDC_DEVICE_CLASS:
@@ -989,14 +991,12 @@ FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int alpha_flag,
- void* pIccTransform,
int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL) {
+ if (blend_type != FXDIB_BLEND_NORMAL)
return FALSE;
- }
- Color2Argb(fill_color, fill_color, alpha_flag | (1 << 24), pIccTransform);
- Color2Argb(stroke_color, stroke_color, alpha_flag, pIccTransform);
+
+ Color2Argb(fill_color, fill_color, 1 << 24, nullptr);
+ Color2Argb(stroke_color, stroke_color, 0, nullptr);
CWin32Platform* pPlatform =
(CWin32Platform*)CFX_GEModule::Get()->GetPlatformData();
if (!(pGraphState || stroke_color == 0) &&
@@ -1007,24 +1007,23 @@ FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
}
FX_RECT bbox = bbox_f.GetInnerRect();
if (bbox.Width() <= 0) {
- return DrawCosmeticLine((FX_FLOAT)(bbox.left), (FX_FLOAT)(bbox.top),
- (FX_FLOAT)(bbox.left),
- (FX_FLOAT)(bbox.bottom + 1), fill_color,
- alpha_flag, pIccTransform, FXDIB_BLEND_NORMAL);
- } else if (bbox.Height() <= 0) {
+ return DrawCosmeticLine(
+ (FX_FLOAT)(bbox.left), (FX_FLOAT)(bbox.top), (FX_FLOAT)(bbox.left),
+ (FX_FLOAT)(bbox.bottom + 1), fill_color, FXDIB_BLEND_NORMAL);
+ }
+ if (bbox.Height() <= 0) {
return DrawCosmeticLine((FX_FLOAT)(bbox.left), (FX_FLOAT)(bbox.top),
(FX_FLOAT)(bbox.right + 1), (FX_FLOAT)(bbox.top),
- fill_color, alpha_flag, pIccTransform,
- FXDIB_BLEND_NORMAL);
+ fill_color, FXDIB_BLEND_NORMAL);
}
}
int fill_alpha = FXARGB_A(fill_color);
int stroke_alpha = FXARGB_A(stroke_color);
FX_BOOL bDrawAlpha = (fill_alpha > 0 && fill_alpha < 255) ||
(stroke_alpha > 0 && stroke_alpha < 255 && pGraphState);
- if (!pPlatform->m_GdiplusExt.IsAvailable() && bDrawAlpha) {
+ if (!pPlatform->m_GdiplusExt.IsAvailable() && bDrawAlpha)
return FALSE;
- }
+
if (pPlatform->m_GdiplusExt.IsAvailable()) {
if (bDrawAlpha ||
((m_DeviceClass != FXDC_PRINTER && !(fill_mode & FXFILL_FULLCOVER)) ||
@@ -1092,24 +1091,22 @@ FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
return TRUE;
}
-FX_BOOL CGdiDeviceDriver::FillRect(const FX_RECT* pRect,
- uint32_t fill_color,
- int alpha_flag,
- void* pIccTransform,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL) {
+FX_BOOL CGdiDeviceDriver::FillRectWithBlend(const FX_RECT* pRect,
+ uint32_t fill_color,
+ int blend_type) {
+ if (blend_type != FXDIB_BLEND_NORMAL)
return FALSE;
- }
- Color2Argb(fill_color, fill_color, alpha_flag | (1 << 24), pIccTransform);
+
+ Color2Argb(fill_color, fill_color, 1 << 24, nullptr);
int alpha;
FX_COLORREF rgb;
ArgbDecode(fill_color, alpha, rgb);
- if (alpha == 0) {
+ if (alpha == 0)
return TRUE;
- }
- if (alpha < 255) {
+
+ if (alpha < 255)
return FALSE;
- }
+
HBRUSH hBrush = CreateSolidBrush(rgb);
::FillRect(m_hDC, (RECT*)pRect, hBrush);
DeleteObject(hBrush);
@@ -1153,19 +1150,17 @@ FX_BOOL CGdiDeviceDriver::DrawCosmeticLine(FX_FLOAT x1,
FX_FLOAT x2,
FX_FLOAT y2,
uint32_t color,
- int alpha_flag,
- void* pIccTransform,
int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL) {
+ if (blend_type != FXDIB_BLEND_NORMAL)
return FALSE;
- }
- Color2Argb(color, color, alpha_flag | (1 << 24), pIccTransform);
+
+ Color2Argb(color, color, 1 << 24, nullptr);
int a;
FX_COLORREF rgb;
ArgbDecode(color, a, rgb);
- if (a == 0) {
+ if (a == 0)
return TRUE;
- }
+
HPEN hPen = CreatePen(PS_SOLID, 1, rgb);
hPen = (HPEN)SelectObject(m_hDC, hPen);
MoveToEx(m_hDC, FXSYS_round(x1), FXSYS_round(y1), nullptr);
@@ -1184,11 +1179,9 @@ CGdiDisplayDriver::CGdiDisplayDriver(HDC hDC)
}
}
-FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap,
- int left,
- int top,
- void* pIccTransform,
- FX_BOOL bDEdge) {
+CGdiDisplayDriver::~CGdiDisplayDriver() {}
+
+FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) {
FX_BOOL ret = FALSE;
int width = pBitmap->GetWidth();
int height = pBitmap->GetHeight();
@@ -1204,11 +1197,7 @@ FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap,
bmi.bmiHeader.biHeight = -height;
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biWidth = width;
- if (!CFX_GEModule::Get()->GetCodecModule() ||
- !CFX_GEModule::Get()->GetCodecModule()->GetIccModule()) {
- pIccTransform = nullptr;
- }
- if (pBitmap->GetBPP() > 8 && !pBitmap->IsCmykImage() && !pIccTransform) {
+ if (pBitmap->GetBPP() > 8 && !pBitmap->IsCmykImage()) {
ret = ::GetDIBits(hDCMemory, hbmp, 0, height, pBitmap->GetBuffer(), &bmi,
DIB_RGB_COLORS) == height;
} else {
@@ -1217,15 +1206,15 @@ FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap,
bmi.bmiHeader.biBitCount = 24;
::GetDIBits(hDCMemory, hbmp, 0, height, bitmap.GetBuffer(), &bmi,
DIB_RGB_COLORS);
- ret = pBitmap->TransferBitmap(0, 0, width, height, &bitmap, 0, 0,
- pIccTransform);
+ ret =
+ pBitmap->TransferBitmap(0, 0, width, height, &bitmap, 0, 0, nullptr);
} else {
ret = FALSE;
}
}
- if (pBitmap->HasAlpha() && ret) {
+ if (pBitmap->HasAlpha() && ret)
pBitmap->LoadChannel(FXDIB_Alpha, 0xff);
- }
+
DeleteObject(hbmp);
DeleteObject(hDCMemory);
return ret;
@@ -1236,54 +1225,48 @@ FX_BOOL CGdiDisplayDriver::SetDIBits(const CFX_DIBSource* pSource,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type,
- int alpha_flag,
- void* pIccTransform) {
+ int blend_type) {
ASSERT(blend_type == FXDIB_BLEND_NORMAL);
if (pSource->IsAlphaMask()) {
int width = pSource->GetWidth(), height = pSource->GetHeight();
- int alpha = FXGETFLAG_COLORTYPE(alpha_flag)
- ? FXGETFLAG_ALPHA_FILL(alpha_flag)
- : FXARGB_A(color);
+ int alpha = FXARGB_A(color);
if (pSource->GetBPP() != 1 || alpha != 255) {
CFX_DIBitmap background;
if (!background.Create(width, height, FXDIB_Rgb32) ||
- !GetDIBits(&background, left, top, nullptr) ||
+ !GetDIBits(&background, left, top) ||
!background.CompositeMask(0, 0, width, height, pSource, color, 0, 0,
- FXDIB_BLEND_NORMAL, nullptr, FALSE,
- alpha_flag, pIccTransform)) {
+ FXDIB_BLEND_NORMAL, nullptr, FALSE, 0,
+ nullptr)) {
return FALSE;
}
FX_RECT src_rect(0, 0, width, height);
- return SetDIBits(&background, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL,
- 0, nullptr);
+ return SetDIBits(&background, 0, &src_rect, left, top,
+ FXDIB_BLEND_NORMAL);
}
FX_RECT clip_rect(left, top, left + pSrcRect->Width(),
top + pSrcRect->Height());
return StretchDIBits(pSource, color, left - pSrcRect->left,
top - pSrcRect->top, width, height, &clip_rect, 0,
- alpha_flag, pIccTransform, FXDIB_BLEND_NORMAL);
+ FXDIB_BLEND_NORMAL);
}
int width = pSrcRect->Width(), height = pSrcRect->Height();
if (pSource->HasAlpha()) {
CFX_DIBitmap bitmap;
if (!bitmap.Create(width, height, FXDIB_Rgb) ||
- !GetDIBits(&bitmap, left, top, nullptr) ||
+ !GetDIBits(&bitmap, left, top) ||
!bitmap.CompositeBitmap(0, 0, width, height, pSource, pSrcRect->left,
pSrcRect->top, FXDIB_BLEND_NORMAL, nullptr,
- FALSE, pIccTransform)) {
+ FALSE, nullptr)) {
return FALSE;
}
FX_RECT src_rect(0, 0, width, height);
- return SetDIBits(&bitmap, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL, 0,
- nullptr);
+ return SetDIBits(&bitmap, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL);
}
CFX_DIBExtractor temp(pSource);
CFX_DIBitmap* pBitmap = temp;
- if (pBitmap) {
- return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform);
- }
- return FALSE;
+ if (!pBitmap)
+ return FALSE;
+ return GDI_SetDIBits(pBitmap, pSrcRect, left, top, nullptr);
}
FX_BOOL CGdiDisplayDriver::UseFoxitStretchEngine(const CFX_DIBSource* pSource,
@@ -1293,17 +1276,14 @@ FX_BOOL CGdiDisplayDriver::UseFoxitStretchEngine(const CFX_DIBSource* pSource,
int dest_width,
int dest_height,
const FX_RECT* pClipRect,
- int render_flags,
- int alpha_flag,
- void* pIccTransform,
- int blend_type) {
+ int render_flags) {
FX_RECT bitmap_clip = *pClipRect;
- if (dest_width < 0) {
+ if (dest_width < 0)
dest_left += dest_width;
- }
- if (dest_height < 0) {
+
+ if (dest_height < 0)
dest_top += dest_height;
- }
+
bitmap_clip.Offset(-dest_left, -dest_top);
std::unique_ptr<CFX_DIBitmap> pStretched(
pSource->StretchTo(dest_width, dest_height, render_flags, &bitmap_clip));
@@ -1312,8 +1292,7 @@ FX_BOOL CGdiDisplayDriver::UseFoxitStretchEngine(const CFX_DIBSource* pSource,
FX_RECT src_rect(0, 0, pStretched->GetWidth(), pStretched->GetHeight());
return SetDIBits(pStretched.get(), color, &src_rect, pClipRect->left,
- pClipRect->top, FXDIB_BLEND_NORMAL, alpha_flag,
- pIccTransform);
+ pClipRect->top, FXDIB_BLEND_NORMAL);
}
FX_BOOL CGdiDisplayDriver::StretchDIBits(const CFX_DIBSource* pSource,
@@ -1324,15 +1303,12 @@ FX_BOOL CGdiDisplayDriver::StretchDIBits(const CFX_DIBSource* pSource,
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int alpha_flag,
- void* pIccTransform,
int blend_type) {
ASSERT(pSource && pClipRect);
if (flags || dest_width > 10000 || dest_width < -10000 ||
dest_height > 10000 || dest_height < -10000) {
return UseFoxitStretchEngine(pSource, color, dest_left, dest_top,
- dest_width, dest_height, pClipRect, flags,
- alpha_flag, pIccTransform, blend_type);
+ dest_width, dest_height, pClipRect, flags);
}
if (pSource->IsAlphaMask()) {
FX_RECT image_rect;
@@ -1352,23 +1328,22 @@ FX_BOOL CGdiDisplayDriver::StretchDIBits(const CFX_DIBSource* pSource,
CFX_DIBitmap background;
if (!background.Create(clip_width, clip_height, FXDIB_Rgb32) ||
!GetDIBits(&background, image_rect.left + clip_rect.left,
- image_rect.top + clip_rect.top, nullptr) ||
+ image_rect.top + clip_rect.top) ||
!background.CompositeMask(
0, 0, clip_width, clip_height, pStretched.get(), color, 0, 0,
- FXDIB_BLEND_NORMAL, nullptr, FALSE, alpha_flag, pIccTransform)) {
+ FXDIB_BLEND_NORMAL, nullptr, FALSE, 0, nullptr)) {
return FALSE;
}
FX_RECT src_rect(0, 0, clip_width, clip_height);
- return SetDIBits(
- &background, 0, &src_rect, image_rect.left + clip_rect.left,
- image_rect.top + clip_rect.top, FXDIB_BLEND_NORMAL, 0, nullptr);
+ return SetDIBits(&background, 0, &src_rect,
+ image_rect.left + clip_rect.left,
+ image_rect.top + clip_rect.top, FXDIB_BLEND_NORMAL);
}
if (pSource->HasAlpha()) {
CWin32Platform* pPlatform =
(CWin32Platform*)CFX_GEModule::Get()->GetPlatformData();
- if (pPlatform->m_GdiplusExt.IsAvailable() && !pIccTransform &&
- !pSource->IsCmykImage()) {
+ if (pPlatform->m_GdiplusExt.IsAvailable() && !pSource->IsCmykImage()) {
CFX_DIBExtractor temp(pSource);
CFX_DIBitmap* pBitmap = temp;
if (!pBitmap)
@@ -1378,16 +1353,14 @@ FX_BOOL CGdiDisplayDriver::StretchDIBits(const CFX_DIBSource* pSource,
pClipRect, flags);
}
return UseFoxitStretchEngine(pSource, color, dest_left, dest_top,
- dest_width, dest_height, pClipRect, flags,
- alpha_flag, pIccTransform, blend_type);
+ dest_width, dest_height, pClipRect, flags);
}
CFX_DIBExtractor temp(pSource);
CFX_DIBitmap* pBitmap = temp;
- if (pBitmap) {
- return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width,
- dest_height, flags, pIccTransform);
- }
- return FALSE;
+ if (!pBitmap)
+ return FALSE;
+ return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width,
+ dest_height, flags, nullptr);
}
CFX_WindowsDevice::CFX_WindowsDevice(HDC hDC) {
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index 08029bc351..b5e36202ba 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -125,16 +125,14 @@ FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type,
- int alpha_flag,
- void* pIccTransform) {
+ int blend_type) {
if (pSource->IsAlphaMask()) {
FX_RECT clip_rect(left, top, left + pSrcRect->Width(),
top + pSrcRect->Height());
return StretchDIBits(pSource, color, left - pSrcRect->left,
top - pSrcRect->top, pSource->GetWidth(),
- pSource->GetHeight(), &clip_rect, 0, alpha_flag,
- pIccTransform, FXDIB_BLEND_NORMAL);
+ pSource->GetHeight(), &clip_rect, 0,
+ FXDIB_BLEND_NORMAL);
}
ASSERT(pSource && !pSource->IsAlphaMask() && pSrcRect);
ASSERT(blend_type == FXDIB_BLEND_NORMAL);
@@ -146,7 +144,7 @@ FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource,
if (!pBitmap)
return FALSE;
- return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform);
+ return GDI_SetDIBits(pBitmap, pSrcRect, left, top, nullptr);
}
FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
@@ -157,13 +155,9 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int alpha_flag,
- void* pIccTransform,
int blend_type) {
if (pSource->IsAlphaMask()) {
- int alpha = FXGETFLAG_COLORTYPE(alpha_flag)
- ? FXGETFLAG_ALPHA_FILL(alpha_flag)
- : FXARGB_A(color);
+ int alpha = FXARGB_A(color);
if (pSource->GetBPP() != 1 || alpha != 255)
return FALSE;
@@ -180,7 +174,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
return GDI_StretchBitMask(pFlipped.get(), dest_left, dest_top,
abs(dest_width), abs(dest_height), color, flags,
- alpha_flag, pIccTransform);
+ 0, nullptr);
}
CFX_DIBExtractor temp(pSource);
@@ -188,8 +182,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
if (!pBitmap)
return FALSE;
return GDI_StretchBitMask(pBitmap, dest_left, dest_top, dest_width,
- dest_height, color, flags, alpha_flag,
- pIccTransform);
+ dest_height, color, flags, 0, nullptr);
}
if (pSource->HasAlpha())
@@ -207,8 +200,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
dest_top += dest_height;
return GDI_StretchDIBits(pFlipped.get(), dest_left, dest_top,
- abs(dest_width), abs(dest_height), flags,
- pIccTransform);
+ abs(dest_width), abs(dest_height), flags, nullptr);
}
CFX_DIBExtractor temp(pSource);
@@ -216,7 +208,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
if (!pBitmap)
return FALSE;
return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width,
- dest_height, flags, pIccTransform);
+ dest_height, flags, nullptr);
}
FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
@@ -225,8 +217,6 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
void*& handle,
- int alpha_flag,
- void* pIccTransform,
int blend_type) {
if (bitmap_alpha < 255 || pSource->HasAlpha() ||
(pSource->IsAlphaMask() && (pSource->GetBPP() != 1))) {
@@ -243,7 +233,7 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
bFlipY ? full_rect.bottom : full_rect.top,
bFlipX ? -full_rect.Width() : full_rect.Width(),
bFlipY ? -full_rect.Height() : full_rect.Height(),
- nullptr, 0, alpha_flag, pIccTransform, blend_type);
+ nullptr, 0, blend_type);
}
if (FXSYS_fabs(pMatrix->a) < 0.5f && FXSYS_fabs(pMatrix->d) < 0.5f) {
std::unique_ptr<CFX_DIBitmap> pTransformed(
@@ -253,27 +243,9 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
return StretchDIBits(pTransformed.get(), color, full_rect.left,
full_rect.top, full_rect.Width(), full_rect.Height(),
- nullptr, 0, alpha_flag, pIccTransform, blend_type);
+ nullptr, 0, blend_type);
}
- if (pSource->GetBPP() != 1)
- return FALSE;
-
- std::unique_ptr<CFX_DIBitmap> pTransformed(
- Transform1bppBitmap(pSource, pMatrix));
- if (!pIccTransform)
- return FALSE;
-
- SaveState();
- CFX_PathData path;
- path.AppendRect(0, 0, 1.0f, 1.0f);
- SetClip_PathFill(&path, pMatrix, WINDING);
- FX_BOOL ret =
- StretchDIBits(pTransformed.get(), color, full_rect.left, full_rect.top,
- full_rect.Width(), full_rect.Height(), nullptr, 0,
- alpha_flag, pIccTransform, blend_type);
- RestoreState(false);
- handle = nullptr;
- return ret;
+ return FALSE;
}
#endif
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index 8a9c124f00..e0952706fa 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -108,7 +108,7 @@ class CWin32Platform {
class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
protected:
CGdiDeviceDriver(HDC hDC, int device_class);
- ~CGdiDeviceDriver() override {}
+ ~CGdiDeviceDriver() override;
// IFX_RenderDeviceDriver
int GetDeviceCaps(int caps_id) override;
@@ -126,21 +126,15 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int alpha_flag,
- void* pIccTransform,
- int blend_type) override;
- FX_BOOL FillRect(const FX_RECT* pRect,
- uint32_t fill_color,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override;
+ FX_BOOL FillRectWithBlend(const FX_RECT* pRect,
+ uint32_t fill_color,
+ int blend_type) override;
FX_BOOL DrawCosmeticLine(FX_FLOAT x1,
FX_FLOAT y1,
FX_FLOAT x2,
FX_FLOAT y2,
uint32_t color,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override;
FX_BOOL GetClipBox(FX_RECT* pRect) override;
void* GetPlatformSurface() const override { return (void*)m_hDC; }
@@ -183,22 +177,17 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
class CGdiDisplayDriver : public CGdiDeviceDriver {
public:
- CGdiDisplayDriver(HDC hDC);
+ explicit CGdiDisplayDriver(HDC hDC);
+ ~CGdiDisplayDriver() override;
protected:
- FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap,
- int left,
- int top,
- void* pIccTransform = nullptr,
- FX_BOOL bDEdge = FALSE) override;
+ FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top) override;
FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type,
- int alpha_flag,
- void* pIccTransform) override;
+ int blend_type) override;
FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
int dest_left,
@@ -207,8 +196,6 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override;
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
@@ -216,8 +203,6 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
const CFX_Matrix* pMatrix,
uint32_t render_flags,
void*& handle,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override {
return FALSE;
}
@@ -228,10 +213,7 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
int dest_width,
int dest_height,
const FX_RECT* pClipRect,
- int render_flags,
- int alpha_flag = 0,
- void* pIccTransform = nullptr,
- int blend_type = FXDIB_BLEND_NORMAL);
+ int render_flags);
};
class CGdiPrinterDriver : public CGdiDeviceDriver {
@@ -246,9 +228,7 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type,
- int alpha_flag,
- void* pIccTransform) override;
+ int blend_type) override;
FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
uint32_t color,
int dest_left,
@@ -257,8 +237,6 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override;
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
@@ -266,8 +244,6 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
const CFX_Matrix* pMatrix,
uint32_t render_flags,
void*& handle,
- int alpha_flag,
- void* pIccTransform,
int blend_type) override;
const int m_HorzSize;