summaryrefslogtreecommitdiff
path: root/core/src/fxge/skia
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/skia')
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.cpp18
-rw-r--r--core/src/fxge/skia/fx_skia_blitter_new.h8
-rw-r--r--core/src/fxge/skia/fx_skia_device.cpp102
-rw-r--r--core/src/fxge/skia/fx_skia_device.h38
4 files changed, 83 insertions, 83 deletions
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index 13bb753e45..3437eb497d 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -1298,7 +1298,7 @@
//--------------------------------------------------------------------
- bool CFX_SkiaRenderer::Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, bool bFullCover, bool bRgbByteOrder,
+ FX_BOOL CFX_SkiaRenderer::Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder,
int alpha_flag, void* pIccTransform) //The alpha flag must be fill_flag if exist.
{
m_pDevice = pDevice;
@@ -1331,8 +1331,8 @@
m_bFullCover = bFullCover;
- bool bObjectCMYK = FXGETFLAG_COLORTYPE(alpha_flag);
- bool bDeviceCMYK = pDevice->IsCmykImage();
+ FX_BOOL bObjectCMYK = FXGETFLAG_COLORTYPE(alpha_flag);
+ FX_BOOL bDeviceCMYK = pDevice->IsCmykImage();
m_Alpha = bObjectCMYK ? FXGETFLAG_ALPHA_FILL(alpha_flag) : FXARGB_A(color);
@@ -1377,7 +1377,7 @@
pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&m_Color, 1);
} else { // Object RGB
if (!pIccTransform)
- return false;
+ return FALSE;
color = FXARGB_TODIB(color);
pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&m_Color, (const uint8_t*)&color, 1);
}
@@ -1385,7 +1385,7 @@
m_Green = ((uint8_t*)&m_Color)[1];
m_Blue = ((uint8_t*)&m_Color)[2];
m_Gray = ((uint8_t*)&m_Color)[3];
- return true;
+ return TRUE;
}
if (pIccTransform) {
color = bObjectCMYK ? FXCMYK_TODIB(color) : FXARGB_TODIB(color);
@@ -1496,8 +1496,8 @@
break;
}
if (composite_span == NULL)
- return false;
- return true;
+ return FALSE;
+ return TRUE;
}
/*----------------------------------------------------------------------------------------------------*/
@@ -1595,7 +1595,7 @@
blitV(x, y, height, rightAlpha);
}
- bool CFX_SkiaA8Renderer::Init(CFX_DIBitmap* pDevice, int Left, int Top)
+ FX_BOOL CFX_SkiaA8Renderer::Init(CFX_DIBitmap* pDevice, int Left, int Top)
{
m_pDevice = pDevice;
m_Left = Left;
@@ -1604,6 +1604,6 @@
m_dstWidth = m_Left + pDevice->GetWidth();
m_dstHeight = m_Top + pDevice->GetHeight();
}
- return true;
+ return TRUE;
}
#endif
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.h b/core/src/fxge/skia/fx_skia_blitter_new.h
index cd411da9f5..e60c6398d2 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.h
+++ b/core/src/fxge/skia/fx_skia_blitter_new.h
@@ -15,9 +15,9 @@ protected:
m_Blue, // Yellow
m_Gray; // Black
FX_DWORD m_Color; // FX_ARGB or FX_CMYK
- bool m_bFullCover;
+ FX_BOOL m_bFullCover;
int m_ProcessFilter;
- bool m_bRgbByteOrder;
+ FX_BOOL m_bRgbByteOrder;
FX_RECT m_ClipBox;
CFX_DIBitmap* m_pDevice;
@@ -205,7 +205,7 @@ public:
//--------------------------------------------------------------------
- bool Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, bool bFullCover, bool bRgbByteOrder,
+ FX_BOOL Init(CFX_DIBitmap* pDevice, CFX_DIBitmap* pOriDevice, const CFX_ClipRgn* pClipRgn, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bRgbByteOrder,
int alpha_flag = 0, void* pIccTransform = NULL); //The alpha flag must be fill_flag if exist.
};
class CFX_SkiaA8Renderer : public SkBlitter
@@ -218,7 +218,7 @@ public:
virtual void blitRect(int x, int y, int width, int height);
virtual void blitAntiRect(int x, int y, int width, int height, SkAlpha leftAlpha, SkAlpha rightAlpha);
//--------------------------------------------------------------------
- bool Init(CFX_DIBitmap* pDevice, int Left, int Top);
+ FX_BOOL Init(CFX_DIBitmap* pDevice, int Left, int Top);
CFX_DIBitmap* m_pDevice;
int m_Left;
int m_Top;
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index 72478b1097..41ce077976 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -46,24 +46,24 @@ class SuperBlitter_skia
public:
static void DrawPath(const SkPath& srcPath, SkBlitter* blitter, const SkRasterClip& rect, const SkPaint& origPaint);
};
-bool FxSkDrawTreatAsHairline(const SkPaint& paint, SkScalar* coverage) {
+FX_BOOL FxSkDrawTreatAsHairline(const SkPaint& paint, SkScalar* coverage) {
if (SkPaint::kStroke_Style != paint.getStyle())
- return false;
+ return FALSE;
FXSYS_assert(coverage);
SkScalar strokeWidth = paint.getStrokeWidth();
if (0 == strokeWidth) {
*coverage = SK_Scalar1;
- return true;
+ return TRUE;
}
// if we get here, we need to try to fake a thick-stroke with a modulated
// hairline
if (!paint.isAntiAlias())
- return false;
+ return FALSE;
if (strokeWidth <= SK_Scalar1) {
*coverage = strokeWidth;
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void SuperBlitter_skia::DrawPath(const SkPath& srcPath, SkBlitter* blitter, const SkRasterClip& rect, const SkPaint& origPaint)
@@ -167,7 +167,7 @@ void CSkia_PathData::BuildPath(const CFX_PathData* pPathData, const CFX_AffineMa
static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path_data,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState, FX_FIXFLOAT scale = FIX8_ONE,
- bool bStrokeAdjust = false, bool bTextMode = false)
+ FX_BOOL bStrokeAdjust = FALSE, FX_BOOL bTextMode = FALSE)
{
SkPaint::Cap cap;
switch (pGraphState->m_LineCap) {
@@ -203,7 +203,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path
stroker.setJoin(join);
stroker.setMiterLimit(pGraphState->m_MiterLimit);
stroker.setWidth(width);
- stroker.setDoFill(false);
+ stroker.setDoFill(FALSE);
stroker.strokePath(path_data, dstPathData);
SkMatrix smatrix;
smatrix.setAll(pObject2Device->a, pObject2Device->c, pObject2Device->e, pObject2Device->b, pObject2Device->d, pObject2Device->f, 0, 0, 1);
@@ -235,7 +235,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path
}
}
-CFX_SkiaDeviceDriver::CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, bool bRgbByteOrder, CFX_DIBitmap* pOriDevice, bool bGroupKnockout)
+CFX_SkiaDeviceDriver::CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout)
{
m_pAggDriver = new CFX_AggDeviceDriver(pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout);
}
@@ -243,7 +243,7 @@ CFX_SkiaDeviceDriver::~CFX_SkiaDeviceDriver()
{
delete m_pAggDriver;
}
-bool CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
+FX_BOOL CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color,
int alpha_flag, void* pIccTransform)
{
@@ -259,7 +259,7 @@ void CFX_SkiaDeviceDriver::SaveState()
m_pAggDriver->SaveState();
}
-void CFX_SkiaDeviceDriver::RestoreState(bool bKeepSaved)
+void CFX_SkiaDeviceDriver::RestoreState(FX_BOOL bKeepSaved)
{
m_pAggDriver->RestoreState(bKeepSaved);
}
@@ -294,7 +294,7 @@ void CFX_SkiaDeviceDriver::SetClipMask(SkPath& skPath, SkPaint* spaint)
m_pAggDriver->m_pClipRgn->IntersectMaskF(clip_box.fLeft, clip_box.fTop, mask);
}
-bool CFX_SkiaDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, // path info
+FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, // path info
const CFX_AffineMatrix* pObject2Device, // optional transformation
int fill_mode // fill mode, WINDING or ALTERNATE
)
@@ -308,7 +308,7 @@ bool CFX_SkiaDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, // pa
rectf.Intersect(CFX_FloatRect(0, 0, (FX_FIXFLOAT)GetDeviceCaps(FXDC_PIXEL_WIDTH), (FX_FIXFLOAT)GetDeviceCaps(FXDC_PIXEL_HEIGHT)));
FX_RECT rect = rectf.GetOutterRect();
m_pAggDriver->m_pClipRgn->IntersectRect(rect);
- return true;
+ return TRUE;
}
}
CSkia_PathData path_data;
@@ -318,15 +318,15 @@ bool CFX_SkiaDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData, // pa
SkPaint spaint;
spaint.setColor(0xffffffff);
- spaint.setAntiAlias(true);
+ spaint.setAntiAlias(TRUE);
spaint.setStyle(SkPaint::kFill_Style);
SetClipMask(path_data.m_PathData, &spaint);
- return true;
+ return TRUE;
}
-bool CFX_SkiaDeviceDriver::SetClip_PathStroke(const CFX_PathData* pPathData, // path info
+FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathStroke(const CFX_PathData* pPathData, // path info
const CFX_AffineMatrix* pObject2Device, // optional transformation
const CFX_GraphStateData* pGraphState // graphic state, for pen attributes
)
@@ -342,36 +342,36 @@ bool CFX_SkiaDeviceDriver::SetClip_PathStroke(const CFX_PathData* pPathData, //
SkPaint spaint;
spaint.setColor(0xffffffff);
spaint.setStyle(SkPaint::kStroke_Style);
- spaint.setAntiAlias(true);
+ spaint.setAntiAlias(TRUE);
SkPath dst_path;
- SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, pObject2Device, pGraphState, 1, false, 0);
+ SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, pObject2Device, pGraphState, 1, FALSE, 0);
spaint.setStyle(SkPaint::kFill_Style);
SetClipMask(dst_path, &spaint);
- return true;
+ return TRUE;
}
-bool CFX_SkiaDeviceDriver::RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, bool bFullCover, bool bGroupKnockout,
+FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout,
int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->RenderRasterizer(rasterizer, color, bFullCover, bGroupKnockout,alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, bool bFullCover, bool bGroupKnockout,
- int alpha_flag, void* pIccTransform, bool bFill)
+FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout,
+ int alpha_flag, void* pIccTransform, FX_BOOL bFill)
{
CFX_DIBitmap* pt = bGroupKnockout?m_pAggDriver->GetBackDrop():NULL;
CFX_SkiaRenderer render;
if (!render.Init(m_pAggDriver->m_pBitmap, pt, m_pAggDriver->m_pClipRgn, color, bFullCover, m_pAggDriver->m_bRgbByteOrder, alpha_flag, pIccTransform))
- return false;
+ return FALSE;
SkRasterClip rasterClip(rect);
SuperBlitter_skia::DrawPath(skPath, (SkBlitter*)&render, rasterClip, origPaint);
- return true;
+ return TRUE;
}
-bool CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info
+FX_BOOL CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info
const CFX_AffineMatrix* pObject2Device, // optional transformation
const CFX_GraphStateData* pGraphState, // graphic state, for pen attributes
FX_DWORD fill_color, // fill color
@@ -381,7 +381,7 @@ bool CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info
void* pIccTransform
)
{
- if (GetBuffer() == NULL) return true;
+ if (GetBuffer() == NULL) return TRUE;
FOXIT_DEBUG1("CFX_SkiaDeviceDriver::DrawPath: entering");
SkIRect rect;
rect.set(0, 0, GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT));
@@ -396,11 +396,11 @@ bool CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info
path_data.m_PathData.setFillType((fill_mode&3) == FXFILL_WINDING? SkPath::kWinding_FillType:SkPath::kEvenOdd_FillType);
SkPaint spaint;
- spaint.setAntiAlias(true);
+ spaint.setAntiAlias(TRUE);
spaint.setStyle(SkPaint::kFill_Style);
spaint.setColor(fill_color);
- if (!RenderRasterizerSkia(path_data.m_PathData, spaint, rect, fill_color, fill_mode & FXFILL_FULLCOVER, false, alpha_flag, pIccTransform))
- return false;
+ if (!RenderRasterizerSkia(path_data.m_PathData, spaint, rect, fill_color, fill_mode & FXFILL_FULLCOVER, FALSE, alpha_flag, pIccTransform))
+ return FALSE;
}
int stroke_alpha = FXGETFLAG_COLORTYPE(alpha_flag) ? FXGETFLAG_ALPHA_STROKE(alpha_flag) : FXARGB_A(stroke_color);
@@ -427,48 +427,48 @@ bool CFX_SkiaDeviceDriver::DrawPath(const CFX_PathData* pPathData, // path info
SkPaint spaint;
spaint.setColor(stroke_color);
spaint.setStyle(SkPaint::kStroke_Style);
- spaint.setAntiAlias(true);
+ spaint.setAntiAlias(TRUE);
SkPath dst_path;
- SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, &matrix2, pGraphState, matrix1.a, false, 0);
+ SkRasterizeStroke(spaint, &dst_path, path_data.m_PathData, &matrix2, pGraphState, matrix1.a, FALSE, 0);
spaint.setStyle(SkPaint::kFill_Style);
int fill_flag = FXGETFLAG_COLORTYPE(alpha_flag)<<8 | FXGETFLAG_ALPHA_STROKE(alpha_flag);
- if (!RenderRasterizerSkia(dst_path, spaint, rect, stroke_color, fill_mode & FXFILL_FULLCOVER, false, fill_flag, pIccTransform, false))
- return false;
+ if (!RenderRasterizerSkia(dst_path, spaint, rect, stroke_color, fill_mode & FXFILL_FULLCOVER, FALSE, fill_flag, pIccTransform, FALSE))
+ return FALSE;
}
- return true;
+ return TRUE;
}
-bool CFX_SkiaDeviceDriver::SetPixel(int x, int y, FX_DWORD color,
+FX_BOOL CFX_SkiaDeviceDriver::SetPixel(int x, int y, FX_DWORD color,
int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->SetPixel(x, y, color, alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::FillRect(const FX_RECT* pRect, FX_DWORD fill_color, int alpha_flag, void* pIccTransform)
+FX_BOOL CFX_SkiaDeviceDriver::FillRect(const FX_RECT* pRect, FX_DWORD fill_color, int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->FillRect(pRect, fill_color, alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::GetClipBox(FX_RECT* pRect)
+FX_BOOL CFX_SkiaDeviceDriver::GetClipBox(FX_RECT* pRect)
{
return m_pAggDriver->GetClipBox(pRect);
}
-bool CFX_SkiaDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform, bool bDEdge)
+FX_BOOL CFX_SkiaDeviceDriver::GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform, FX_BOOL bDEdge)
{
return m_pAggDriver->GetDIBits(pBitmap, left, top, pIccTransform, bDEdge);
}
-bool CFX_SkiaDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD argb, const FX_RECT* pSrcRect, int left, int top, int blend_type,
+FX_BOOL CFX_SkiaDeviceDriver::SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD argb, const FX_RECT* pSrcRect, int left, int top, int blend_type,
int alpha_flag, void* pIccTransform)
{
return m_pAggDriver->SetDIBits(pBitmap, argb, pSrcRect, left, top, blend_type, alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD argb, int dest_left, int dest_top,
+FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD argb, int dest_left, int dest_top,
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag, void* pIccTransform)
{
@@ -477,7 +477,7 @@ bool CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD
alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
+FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, FX_DWORD argb,
const CFX_AffineMatrix* pMatrix, FX_DWORD render_flags, void*& handle,
int alpha_flag, void* pIccTransform)
{
@@ -485,7 +485,7 @@ bool CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_
pMatrix, render_flags, handle, alpha_flag, pIccTransform);
}
-bool CFX_SkiaDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
+FX_BOOL CFX_SkiaDeviceDriver::ContinueDIBits(void* pHandle, IFX_Pause* pPause)
{
return m_pAggDriver->ContinueDIBits(pHandle, pPause);
}
@@ -497,31 +497,31 @@ void CFX_SkiaDeviceDriver::CancelDIBits(void* pHandle)
CFX_SkiaDevice::CFX_SkiaDevice()
{
- m_bOwnedBitmap = false;
+ m_bOwnedBitmap = FALSE;
}
-bool CFX_SkiaDevice::Attach(CFX_DIBitmap* pBitmap, int dither_bits, bool bRgbByteOrder, CFX_DIBitmap* pOriDevice, bool bGroupKnockout)
+FX_BOOL CFX_SkiaDevice::Attach(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout)
{
if (pBitmap == NULL)
- return false;
+ return FALSE;
SetBitmap(pBitmap);
CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver(pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout);
SetDeviceDriver(pDriver);
- return true;
+ return TRUE;
}
-bool CFX_SkiaDevice::Create(int width, int height, FXDIB_Format format, int dither_bits, CFX_DIBitmap* pOriDevice)
+FX_BOOL CFX_SkiaDevice::Create(int width, int height, FXDIB_Format format, int dither_bits, CFX_DIBitmap* pOriDevice)
{
- m_bOwnedBitmap = true;
+ m_bOwnedBitmap = TRUE;
CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
if (!pBitmap->Create(width, height, format)) {
delete pBitmap;
- return false;
+ return FALSE;
}
SetBitmap(pBitmap);
- CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver(pBitmap, dither_bits, false, pOriDevice, false);
+ CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver(pBitmap, dither_bits, FALSE, pOriDevice, FALSE);
SetDeviceDriver(pDriver);
- return true;
+ return TRUE;
}
CFX_SkiaDevice::~CFX_SkiaDevice()
{
diff --git a/core/src/fxge/skia/fx_skia_device.h b/core/src/fxge/skia/fx_skia_device.h
index 7278671dc7..ab51e51a33 100644
--- a/core/src/fxge/skia/fx_skia_device.h
+++ b/core/src/fxge/skia/fx_skia_device.h
@@ -9,7 +9,7 @@
class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver
{
public:
- CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, bool bRgbByteOrder, CFX_DIBitmap* pOriDevice, bool bGroupKnockout);
+ CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout);
virtual ~CFX_SkiaDeviceDriver();
/** Options */
@@ -17,22 +17,22 @@ public:
/** Save and restore all graphic states */
virtual void SaveState();
- virtual void RestoreState(bool bKeepSaved);
+ virtual void RestoreState(FX_BOOL bKeepSaved);
/** Set clipping path using filled region */
- virtual bool SetClip_PathFill(const CFX_PathData* pPathData, // path info
+ virtual FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData, // path info
const CFX_AffineMatrix* pObject2Device, // optional transformation
int fill_mode // fill mode, WINDING or ALTERNATE
);
/** Set clipping path using stroked region */
- virtual bool SetClip_PathStroke(const CFX_PathData* pPathData, // path info
+ virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData, // path info
const CFX_AffineMatrix* pObject2Device, // optional transformation
const CFX_GraphStateData* pGraphState // graphic state, for pen attributes
);
/** Draw a path */
- virtual bool DrawPath(const CFX_PathData* pPathData,
+ virtual FX_BOOL DrawPath(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
@@ -42,44 +42,44 @@ public:
void* pIccTransform = NULL
);
- virtual bool SetPixel(int x, int y, FX_DWORD color,
+ virtual FX_BOOL SetPixel(int x, int y, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual bool FillRect(const FX_RECT* pRect, FX_DWORD fill_color,
+ virtual FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD fill_color,
int alpha_flag = 0, void* pIccTransform = NULL);
/** Draw a single pixel (device dependant) line */
- virtual bool DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color,
- int alpha_flag, void* pIccTransform, int blend_type) { return false; }
+ virtual FX_BOOL DrawCosmeticLine(FX_FIXFLOAT x1, FX_FIXFLOAT y1, FX_FIXFLOAT x2, FX_FIXFLOAT y2, FX_DWORD color,
+ int alpha_flag, void* pIccTransform, int blend_type) { return FALSE; }
- virtual bool GetClipBox(FX_RECT* pRect);
+ virtual FX_BOOL GetClipBox(FX_RECT* pRect);
/** Load device buffer into a DIB */
- virtual bool GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL, bool bDEdge = false);
+ virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE);
virtual CFX_DIBitmap* GetBackDrop() { return m_pAggDriver->GetBackDrop(); }
- virtual bool SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect,
+ virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect,
int dest_left, int dest_top, int blend_type,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual bool StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+ virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
int dest_width, int dest_height, const FX_RECT* pClipRect, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual bool StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
+ virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
const CFX_AffineMatrix* pMatrix, FX_DWORD flags, void*& handle,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual bool ContinueDIBits(void* handle, IFX_Pause* pPause);
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
virtual void CancelDIBits(void* handle);
- virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
+ virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont,
CFX_FontCache* pCache, const CFX_AffineMatrix* pObject2Device, FX_FIXFLOAT font_size, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
- virtual bool RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, bool bFullCover, bool bGroupKnockout,
+ virtual FX_BOOL RenderRasterizer(rasterizer_scanline_aa& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout,
int alpha_flag, void* pIccTransform);
- virtual bool RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, bool bFullCover, bool bGroupKnockout,
- int alpha_flag, void* pIccTransform, bool bFill = true);
+ virtual FX_BOOL RenderRasterizerSkia(SkPath& skPath, const SkPaint& origPaint, SkIRect& rect, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGroupKnockout,
+ int alpha_flag, void* pIccTransform, FX_BOOL bFill = TRUE);
void SetClipMask(rasterizer_scanline_aa& rasterizer);
void SetClipMask(SkPath& skPath, SkPaint* spaint);
virtual uint8_t* GetBuffer() const {return m_pAggDriver->GetBuffer();}