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.cpp40
-rw-r--r--core/fxge/win32/fx_win32_print.cpp34
-rw-r--r--core/fxge/win32/win32_int.h34
3 files changed, 54 insertions, 54 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index fec656ef93..537e67564c 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -959,8 +959,8 @@ bool CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
CWin32Platform* pPlatform =
@@ -975,12 +975,12 @@ bool CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
if (bbox.Width() <= 0) {
return DrawCosmeticLine(CFX_PointF(bbox.left, bbox.top),
CFX_PointF(bbox.left, bbox.bottom + 1),
- fill_color, FXDIB_BLEND_NORMAL);
+ fill_color, BlendMode::kNormal);
}
if (bbox.Height() <= 0) {
return DrawCosmeticLine(CFX_PointF(bbox.left, bbox.top),
CFX_PointF(bbox.right + 1, bbox.top), fill_color,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
}
int fill_alpha = FXARGB_A(fill_color);
@@ -1061,8 +1061,8 @@ bool CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
bool CGdiDeviceDriver::FillRectWithBlend(const FX_RECT& rect,
uint32_t fill_color,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
int alpha;
@@ -1116,8 +1116,8 @@ bool CGdiDeviceDriver::SetClip_PathStroke(
bool CGdiDeviceDriver::DrawCosmeticLine(const CFX_PointF& ptMoveTo,
const CFX_PointF& ptLineTo,
uint32_t color,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
int alpha;
@@ -1191,8 +1191,8 @@ bool CGdiDisplayDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) {
- ASSERT(blend_type == FXDIB_BLEND_NORMAL);
+ BlendMode blend_type) {
+ ASSERT(blend_type == BlendMode::kNormal);
if (pSource->IsAlphaMask()) {
int width = pSource->GetWidth(), height = pSource->GetHeight();
int alpha = FXARGB_A(color);
@@ -1201,17 +1201,17 @@ bool CGdiDisplayDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
if (!background->Create(width, height, FXDIB_Rgb32) ||
!GetDIBits(background, left, top) ||
!background->CompositeMask(0, 0, width, height, pSource, color, 0, 0,
- FXDIB_BLEND_NORMAL, nullptr, false, 0)) {
+ BlendMode::kNormal, nullptr, false, 0)) {
return false;
}
FX_RECT src_rect(0, 0, width, height);
- return SetDIBits(background, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL);
+ return SetDIBits(background, 0, &src_rect, left, top, BlendMode::kNormal);
}
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,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
int width = pSrcRect->Width(), height = pSrcRect->Height();
if (pSource->HasAlpha()) {
@@ -1219,12 +1219,12 @@ bool CGdiDisplayDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
if (!bitmap->Create(width, height, FXDIB_Rgb) ||
!GetDIBits(bitmap, left, top) ||
!bitmap->CompositeBitmap(0, 0, width, height, pSource, pSrcRect->left,
- pSrcRect->top, FXDIB_BLEND_NORMAL, nullptr,
+ pSrcRect->top, BlendMode::kNormal, nullptr,
false)) {
return false;
}
FX_RECT src_rect(0, 0, width, height);
- return SetDIBits(bitmap, 0, &src_rect, left, top, FXDIB_BLEND_NORMAL);
+ return SetDIBits(bitmap, 0, &src_rect, left, top, BlendMode::kNormal);
}
CFX_DIBExtractor temp(pSource);
RetainPtr<CFX_DIBitmap> pBitmap = temp.GetBitmap();
@@ -1257,7 +1257,7 @@ bool CGdiDisplayDriver::UseFoxitStretchEngine(
FX_RECT src_rect(0, 0, pStretched->GetWidth(), pStretched->GetHeight());
return SetDIBits(pStretched, color, &src_rect, pClipRect->left,
- pClipRect->top, FXDIB_BLEND_NORMAL);
+ pClipRect->top, BlendMode::kNormal);
}
bool CGdiDisplayDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
@@ -1268,7 +1268,7 @@ bool CGdiDisplayDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) {
+ BlendMode blend_type) {
ASSERT(pSource && pClipRect);
if (flags || dest_width > 10000 || dest_width < -10000 ||
dest_height > 10000 || dest_height < -10000) {
@@ -1295,14 +1295,14 @@ bool CGdiDisplayDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
!GetDIBits(background, image_rect.left + clip_rect.left,
image_rect.top + clip_rect.top) ||
!background->CompositeMask(0, 0, clip_width, clip_height, pStretched,
- color, 0, 0, FXDIB_BLEND_NORMAL, nullptr,
+ color, 0, 0, BlendMode::kNormal, nullptr,
false, 0)) {
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);
+ image_rect.top + clip_rect.top, BlendMode::kNormal);
}
if (pSource->HasAlpha()) {
CWin32Platform* pPlatform =
@@ -1333,7 +1333,7 @@ bool CGdiDisplayDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) {
+ BlendMode blend_type) {
return false;
}
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index 4d8452db74..1f9b9510f7 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -73,17 +73,17 @@ bool CGdiPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pSource,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) {
+ BlendMode 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,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
ASSERT(pSource && !pSource->IsAlphaMask() && pSrcRect);
- ASSERT(blend_type == FXDIB_BLEND_NORMAL);
+ ASSERT(blend_type == BlendMode::kNormal);
if (pSource->HasAlpha())
return false;
@@ -103,7 +103,7 @@ bool CGdiPrinterDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pSource,
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) {
+ BlendMode blend_type) {
if (pSource->IsAlphaMask()) {
int alpha = FXARGB_A(color);
if (pSource->GetBPP() != 1 || alpha != 255)
@@ -164,7 +164,7 @@ bool CGdiPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pSource,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) {
+ BlendMode blend_type) {
if (bitmap_alpha < 255 || pSource->HasAlpha() ||
(pSource->IsAlphaMask() && (pSource->GetBPP() != 1))) {
return false;
@@ -440,8 +440,8 @@ bool CPSPrinterDriver::DrawPath(const CFX_PathData* pPathData,
FX_ARGB fill_color,
FX_ARGB stroke_color,
int fill_mode,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL) {
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal) {
return false;
}
return m_PSRenderer.DrawPath(pPathData, pObject2Device, pGraphState,
@@ -458,8 +458,8 @@ bool CPSPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
return m_PSRenderer.SetDIBits(pBitmap, color, left, top);
}
@@ -472,8 +472,8 @@ bool CPSPrinterDriver::StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
return m_PSRenderer.StretchDIBits(pBitmap, color, dest_left, dest_top,
dest_width, dest_height, flags);
@@ -485,8 +485,8 @@ bool CPSPrinterDriver::StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) {
- if (blend_type != FXDIB_BLEND_NORMAL)
+ BlendMode blend_type) {
+ if (blend_type != BlendMode::kNormal)
return false;
if (bitmap_alpha < 255)
@@ -560,7 +560,7 @@ bool CTextOnlyPrinterDriver::DrawPath(const CFX_PathData* pPathData,
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) {
+ BlendMode blend_type) {
return false;
}
@@ -569,7 +569,7 @@ bool CTextOnlyPrinterDriver::SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) {
+ BlendMode blend_type) {
return false;
}
@@ -590,7 +590,7 @@ bool CTextOnlyPrinterDriver::StretchDIBits(
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) {
+ BlendMode blend_type) {
return false;
}
@@ -601,7 +601,7 @@ bool CTextOnlyPrinterDriver::StartDIBits(
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) {
+ BlendMode blend_type) {
return false;
}
diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h
index 7b4f9ab246..2a61a4e651 100644
--- a/core/fxge/win32/win32_int.h
+++ b/core/fxge/win32/win32_int.h
@@ -149,14 +149,14 @@ class CGdiDeviceDriver : public RenderDeviceDriverIface {
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) override;
+ BlendMode blend_type) override;
bool FillRectWithBlend(const FX_RECT& rect,
uint32_t fill_color,
- int blend_type) override;
+ BlendMode blend_type) override;
bool DrawCosmeticLine(const CFX_PointF& ptMoveTo,
const CFX_PointF& ptLineTo,
uint32_t color,
- int blend_type) override;
+ BlendMode blend_type) override;
bool GetClipBox(FX_RECT* pRect) override;
void DrawLine(float x1, float y1, float x2, float y2);
@@ -202,7 +202,7 @@ class CGdiDisplayDriver final : public CGdiDeviceDriver {
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
int dest_left,
@@ -211,14 +211,14 @@ class CGdiDisplayDriver final : public CGdiDeviceDriver {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) override;
+ BlendMode blend_type) override;
bool UseFoxitStretchEngine(const RetainPtr<CFX_DIBBase>& pSource,
uint32_t color,
int dest_left,
@@ -241,7 +241,7 @@ class CGdiPrinterDriver final : public CGdiDeviceDriver {
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
int dest_left,
@@ -250,14 +250,14 @@ class CGdiPrinterDriver final : public CGdiDeviceDriver {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) override;
+ BlendMode blend_type) override;
bool DrawDeviceText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
@@ -293,14 +293,14 @@ class CPSPrinterDriver final : public RenderDeviceDriverIface {
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) override;
+ BlendMode blend_type) override;
bool GetClipBox(FX_RECT* pRect) override;
bool SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
int dest_left,
@@ -309,14 +309,14 @@ class CPSPrinterDriver final : public RenderDeviceDriverIface {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) override;
+ BlendMode blend_type) override;
bool DrawDeviceText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
@@ -356,14 +356,14 @@ class CTextOnlyPrinterDriver final : public RenderDeviceDriverIface {
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) override;
+ BlendMode blend_type) override;
bool GetClipBox(FX_RECT* pRect) override;
bool SetDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
const FX_RECT* pSrcRect,
int left,
int top,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StretchDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t color,
int dest_left,
@@ -372,14 +372,14 @@ class CTextOnlyPrinterDriver final : public RenderDeviceDriverIface {
int dest_height,
const FX_RECT* pClipRect,
uint32_t flags,
- int blend_type) override;
+ BlendMode blend_type) override;
bool StartDIBits(const RetainPtr<CFX_DIBBase>& pBitmap,
int bitmap_alpha,
uint32_t color,
const CFX_Matrix* pMatrix,
uint32_t render_flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_type) override;
+ BlendMode blend_type) override;
bool DrawDeviceText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,