summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_ge.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:36:00 -0700
commitf1e7c461dfabbff6b65a072f24f6711b34159361 (patch)
tree3b0bb772a59669f06b86824a444fd06642592d4b /core/include/fxge/fx_ge.h
parent320b2313d19869333ed453af546e61a9fc2b81c9 (diff)
downloadpdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'core/include/fxge/fx_ge.h')
-rw-r--r--core/include/fxge/fx_ge.h138
1 files changed, 69 insertions, 69 deletions
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index 5965641a3e..fd9c148b62 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -193,11 +193,11 @@ public:
void Transform(const CFX_AffineMatrix* pMatrix);
- bool IsRect() const;
+ FX_BOOL IsRect() const;
- bool GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* pMatrix, bool&bThin, bool bAdjust) const;
+ FX_BOOL GetZeroAreaPath(CFX_PathData& NewPath, CFX_AffineMatrix* pMatrix, FX_BOOL&bThin, FX_BOOL bAdjust) const;
- bool IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* rect) const;
+ FX_BOOL IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* rect) const;
void Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMatrix);
void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top);
@@ -294,10 +294,10 @@ typedef struct {
FX_DWORD m_GlyphIndex;
FX_FLOAT m_OriginX, m_OriginY;
int m_FontCharWidth;
- bool m_bGlyphAdjust;
+ FX_BOOL m_bGlyphAdjust;
FX_FLOAT m_AdjustMatrix[4];
FX_DWORD m_ExtGID;
- bool m_bFontStyle;
+ FX_BOOL m_bFontStyle;
} FXTEXT_CHARPOS;
class CFX_RenderDevice
{
@@ -313,7 +313,7 @@ public:
return m_pDeviceDriver;
}
- bool StartRendering();
+ FX_BOOL StartRendering();
void EndRendering();
@@ -321,7 +321,7 @@ public:
void SaveState();
- void RestoreState(bool bKeepSaved = false);
+ void RestoreState(FX_BOOL bKeepSaved = FALSE);
@@ -365,26 +365,26 @@ public:
m_pBitmap = pBitmap;
}
- bool CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width, int height) const;
+ FX_BOOL CreateCompatibleBitmap(CFX_DIBitmap* pDIB, int width, int height) const;
const FX_RECT& GetClipBox() const
{
return m_ClipBox;
}
- bool SetClip_PathFill(const CFX_PathData* pPathData,
+ FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
int fill_mode
);
- bool SetClip_Rect(const FX_RECT* pRect);
+ FX_BOOL SetClip_Rect(const FX_RECT* pRect);
- bool SetClip_PathStroke(const CFX_PathData* pPathData,
+ FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState
);
- bool DrawPath(const CFX_PathData* pPathData,
+ FX_BOOL DrawPath(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
@@ -395,46 +395,46 @@ public:
int blend_type = FXDIB_BLEND_NORMAL
);
- bool SetPixel(int x, int y, FX_DWORD color,
+ FX_BOOL SetPixel(int x, int y, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool FillRect(const FX_RECT* pRect, FX_DWORD color,
+ FX_BOOL FillRect(const FX_RECT* pRect, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
- bool DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
+ FX_BOOL DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
int fill_mode = 0, int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
- bool GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL);
+ FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, void* pIccTransform = NULL);
CFX_DIBitmap* GetBackDrop();
- bool SetDIBits(const CFX_DIBSource* pBitmap, int left, int top, int blend_type = FXDIB_BLEND_NORMAL,
+ FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, int left, int top, int blend_type = FXDIB_BLEND_NORMAL,
void* pIccTransform = NULL);
- bool StretchDIBits(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
+ FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
FX_DWORD flags = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL);
- bool SetBitMask(const CFX_DIBSource* pBitmap, int left, int top, FX_DWORD color,
+ FX_BOOL SetBitMask(const CFX_DIBSource* pBitmap, int left, int top, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool StretchBitMask(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
+ FX_BOOL StretchBitMask(const CFX_DIBSource* pBitmap, int left, int top, int dest_width, int dest_height,
FX_DWORD color, FX_DWORD flags = 0, int alpha_flag = 0, void* pIccTransform = NULL);
- bool StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD color,
+ 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, int blend_type = FXDIB_BLEND_NORMAL);
- bool ContinueDIBits(void* handle, IFX_Pause* pPause);
+ FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause);
void CancelDIBits(void* handle);
- bool DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos,
+ FX_BOOL DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont, CFX_FontCache* pCache,
FX_FLOAT font_size, const CFX_AffineMatrix* pText2Device,
FX_DWORD fill_color, FX_DWORD text_flags,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool DrawTextPath(int nChars, const FXTEXT_CHARPOS* pCharPos,
+ FX_BOOL DrawTextPath(int nChars, const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont, CFX_FontCache* pCache,
FX_FLOAT font_size, const CFX_AffineMatrix* pText2User,
const CFX_AffineMatrix* pUser2Device, const CFX_GraphStateData* pGraphState,
@@ -477,12 +477,12 @@ public:
~CFX_FxgeDevice();
- bool Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+ FX_BOOL Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
- bool Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
+ FX_BOOL Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
protected:
- bool m_bOwnedBitmap;
+ FX_BOOL m_bOwnedBitmap;
};
class CFX_SkiaDevice : public CFX_RenderDevice
{
@@ -492,19 +492,19 @@ public:
~CFX_SkiaDevice();
- bool Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, bool bRgbByteOrder = false, CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+ FX_BOOL Attach(CFX_DIBitmap* pBitmap, int dither_bits = 0, FX_BOOL bRgbByteOrder = FALSE, CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
- bool Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
+ FX_BOOL Create(int width, int height, FXDIB_Format format, int dither_bits = 0, CFX_DIBitmap* pOriDevice = NULL);
protected:
- bool m_bOwnedBitmap;
+ FX_BOOL m_bOwnedBitmap;
};
class IFX_RenderDeviceDriver
{
public:
- static IFX_RenderDeviceDriver* CreateFxgeDriver(CFX_DIBitmap* pBitmap, bool bRgbByteOrder = false,
- CFX_DIBitmap* pOriDevice = NULL, bool bGroupKnockout = false);
+ static IFX_RenderDeviceDriver* CreateFxgeDriver(CFX_DIBitmap* pBitmap, FX_BOOL bRgbByteOrder = FALSE,
+ CFX_DIBitmap* pOriDevice = NULL, FX_BOOL bGroupKnockout = FALSE);
virtual ~IFX_RenderDeviceDriver() {}
virtual void Begin() { }
@@ -517,14 +517,14 @@ public:
return CFX_Matrix();
}
- virtual bool IsPSPrintDriver()
+ virtual FX_BOOL IsPSPrintDriver()
{
- return false;
+ return FALSE;
}
- virtual bool StartRendering()
+ virtual FX_BOOL StartRendering()
{
- return true;
+ return TRUE;
}
virtual void EndRendering() {}
@@ -534,23 +534,23 @@ public:
virtual void SaveState() = 0;
- virtual void RestoreState(bool bKeepSaved = false) = 0;
+ virtual void RestoreState(FX_BOOL bKeepSaved = FALSE) = 0;
- virtual bool SetClip_PathFill(const CFX_PathData* pPathData,
+ virtual FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
int fill_mode
) = 0;
- virtual bool SetClip_PathStroke(const CFX_PathData* pPathData,
+ virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState
)
{
- return false;
+ return FALSE;
}
- 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,
@@ -561,59 +561,59 @@ public:
int blend_type = FXDIB_BLEND_NORMAL
) = 0;
- 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)
{
- return false;
+ return FALSE;
}
- 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, int blend_type = FXDIB_BLEND_NORMAL)
{
- return false;
+ return FALSE;
}
- virtual bool DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
+ virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL, int blend_type = FXDIB_BLEND_NORMAL)
{
- return false;
+ return FALSE;
}
- virtual bool GetClipBox(FX_RECT* pRect) = 0;
+ virtual FX_BOOL GetClipBox(FX_RECT* pRect) = 0;
- 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)
{
- return false;
+ return FALSE;
}
virtual CFX_DIBitmap* GetBackDrop()
{
return NULL;
}
- 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) = 0;
- 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, int blend_type = FXDIB_BLEND_NORMAL) = 0;
- 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, int blend_type = FXDIB_BLEND_NORMAL) = 0;
- virtual bool ContinueDIBits(void* handle, IFX_Pause* pPause)
+ virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause)
{
- return false;
+ return FALSE;
}
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_FLOAT font_size, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL)
{
- return false;
+ return FALSE;
}
virtual void* GetPlatformSurface()
@@ -646,13 +646,13 @@ public:
~CFX_PSRenderer();
- void Init(IFX_PSOutput* pOutput, int ps_level, int width, int height, bool bCmykOutput);
- bool StartRendering();
+ void Init(IFX_PSOutput* pOutput, int ps_level, int width, int height, FX_BOOL bCmykOutput);
+ FX_BOOL StartRendering();
void EndRendering();
void SaveState();
- void RestoreState(bool bKeepSaved = false);
+ void RestoreState(FX_BOOL bKeepSaved = FALSE);
void SetClip_PathFill(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
@@ -669,7 +669,7 @@ public:
return m_ClipBox;
}
- bool DrawPath(const CFX_PathData* pPathData,
+ FX_BOOL DrawPath(const CFX_PathData* pPathData,
const CFX_AffineMatrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
@@ -679,18 +679,18 @@ public:
void* pIccTransform = NULL
);
- bool SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+ FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
+ FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, int dest_left, int dest_top,
int dest_width, int dest_height, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
+ FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color,
const CFX_AffineMatrix* pMatrix, FX_DWORD flags,
int alpha_flag = 0, void* pIccTransform = NULL);
- bool DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache,
+ FX_BOOL DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache,
const CFX_AffineMatrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
int alpha_flag = 0, void* pIccTransform = NULL);
private:
@@ -701,11 +701,11 @@ private:
CFX_GraphStateData m_CurGraphState;
- bool m_bGraphStateSet;
+ FX_BOOL m_bGraphStateSet;
- bool m_bCmykOutput;
+ FX_BOOL m_bCmykOutput;
- bool m_bColorSet;
+ FX_BOOL m_bColorSet;
FX_DWORD m_LastColor;
@@ -714,7 +714,7 @@ private:
CFX_ArrayTemplate<CPSFont*> m_PSFontList;
CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack;
- bool m_bInited;
+ FX_BOOL m_bInited;
void OutputPath(const CFX_PathData* pPathData, const CFX_AffineMatrix* pObject2Device);