summaryrefslogtreecommitdiff
path: root/core/include/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/fxge')
-rw-r--r--core/include/fxge/fpf.h10
-rw-r--r--core/include/fxge/fx_dib.h91
-rw-r--r--core/include/fxge/fx_font.h8
-rw-r--r--core/include/fxge/fx_ge.h16
4 files changed, 65 insertions, 60 deletions
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index efa001e916..e65fae0bbd 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -9,18 +9,21 @@
#include "../fxcrt/fx_coordinates.h"
-class IFPF_DeviceModule;
class IFPF_FontMgr;
-class IFPF_Font;
+
class IFPF_DeviceModule {
public:
virtual ~IFPF_DeviceModule() {}
virtual void Destroy() = 0;
virtual IFPF_FontMgr* GetFontMgr() = 0;
};
+
IFPF_DeviceModule* FPF_GetDeviceModule();
+
#define FPF_MATCHFONT_REPLACEANSI 1
+
typedef struct FPF_HFONT_ { void* pData; } * FPF_HFONT;
+
class IFPF_Font {
public:
virtual void Release() = 0;
@@ -47,8 +50,9 @@ class IFPF_Font {
FX_DWORD dwSize) = 0;
protected:
- ~IFPF_Font() {}
+ virtual ~IFPF_Font() {}
};
+
class IFPF_FontMgr {
public:
virtual ~IFPF_FontMgr() {}
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index ddc47d3db5..818aaac520 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -69,6 +69,8 @@ typedef FX_DWORD FX_CMYK;
class CFX_ClipRgn;
class CFX_DIBSource;
class CFX_DIBitmap;
+class CStretchEngine;
+
#define FXSYS_RGB(r, g, b) ((r) | ((g) << 8) | ((b) << 16))
#define FXSYS_GetRValue(rgb) ((rgb)&0xff)
#define FXSYS_GetGValue(rgb) (((rgb) >> 8) & 0xff)
@@ -281,11 +283,9 @@ class CFX_DIBSource {
};
class CFX_DIBitmap : public CFX_DIBSource {
public:
- virtual ~CFX_DIBitmap();
-
CFX_DIBitmap();
-
- CFX_DIBitmap(const CFX_DIBitmap& src);
+ explicit CFX_DIBitmap(const CFX_DIBitmap& src);
+ ~CFX_DIBitmap() override;
FX_BOOL Create(int width,
int height,
@@ -295,19 +295,18 @@ class CFX_DIBitmap : public CFX_DIBSource {
FX_BOOL Copy(const CFX_DIBSource* pSrc);
- virtual uint8_t* GetBuffer() const { return m_pBuffer; }
-
- virtual const uint8_t* GetScanline(int line) const {
+ // CFX_DIBSource
+ uint8_t* GetBuffer() const override { return m_pBuffer; }
+ const uint8_t* GetScanline(int line) const override {
return m_pBuffer ? m_pBuffer + line * m_Pitch : NULL;
}
-
- virtual void DownSampleScanline(int line,
- uint8_t* dest_scan,
- int dest_bpp,
- int dest_width,
- FX_BOOL bFlipX,
- int clip_left,
- int clip_width) const;
+ void DownSampleScanline(int line,
+ uint8_t* dest_scan,
+ int dest_bpp,
+ int dest_width,
+ FX_BOOL bFlipX,
+ int clip_left,
+ int clip_width) const override;
void TakeOver(CFX_DIBitmap* pSrcBitmap);
@@ -407,12 +406,12 @@ class CFX_DIBExtractor {
private:
CFX_DIBitmap* m_pBitmap;
};
+
typedef CFX_CountRef<CFX_DIBitmap> CFX_DIBitmapRef;
class CFX_FilteredDIB : public CFX_DIBSource {
public:
CFX_FilteredDIB();
-
- ~CFX_FilteredDIB();
+ ~CFX_FilteredDIB() override;
void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE);
@@ -429,14 +428,15 @@ class CFX_FilteredDIB : public CFX_DIBSource {
int Bpp) const = 0;
protected:
- virtual const uint8_t* GetScanline(int line) const;
- virtual void DownSampleScanline(int line,
- uint8_t* dest_scan,
- int dest_bpp,
- int dest_width,
- FX_BOOL bFlipX,
- int clip_left,
- int clip_width) const;
+ // CFX_DIBSource
+ const uint8_t* GetScanline(int line) const override;
+ void DownSampleScanline(int line,
+ uint8_t* dest_scan,
+ int dest_bpp,
+ int dest_width,
+ FX_BOOL bFlipX,
+ int clip_left,
+ int clip_width) const override;
const CFX_DIBSource* m_pSrc;
@@ -444,6 +444,7 @@ class CFX_FilteredDIB : public CFX_DIBSource {
uint8_t* m_pScanline;
};
+
class IFX_ScanlineComposer {
public:
virtual ~IFX_ScanlineComposer() {}
@@ -514,11 +515,11 @@ class CFX_ScanlineCompositor {
int m_CacheSize;
FX_BOOL m_bRgbByteOrder;
};
+
class CFX_BitmapComposer : public IFX_ScanlineComposer {
public:
CFX_BitmapComposer();
-
- ~CFX_BitmapComposer();
+ ~CFX_BitmapComposer() override;
void Compose(CFX_DIBitmap* pDest,
const CFX_ClipRgn* pClipRgn,
@@ -533,14 +534,15 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer {
void* pIccTransform = NULL,
int blend_type = FXDIB_BLEND_NORMAL);
- virtual FX_BOOL SetInfo(int width,
- int height,
- FXDIB_Format src_format,
- FX_DWORD* pSrcPalette);
+ // IFX_ScanlineComposer
+ FX_BOOL SetInfo(int width,
+ int height,
+ FXDIB_Format src_format,
+ FX_DWORD* pSrcPalette) override;
- virtual void ComposeScanline(int line,
- const uint8_t* scanline,
- const uint8_t* scan_extra_alpha);
+ void ComposeScanline(int line,
+ const uint8_t* scanline,
+ const uint8_t* scan_extra_alpha) override;
protected:
void DoCompose(uint8_t* dest_scan,
@@ -569,20 +571,21 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer {
uint8_t* m_pAddClipScan;
uint8_t* m_pScanlineAlphaV;
};
+
class CFX_BitmapStorer : public IFX_ScanlineComposer {
public:
CFX_BitmapStorer();
+ ~CFX_BitmapStorer() override;
- ~CFX_BitmapStorer();
+ // IFX_ScanlineComposer
+ void ComposeScanline(int line,
+ const uint8_t* scanline,
+ const uint8_t* scan_extra_alpha) override;
- virtual void ComposeScanline(int line,
- const uint8_t* scanline,
- const uint8_t* scan_extra_alpha);
-
- virtual FX_BOOL SetInfo(int width,
- int height,
- FXDIB_Format src_format,
- FX_DWORD* pSrcPalette);
+ FX_BOOL SetInfo(int width,
+ int height,
+ FXDIB_Format src_format,
+ FX_DWORD* pSrcPalette) override;
CFX_DIBitmap* GetBitmap() { return m_pBitmap; }
@@ -593,7 +596,7 @@ class CFX_BitmapStorer : public IFX_ScanlineComposer {
private:
CFX_DIBitmap* m_pBitmap;
};
-class CStretchEngine;
+
class CFX_ImageStretcher {
public:
CFX_ImageStretcher();
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 50cbba8e26..ce06a8ac5f 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -244,7 +244,7 @@ class IFX_AdditionalFontEnum {
};
class CFX_FontMapper {
public:
- CFX_FontMapper(CFX_FontMgr* mgr);
+ explicit CFX_FontMapper(CFX_FontMgr* mgr);
~CFX_FontMapper();
void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
@@ -283,6 +283,7 @@ class CFX_FontMapper {
IFX_FontEnumerator* m_pFontEnumerator;
CFX_FontMgr* const m_pFontMgr;
};
+
class IFX_SystemFontInfo {
public:
static IFX_SystemFontInfo* CreateDefault(const char** pUserPaths);
@@ -307,12 +308,13 @@ class IFX_SystemFontInfo {
virtual void* RetainFont(void* hFont) { return NULL; }
protected:
- ~IFX_SystemFontInfo() {}
+ virtual ~IFX_SystemFontInfo() {}
};
+
class CFX_FolderFontInfo : public IFX_SystemFontInfo {
public:
CFX_FolderFontInfo();
- virtual ~CFX_FolderFontInfo();
+ ~CFX_FolderFontInfo() override;
void AddPath(const CFX_ByteStringC& path);
// IFX_SytemFontInfo:
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index ef3c8f665e..4cfe622007 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -10,17 +10,12 @@
#include "fx_dib.h"
#include "fx_font.h"
-class CFX_ClipRgn;
-class CFX_PathData;
-class CFX_GraphStateData;
class CFX_Font;
class CFX_FontMgr;
class CFX_FontCache;
class CFX_FaceCache;
-class CFX_RenderDevice;
class IFX_RenderDeviceDriver;
class CCodec_ModuleMgr;
-class IFXG_PaintModuleMgr;
class CFX_GEModule {
public:
@@ -435,8 +430,7 @@ class CFX_RenderDevice {
class CFX_FxgeDevice : public CFX_RenderDevice {
public:
CFX_FxgeDevice();
-
- ~CFX_FxgeDevice();
+ ~CFX_FxgeDevice() override;
FX_BOOL Attach(CFX_DIBitmap* pBitmap,
int dither_bits = 0,
@@ -456,8 +450,7 @@ class CFX_FxgeDevice : public CFX_RenderDevice {
class CFX_SkiaDevice : public CFX_RenderDevice {
public:
CFX_SkiaDevice();
-
- ~CFX_SkiaDevice();
+ ~CFX_SkiaDevice() override;
FX_BOOL Attach(CFX_DIBitmap* pBitmap,
int dither_bits = 0,
@@ -474,6 +467,7 @@ class CFX_SkiaDevice : public CFX_RenderDevice {
protected:
FX_BOOL m_bOwnedBitmap;
};
+
class IFX_RenderDeviceDriver {
public:
static IFX_RenderDeviceDriver* CreateFxgeDriver(
@@ -613,14 +607,16 @@ class IFX_RenderDeviceDriver {
virtual void ClearDriver() {}
};
+
class IFX_PSOutput {
public:
virtual void Release() = 0;
virtual void OutputPS(const FX_CHAR* string, int len) = 0;
protected:
- ~IFX_PSOutput() {}
+ virtual ~IFX_PSOutput() {}
};
+
class CPSFont;
class CFX_PSRenderer {
public: