summaryrefslogtreecommitdiff
path: root/core/include/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/fxge')
-rw-r--r--core/include/fxge/fpf.h18
-rw-r--r--core/include/fxge/fx_dib.h74
-rw-r--r--core/include/fxge/fx_ge.h6
-rw-r--r--core/include/fxge/fx_ge_apple.h4
-rw-r--r--core/include/fxge/fx_ge_win32.h2
5 files changed, 52 insertions, 52 deletions
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 440c329439..30c1c77bbe 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -31,19 +31,19 @@ public:
virtual CFX_ByteString GetFamilyName() = 0;
virtual CFX_WideString GetPsName() = 0;
virtual FX_DWORD GetFontStyle() const = 0;
- virtual FX_BYTE GetCharset() const = 0;
+ virtual uint8_t GetCharset() const = 0;
- virtual FX_INT32 GetGlyphIndex(FX_WCHAR wUnicode) = 0;
- virtual FX_INT32 GetGlyphWidth(FX_INT32 iGlyphIndex) = 0;
+ virtual int32_t GetGlyphIndex(FX_WCHAR wUnicode) = 0;
+ virtual int32_t GetGlyphWidth(int32_t iGlyphIndex) = 0;
- virtual FX_INT32 GetAscent() const = 0;
- virtual FX_INT32 GetDescent() const = 0;
+ virtual int32_t GetAscent() const = 0;
+ virtual int32_t GetDescent() const = 0;
- virtual FX_BOOL GetGlyphBBox(FX_INT32 iGlyphIndex, FX_RECT &rtBBox) = 0;
+ virtual FX_BOOL GetGlyphBBox(int32_t iGlyphIndex, FX_RECT &rtBBox) = 0;
virtual FX_BOOL GetBBox(FX_RECT &rtBBox) = 0;
- virtual FX_INT32 GetHeight() const = 0;
- virtual FX_INT32 GetItalicAngle() const = 0;
+ virtual int32_t GetHeight() const = 0;
+ virtual int32_t GetItalicAngle() const = 0;
virtual FX_DWORD GetFontData(FX_DWORD dwTable, FX_LPBYTE pBuffer, FX_DWORD dwSize) = 0;
protected:
@@ -58,7 +58,7 @@ public:
virtual void LoadPrivateFont(FX_BSTR bsFileName) = 0;
virtual void LoadPrivateFont(FX_LPVOID pBuffer, size_t szBuffer) = 0;
- virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, FX_BYTE charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0;
+ virtual IFPF_Font* CreateFont(FX_BSTR bsFamilyname, uint8_t charset, FX_DWORD dwStyle, FX_DWORD dwMatch = 0) = 0;
};
#endif // CORE_INCLUDE_FXGE_FPF_H_
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index 74738d0d0f..d798ca3511 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -74,10 +74,10 @@ class CFX_DIBitmap;
#define FXSYS_GetBValue(rgb) (((rgb) >> 16) & 0xff)
#define FX_CCOLOR(val) (255-(val))
#define FXSYS_CMYK(c, m, y, k) (((c) << 24) | ((m) << 16) | ((y) << 8) | (k))
-#define FXSYS_GetCValue(cmyk) ((FX_BYTE)((cmyk) >> 24) & 0xff)
-#define FXSYS_GetMValue(cmyk) ((FX_BYTE)((cmyk) >> 16) & 0xff)
-#define FXSYS_GetYValue(cmyk) ((FX_BYTE)((cmyk) >> 8) & 0xff)
-#define FXSYS_GetKValue(cmyk) ((FX_BYTE)(cmyk) & 0xff)
+#define FXSYS_GetCValue(cmyk) ((uint8_t)((cmyk) >> 24) & 0xff)
+#define FXSYS_GetMValue(cmyk) ((uint8_t)((cmyk) >> 16) & 0xff)
+#define FXSYS_GetYValue(cmyk) ((uint8_t)((cmyk) >> 8) & 0xff)
+#define FXSYS_GetKValue(cmyk) ((uint8_t)(cmyk) & 0xff)
void CmykDecode(FX_CMYK cmyk, int& c, int& m, int& y, int& k);
inline FX_CMYK CmykEncode(int c, int m, int y, int k)
{
@@ -90,10 +90,10 @@ inline FX_ARGB ArgbEncode(int a, int r, int g, int b)
return (a << 24) | (r << 16) | (g << 8) | b;
}
FX_ARGB ArgbEncode(int a, FX_COLORREF rgb);
-#define FXARGB_A(argb) ((FX_BYTE)((argb) >> 24))
-#define FXARGB_R(argb) ((FX_BYTE)((argb) >> 16))
-#define FXARGB_G(argb) ((FX_BYTE)((argb) >> 8))
-#define FXARGB_B(argb) ((FX_BYTE)(argb))
+#define FXARGB_A(argb) ((uint8_t)((argb) >> 24))
+#define FXARGB_R(argb) ((uint8_t)((argb) >> 16))
+#define FXARGB_G(argb) ((uint8_t)((argb) >> 8))
+#define FXARGB_B(argb) ((uint8_t)(argb))
#define FXARGB_MAKE(a,r,g,b) (((FX_DWORD)(a) << 24) | ((r) << 16) | ((g) << 8) | (b))
#define FXARGB_MUL_ALPHA(argb, alpha) (((((argb) >> 24) * (alpha) / 255) << 24) | ((argb) & 0xffffff))
#define FXRGB2GRAY(r,g,b) (((b) * 11 + (g) * 59 + (r) * 30) / 100)
@@ -101,15 +101,15 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb);
#define FXDIB_ALPHA_MERGE(backdrop, source, source_alpha) (((backdrop) * (255-(source_alpha)) + (source)*(source_alpha))/255)
#define FXDIB_ALPHA_UNION(dest, src) ((dest) + (src) - (dest)*(src)/255)
#define FXCMYK_GETDIB(p) ((((FX_LPBYTE)(p))[0] << 24 | (((FX_LPBYTE)(p))[1] << 16) | (((FX_LPBYTE)(p))[2] << 8) | ((FX_LPBYTE)(p))[3]))
-#define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (FX_BYTE)((cmyk) >> 24), \
- ((FX_LPBYTE)(p))[1] = (FX_BYTE)((cmyk) >> 16), \
- ((FX_LPBYTE)(p))[2] = (FX_BYTE)((cmyk) >> 8), \
- ((FX_LPBYTE)(p))[3] = (FX_BYTE)(cmyk))
+#define FXCMYK_SETDIB(p, cmyk) ((FX_LPBYTE)(p))[0] = (uint8_t)((cmyk) >> 24), \
+ ((FX_LPBYTE)(p))[1] = (uint8_t)((cmyk) >> 16), \
+ ((FX_LPBYTE)(p))[2] = (uint8_t)((cmyk) >> 8), \
+ ((FX_LPBYTE)(p))[3] = (uint8_t)(cmyk))
#define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24))
-#define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (FX_BYTE)(argb), \
- ((FX_LPBYTE)(p))[1] = (FX_BYTE)((argb) >> 8), \
- ((FX_LPBYTE)(p))[2] = (FX_BYTE)((argb) >> 16), \
- ((FX_LPBYTE)(p))[3] = (FX_BYTE)((argb) >> 24)
+#define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (uint8_t)(argb), \
+ ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \
+ ((FX_LPBYTE)(p))[2] = (uint8_t)((argb) >> 16), \
+ ((FX_LPBYTE)(p))[3] = (uint8_t)((argb) >> 24)
#define FXARGB_COPY(dest, src) *(FX_LPBYTE)(dest) = *(FX_LPBYTE)(src), \
*((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
*((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \
@@ -118,21 +118,21 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb);
*((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
*((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src)+2), \
*((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3)
-#define FXARGB_SETRGBORDERDIB(p, argb) ((FX_LPBYTE)(p))[3] = (FX_BYTE)(argb>>24), \
- ((FX_LPBYTE)(p))[0] = (FX_BYTE)((argb) >> 16), \
- ((FX_LPBYTE)(p))[1] = (FX_BYTE)((argb) >> 8), \
- ((FX_LPBYTE)(p))[2] = (FX_BYTE)(argb)
+#define FXARGB_SETRGBORDERDIB(p, argb) ((FX_LPBYTE)(p))[3] = (uint8_t)(argb>>24), \
+ ((FX_LPBYTE)(p))[0] = (uint8_t)((argb) >> 16), \
+ ((FX_LPBYTE)(p))[1] = (uint8_t)((argb) >> 8), \
+ ((FX_LPBYTE)(p))[2] = (uint8_t)(argb)
#define FXARGB_GETRGBORDERDIB(p) (((FX_LPBYTE)(p))[2]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0] << 16) | (((FX_LPBYTE)(p))[3] << 24)
#define FXARGB_RGBORDERCOPY(dest, src) *((FX_LPBYTE)(dest)+3) = *((FX_LPBYTE)(src)+3), \
*(FX_LPBYTE)(dest) = *((FX_LPBYTE)(src)+2), \
*((FX_LPBYTE)(dest)+1) = *((FX_LPBYTE)(src)+1), \
*((FX_LPBYTE)(dest)+2) = *((FX_LPBYTE)(src))
#define FXARGB_TODIB(argb) (argb)
-#define FXCMYK_TODIB(cmyk) ((FX_BYTE)((cmyk) >> 24) | ((FX_BYTE)((cmyk) >> 16)) << 8 | ((FX_BYTE)((cmyk) >> 8)) << 16 | ((FX_BYTE)(cmyk) << 24))
-#define FXARGB_TOBGRORDERDIB(argb) ((FX_BYTE)(argb>>16) | ((FX_BYTE)(argb>>8)) << 8 | ((FX_BYTE)(argb)) << 16 | ((FX_BYTE)(argb>>24) << 24))
-#define FXGETFLAG_COLORTYPE(flag) (FX_BYTE)((flag)>>8)
-#define FXGETFLAG_ALPHA_FILL(flag) (FX_BYTE)(flag)
-#define FXGETFLAG_ALPHA_STROKE(flag) (FX_BYTE)((flag)>>16)
+#define FXCMYK_TODIB(cmyk) ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24))
+#define FXARGB_TOBGRORDERDIB(argb) ((uint8_t)(argb>>16) | ((uint8_t)(argb>>8)) << 8 | ((uint8_t)(argb)) << 16 | ((uint8_t)(argb>>24) << 24))
+#define FXGETFLAG_COLORTYPE(flag) (uint8_t)((flag)>>8)
+#define FXGETFLAG_ALPHA_FILL(flag) (uint8_t)(flag)
+#define FXGETFLAG_ALPHA_STROKE(flag) (uint8_t)((flag)>>16)
#define FXSETFLAG_COLORTYPE(flag, val) flag = (((val)<<8)|(flag&0xffff00ff))
#define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val)|(flag&0xffffff00))
#define FXSETFLAG_ALPHA_STROKE(flag, val) flag = (((val)<<16)|(flag&0xff00ffff))
@@ -415,7 +415,7 @@ public:
~CFX_ScanlineCompositor();
- FX_BOOL Init(FXDIB_Format dest_format, FXDIB_Format src_format, FX_INT32 width, FX_DWORD* pSrcPalette,
+ FX_BOOL Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, FX_DWORD* pSrcPalette,
FX_DWORD mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL);
@@ -519,11 +519,11 @@ public:
~CFX_ImageStretcher();
- FX_INT32 Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
+ int32_t Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap,
int dest_width, int dest_height, const FX_RECT& bitmap_rect, FX_DWORD flags);
- FX_INT32 Continue(IFX_Pause* pPause);
+ int32_t Continue(IFX_Pause* pPause);
IFX_ScanlineComposer* m_pDest;
const CFX_DIBSource* m_pSource;
CStretchEngine* m_pStretchEngine;
@@ -538,15 +538,15 @@ public:
FX_LPBYTE m_pScanline;
FX_LPBYTE m_pMaskScanline;
FXDIB_Format m_DestFormat;
- FX_INT32 m_Status;
+ int32_t m_Status;
- FX_INT32 StartQuickStretch();
+ int32_t StartQuickStretch();
- FX_INT32 StartStretch();
+ int32_t StartStretch();
- FX_INT32 ContinueQuickStretch(IFX_Pause* pPause);
+ int32_t ContinueQuickStretch(IFX_Pause* pPause);
- FX_INT32 ContinueStretch(IFX_Pause* pPause);
+ int32_t ContinueStretch(IFX_Pause* pPause);
};
class CFX_ImageTransformer
{
@@ -556,10 +556,10 @@ public:
~CFX_ImageTransformer();
- FX_INT32 Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix, int flags, const FX_RECT* pClip);
+ int32_t Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix, int flags, const FX_RECT* pClip);
- FX_INT32 Continue(IFX_Pause* pPause);
+ int32_t Continue(IFX_Pause* pPause);
CFX_AffineMatrix* m_pMatrix;
FX_RECT m_StretchClip;
int m_ResultLeft, m_ResultTop, m_ResultWidth, m_ResultHeight;
@@ -577,13 +577,13 @@ public:
~CFX_ImageRenderer();
- FX_INT32 Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
+ int32_t Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn,
const CFX_DIBSource* pSource, int bitmap_alpha,
FX_DWORD mask_color, const CFX_AffineMatrix* pMatrix, FX_DWORD dib_flags,
FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL);
- FX_INT32 Continue(IFX_Pause* pPause);
+ int32_t Continue(IFX_Pause* pPause);
protected:
CFX_DIBitmap* m_pDevice;
const CFX_ClipRgn* m_pClipRgn;
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index 60374eff45..a880166c39 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -65,7 +65,7 @@ protected:
void InitPlatform();
void DestroyPlatform();
private:
- FX_BYTE m_GammaValue[256];
+ uint8_t m_GammaValue[256];
CFX_FontCache* m_pFontCache;
CFX_FontMgr* m_pFontMgr;
CCodec_ModuleMgr* m_pCodecModule;
@@ -133,8 +133,8 @@ protected:
void IntersectMaskRect(FX_RECT rect, FX_RECT mask_box, CFX_DIBitmapRef Mask);
};
-extern const FX_BYTE g_GammaRamp[256];
-extern const FX_BYTE g_GammaInverse[256];
+extern const uint8_t g_GammaRamp[256];
+extern const uint8_t g_GammaInverse[256];
#define FX_GAMMA(value) (value)
#define FX_GAMMA_INVERSE(value) (value)
inline FX_ARGB ArgbGamma(FX_ARGB argb)
diff --git a/core/include/fxge/fx_ge_apple.h b/core/include/fxge/fx_ge_apple.h
index 90cd03455b..b22d31fa9f 100644
--- a/core/include/fxge/fx_ge_apple.h
+++ b/core/include/fxge/fx_ge_apple.h
@@ -13,9 +13,9 @@ class CFX_QuartzDevice : public CFX_RenderDevice
public:
CFX_QuartzDevice();
~CFX_QuartzDevice();
- FX_BOOL Attach(CGContextRef context, FX_INT32 nDeviceClass = FXDC_DISPLAY);
+ FX_BOOL Attach(CGContextRef context, int32_t nDeviceClass = FXDC_DISPLAY);
FX_BOOL Attach(CFX_DIBitmap* pBitmap);
- FX_BOOL Create(FX_INT32 width, FX_INT32 height, FXDIB_Format format);
+ FX_BOOL Create(int32_t width, int32_t height, FXDIB_Format format);
CGContextRef GetContext();
diff --git a/core/include/fxge/fx_ge_win32.h b/core/include/fxge/fx_ge_win32.h
index c9cb2a35a9..3972090326 100644
--- a/core/include/fxge/fx_ge_win32.h
+++ b/core/include/fxge/fx_ge_win32.h
@@ -17,7 +17,7 @@ typedef struct WINDIB_Open_Args_ {
int flags;
- const FX_BYTE* memory_base;
+ const uint8_t* memory_base;
size_t memory_size;