summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_renderdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/cfx_renderdevice.cpp')
-rw-r--r--core/fxge/cfx_renderdevice.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index f00d7f9d01..8afff1e84a 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -510,7 +510,7 @@ bool CFX_RenderDevice::DrawPathWithBlend(const CFX_PathData* pPathData,
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) {
+ BlendMode blend_type) {
uint8_t stroke_alpha = pGraphState ? FXARGB_A(stroke_color) : 0;
uint8_t fill_alpha = (fill_mode & 3) ? FXARGB_A(fill_color) : 0;
const std::vector<FX_PATHPOINT>& pPoints = pPathData->GetPoints();
@@ -618,7 +618,7 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData,
uint32_t fill_color,
uint32_t stroke_color,
int fill_mode,
- int blend_type) {
+ BlendMode blend_type) {
if (!(m_RenderCaps & FXRC_GET_BITS))
return false;
CFX_FloatRect bbox;
@@ -665,12 +665,12 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData,
#endif
FX_RECT src_rect(0, 0, rect.Width(), rect.Height());
return m_pDeviceDriver->SetDIBits(bitmap, 0, &src_rect, rect.left, rect.top,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
bool CFX_RenderDevice::FillRectWithBlend(const FX_RECT& rect,
uint32_t fill_color,
- int blend_type) {
+ BlendMode blend_type) {
if (m_pDeviceDriver->FillRectWithBlend(rect, fill_color, blend_type))
return true;
@@ -690,7 +690,7 @@ bool CFX_RenderDevice::FillRectWithBlend(const FX_RECT& rect,
}
FX_RECT src_rect(0, 0, rect.Width(), rect.Height());
m_pDeviceDriver->SetDIBits(bitmap, 0, &src_rect, rect.left, rect.top,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
return true;
}
@@ -698,7 +698,7 @@ bool CFX_RenderDevice::DrawCosmeticLine(const CFX_PointF& ptMoveTo,
const CFX_PointF& ptLineTo,
uint32_t color,
int fill_mode,
- int blend_type) {
+ BlendMode blend_type) {
if ((color >= 0xff000000) && m_pDeviceDriver->DrawCosmeticLine(
ptMoveTo, ptLineTo, color, blend_type)) {
return true;
@@ -725,7 +725,7 @@ RetainPtr<CFX_DIBitmap> CFX_RenderDevice::GetBackDrop() {
bool CFX_RenderDevice::SetDIBitsWithBlend(const RetainPtr<CFX_DIBBase>& pBitmap,
int left,
int top,
- int blend_mode) {
+ BlendMode blend_mode) {
ASSERT(!pBitmap->IsAlphaMask());
FX_RECT dest_rect(left, top, left + pBitmap->GetWidth(),
top + pBitmap->GetHeight());
@@ -736,7 +736,7 @@ bool CFX_RenderDevice::SetDIBitsWithBlend(const RetainPtr<CFX_DIBBase>& pBitmap,
FX_RECT src_rect(dest_rect.left - left, dest_rect.top - top,
dest_rect.left - left + dest_rect.Width(),
dest_rect.top - top + dest_rect.Height());
- if ((blend_mode == FXDIB_BLEND_NORMAL || (m_RenderCaps & FXRC_BLEND_MODE)) &&
+ if ((blend_mode == BlendMode::kNormal || (m_RenderCaps & FXRC_BLEND_MODE)) &&
(!pBitmap->HasAlpha() || (m_RenderCaps & FXRC_ALPHA_IMAGE))) {
return m_pDeviceDriver->SetDIBits(pBitmap, 0, &src_rect, dest_rect.left,
dest_rect.top, blend_mode);
@@ -762,7 +762,7 @@ bool CFX_RenderDevice::SetDIBitsWithBlend(const RetainPtr<CFX_DIBBase>& pBitmap,
}
FX_RECT rect(0, 0, bg_pixel_width, bg_pixel_height);
return m_pDeviceDriver->SetDIBits(background, 0, &rect, dest_rect.left,
- dest_rect.top, FXDIB_BLEND_NORMAL);
+ dest_rect.top, BlendMode::kNormal);
}
bool CFX_RenderDevice::StretchDIBitsWithFlagsAndBlend(
@@ -772,7 +772,7 @@ bool CFX_RenderDevice::StretchDIBitsWithFlagsAndBlend(
int dest_width,
int dest_height,
uint32_t flags,
- int blend_mode) {
+ BlendMode blend_mode) {
FX_RECT dest_rect(left, top, left + dest_width, top + dest_height);
FX_RECT clip_box = m_ClipBox;
clip_box.Intersect(dest_rect);
@@ -787,7 +787,7 @@ bool CFX_RenderDevice::SetBitMask(const RetainPtr<CFX_DIBBase>& pBitmap,
uint32_t argb) {
FX_RECT src_rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight());
return m_pDeviceDriver->SetDIBits(pBitmap, argb, &src_rect, left, top,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
bool CFX_RenderDevice::StretchBitMask(const RetainPtr<CFX_DIBBase>& pBitmap,
@@ -813,7 +813,7 @@ bool CFX_RenderDevice::StretchBitMaskWithFlags(
clip_box.Intersect(dest_rect);
return m_pDeviceDriver->StretchDIBits(pBitmap, argb, left, top, dest_width,
dest_height, &clip_box, flags,
- FXDIB_BLEND_NORMAL);
+ BlendMode::kNormal);
}
bool CFX_RenderDevice::StartDIBitsWithBlend(
@@ -823,7 +823,7 @@ bool CFX_RenderDevice::StartDIBitsWithBlend(
const CFX_Matrix* pMatrix,
uint32_t flags,
std::unique_ptr<CFX_ImageRenderer>* handle,
- int blend_mode) {
+ BlendMode blend_mode) {
return m_pDeviceDriver->StartDIBits(pBitmap, bitmap_alpha, argb, pMatrix,
flags, handle, blend_mode);
}
@@ -843,7 +843,7 @@ bool CFX_RenderDevice::SetBitsWithMask(const RetainPtr<CFX_DIBBase>& pBitmap,
int left,
int top,
int bitmap_alpha,
- int blend_type) {
+ BlendMode blend_type) {
return m_pDeviceDriver->SetBitsWithMask(pBitmap, pMask, left, top,
bitmap_alpha, blend_type);
}
@@ -1021,7 +1021,7 @@ bool CFX_RenderDevice::DrawNormalText(int nChars,
if (anti_alias == FXFT_RENDER_MODE_NORMAL) {
if (!bitmap->CompositeMask(left.ValueOrDie(), top.ValueOrDie(), ncols,
nrows, pGlyph, fill_color, 0, 0,
- FXDIB_BLEND_NORMAL, nullptr, false, 0)) {
+ BlendMode::kNormal, nullptr, false, 0)) {
return false;
}
continue;
@@ -1089,7 +1089,7 @@ bool CFX_RenderDevice::DrawTextPath(int nChars,
fill_mode |= FX_FILL_TEXT_MODE;
if (!DrawPathWithBlend(&TransformedPath, pUser2Device, pGraphState,
fill_color, stroke_color, fill_mode,
- FXDIB_BLEND_NORMAL)) {
+ BlendMode::kNormal)) {
return false;
}
}