summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h14
-rw-r--r--core/src/fxge/agg/src/fx_agg_driver.cpp40
-rw-r--r--core/src/fxge/apple/apple_int.h18
-rw-r--r--core/src/fxge/apple/fx_apple_platform.cpp25
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp55
-rw-r--r--core/src/fxge/dib/dib_int.h2
-rw-r--r--core/src/fxge/dib/fx_dib_main.cpp2
-rw-r--r--core/src/fxge/dib/fx_dib_transform.cpp17
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp21
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp9
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp26
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp33
-rw-r--r--core/src/fxge/skia/fx_skia_device.cpp43
-rw-r--r--core/src/fxge/skia/fx_skia_device.h16
-rw-r--r--core/src/fxge/win32/dwrite_int.h2
-rw-r--r--core/src/fxge/win32/fx_win32_device.cpp12
-rw-r--r--core/src/fxge/win32/fx_win32_dwrite.cpp2
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp6
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp25
-rw-r--r--core/src/fxge/win32/win32_int.h22
20 files changed, 189 insertions, 201 deletions
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index 0e79a3fc5e..80febe1b4e 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -12,7 +12,7 @@
#include "third_party/agg23/agg_path_storage.h"
#include "third_party/agg23/agg_rasterizer_scanline_aa.h"
-class CFX_AffineMatrix;
+class CFX_Matrix;
class CFX_PathData;
class CAgg_PathData {
@@ -21,7 +21,7 @@ class CAgg_PathData {
~CAgg_PathData() {}
FX_NAMESPACE_DECLARE(agg, path_storage) m_PathData;
void BuildPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device);
+ const CFX_Matrix* pObject2Device);
};
class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
public:
@@ -40,13 +40,13 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
void SaveState() override;
void RestoreState(FX_BOOL bKeepSaved) override;
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) override;
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) override;
FX_BOOL DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -103,7 +103,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
void*& handle,
int alpha_flag,
@@ -115,7 +115,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD color,
int alpha_flag,
diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp
index 4b3389bb4c..dfa5c27ebf 100644
--- a/core/src/fxge/agg/src/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/src/fx_agg_driver.cpp
@@ -34,7 +34,7 @@ void _HardClip(FX_FLOAT& x, FX_FLOAT& y) {
}
}
void CAgg_PathData::BuildPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device) {
+ const CFX_Matrix* pObject2Device) {
int nPoints = pPathData->GetPointCount();
FX_PATHPOINT* pPoints = pPathData->GetPoints();
for (int i = 0; i < nPoints; i++) {
@@ -112,7 +112,7 @@ class renderer_scanline_aa_offset {
}
static void RasterizeStroke(agg::rasterizer_scanline_aa& rasterizer,
agg::path_storage& path_data,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_FLOAT scale = 1.0f,
FX_BOOL bStrokeAdjust = FALSE,
@@ -217,16 +217,15 @@ CFX_AggDeviceDriver::~CFX_AggDeviceDriver() {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
void CFX_AggDeviceDriver::InitPlatform() {}
void CFX_AggDeviceDriver::DestroyPlatform() {}
-FX_BOOL CFX_AggDeviceDriver::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,
- void* pIccTransform) {
+FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ CFX_FontCache* pCache,
+ const CFX_Matrix* pObject2Device,
+ FX_FLOAT font_size,
+ FX_DWORD color,
+ int alpha_flag,
+ void* pIccTransform) {
return FALSE;
}
#endif
@@ -314,10 +313,9 @@ void CFX_AggDeviceDriver::SetClipMask(agg::rasterizer_scanline_aa& rasterizer) {
(m_FillFlags & FXFILL_NOPATHSMOOTH) != 0);
m_pClipRgn->IntersectMaskF(path_rect.left, path_rect.top, mask);
}
-FX_BOOL CFX_AggDeviceDriver::SetClip_PathFill(
- const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
- int fill_mode) {
+FX_BOOL CFX_AggDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData,
+ const CFX_Matrix* pObject2Device,
+ int fill_mode) {
m_FillFlags = fill_mode;
if (!m_pClipRgn) {
m_pClipRgn = new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
@@ -349,7 +347,7 @@ FX_BOOL CFX_AggDeviceDriver::SetClip_PathFill(
}
FX_BOOL CFX_AggDeviceDriver::SetClip_PathStroke(
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
if (!m_pClipRgn) {
m_pClipRgn = new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH),
@@ -1203,7 +1201,7 @@ FX_BOOL CFX_AggDeviceDriver::RenderRasterizer(
return TRUE;
}
FX_BOOL CFX_AggDeviceDriver::DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -1255,7 +1253,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawPath(const CFX_PathData* pPathData,
}
return TRUE;
}
- CFX_AffineMatrix matrix1, matrix2;
+ CFX_Matrix matrix1, matrix2;
if (pObject2Device) {
matrix1.a =
FX_MAX(FXSYS_fabs(pObject2Device->a), FXSYS_fabs(pObject2Device->b));
@@ -1263,7 +1261,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawPath(const CFX_PathData* pPathData,
matrix2.Set(pObject2Device->a / matrix1.a, pObject2Device->b / matrix1.a,
pObject2Device->c / matrix1.d, pObject2Device->d / matrix1.d,
0, 0);
- CFX_AffineMatrix mtRervese;
+ CFX_Matrix mtRervese;
mtRervese.SetReverse(matrix2);
matrix1 = *pObject2Device;
matrix1.Concat(mtRervese);
@@ -1727,7 +1725,7 @@ FX_BOOL CFX_AggDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource,
FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource,
int bitmap_alpha,
FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 504e144327..0601fccb23 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -53,7 +53,7 @@ class CQuartz2D {
void* CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize);
void DestroyFont(void* pFont);
- void setGraphicsTextMatrix(void* graphics, CFX_AffineMatrix* matrix);
+ void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix);
FX_BOOL drawGraphicsString(void* graphics,
void* font,
FX_FLOAT fontSize,
@@ -61,7 +61,7 @@ class CQuartz2D {
CGPoint* glyphPositions,
int32_t chars,
FX_ARGB argb,
- CFX_AffineMatrix* matrix = NULL);
+ CFX_Matrix* matrix = NULL);
void saveGraphicsState(void* graphics);
void restoreGraphicsState(void* graphics);
};
@@ -87,13 +87,13 @@ class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver {
void SaveState() override;
void RestoreState(FX_BOOL bKeepSaved) override;
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) override;
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) override;
FX_BOOL DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -150,7 +150,7 @@ class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver {
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
void*& handle,
int alpha_flag = 0,
@@ -166,7 +166,7 @@ class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver {
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD color,
int alpha_flag = 0,
@@ -186,8 +186,8 @@ class CFX_QuartzDeviceDriver : public IFX_RenderDeviceDriver {
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pGlyphMatrix,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pGlyphMatrix,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD argb,
int alpha_flag,
diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp
index 8346873408..f0a23825b9 100644
--- a/core/src/fxge/apple/fx_apple_platform.cpp
+++ b/core/src/fxge/apple/fx_apple_platform.cpp
@@ -34,7 +34,7 @@ void CFX_FaceCache::DestroyPlatform() {}
CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph_Nativetext(
CFX_Font* pFont,
FX_DWORD glyph_index,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias) {
return NULL;
@@ -44,7 +44,7 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD argb,
int alpha_flag,
@@ -52,7 +52,7 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
if (nChars == 0) {
return TRUE;
}
- CFX_AffineMatrix new_matrix;
+ CFX_Matrix new_matrix;
FX_BOOL bNegSize = font_size < 0;
if (bNegSize) {
font_size = -font_size;
@@ -97,16 +97,15 @@ static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
nChars, argb, NULL);
}
static void _DoNothing(void* info, const void* data, size_t size) {}
-FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(
- int nChars,
- const FXTEXT_CHARPOS* pCharPos,
- CFX_Font* pFont,
- CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
- FX_FLOAT font_size,
- FX_DWORD argb,
- int alpha_flag,
- void* pIccTransform) {
+FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ CFX_FontCache* pCache,
+ const CFX_Matrix* pObject2Device,
+ FX_FLOAT font_size,
+ FX_DWORD argb,
+ int alpha_flag,
+ void* pIccTransform) {
if (!pFont) {
return FALSE;
}
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index e933695a86..0b19438230 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -56,8 +56,7 @@ void* CQuartz2D::CreateFont(const uint8_t* pFontData, FX_DWORD dwFontSize) {
void CQuartz2D::DestroyFont(void* pFont) {
CGFontRelease((CGFontRef)pFont);
}
-void CQuartz2D::setGraphicsTextMatrix(void* graphics,
- CFX_AffineMatrix* matrix) {
+void CQuartz2D::setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix) {
if (!graphics || !matrix) {
return;
}
@@ -74,7 +73,7 @@ FX_BOOL CQuartz2D::drawGraphicsString(void* graphics,
CGPoint* glyphPositions,
int32_t charsCount,
FX_ARGB argb,
- CFX_AffineMatrix* matrix) {
+ CFX_Matrix* matrix) {
if (!graphics) {
return FALSE;
}
@@ -224,7 +223,7 @@ void CFX_QuartzDeviceDriver::RestoreState(FX_BOOL isKeepSaved) {
}
}
FX_BOOL CFX_QuartzDeviceDriver::SetClip_PathFill(const CFX_PathData* pathData,
- const CFX_AffineMatrix* matrix,
+ const CFX_Matrix* matrix,
int fillMode) {
SaveState();
CGAffineTransform m = CGAffineTransformIdentity;
@@ -260,7 +259,7 @@ FX_FLOAT CFX_QuartzDeviceDriver::getLineWidth(
}
FX_BOOL CFX_QuartzDeviceDriver::SetClip_PathStroke(
const CFX_PathData* pathData,
- const CFX_AffineMatrix* matrix,
+ const CFX_Matrix* matrix,
const CFX_GraphStateData* graphState) {
SaveState();
CGAffineTransform m = CGAffineTransformIdentity;
@@ -336,7 +335,7 @@ static CGBlendMode GetCGBlendMode(int blend_type) {
return mode;
}
FX_BOOL CFX_QuartzDeviceDriver::DrawPath(const CFX_PathData* pathData,
- const CFX_AffineMatrix* matrix,
+ const CFX_Matrix* matrix,
const CFX_GraphStateData* graphState,
FX_DWORD fillArgb,
FX_DWORD strokeArgb,
@@ -736,17 +735,16 @@ FX_BOOL CFX_QuartzDeviceDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
RestoreState(FALSE);
return TRUE;
}
-FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun(
- int nChars,
- const FXTEXT_CHARPOS* pCharPos,
- CFX_Font* pFont,
- CFX_FontCache* pCache,
- const CFX_AffineMatrix* pGlyphMatrix,
- const CFX_AffineMatrix* pObject2Device,
- FX_FLOAT font_size,
- FX_DWORD argb,
- int alpha_flag,
- void* pIccTransform) {
+FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ CFX_FontCache* pCache,
+ const CFX_Matrix* pGlyphMatrix,
+ const CFX_Matrix* pObject2Device,
+ FX_FLOAT font_size,
+ FX_DWORD argb,
+ int alpha_flag,
+ void* pIccTransform) {
if (nChars == 0) {
return TRUE;
}
@@ -769,7 +767,7 @@ FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun(
glyph_positions[i].x = pCharPos[i].m_OriginX;
glyph_positions[i].y = pCharPos[i].m_OriginY;
}
- CFX_AffineMatrix text_matrix;
+ CFX_Matrix text_matrix;
if (pObject2Device) {
text_matrix.Concat(*pObject2Device);
}
@@ -803,16 +801,15 @@ FX_BOOL CFX_QuartzDeviceDriver::CG_DrawGlypRun(
RestoreState(FALSE);
return TRUE;
}
-FX_BOOL CFX_QuartzDeviceDriver::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,
- void* pIccTransform) {
+FX_BOOL CFX_QuartzDeviceDriver::DrawDeviceText(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ CFX_FontCache* pCache,
+ const CFX_Matrix* pObject2Device,
+ FX_FLOAT font_size,
+ FX_DWORD color,
+ int alpha_flag,
+ void* pIccTransform) {
if (NULL == pFont || NULL == _context) {
return FALSE;
}
@@ -837,7 +834,7 @@ FX_BOOL CFX_QuartzDeviceDriver::DrawDeviceText(
}
}
const FXTEXT_CHARPOS* char_pos = pCharPos + i;
- CFX_AffineMatrix glphy_matrix;
+ CFX_Matrix glphy_matrix;
if (font_size < 0) {
glphy_matrix.Concat(-1, 0, 0, -1, 0, 0);
}
diff --git a/core/src/fxge/dib/dib_int.h b/core/src/fxge/dib/dib_int.h
index e01304afd0..b89e19f875 100644
--- a/core/src/fxge/dib/dib_int.h
+++ b/core/src/fxge/dib/dib_int.h
@@ -18,7 +18,7 @@ extern const int16_t SDP_Table[513];
class CPDF_FixedMatrix {
public:
- CPDF_FixedMatrix(const CFX_AffineMatrix& src, int bits) {
+ CPDF_FixedMatrix(const CFX_Matrix& src, int bits) {
base = 1 << bits;
a = FXSYS_round(src.a * base);
b = FXSYS_round(src.b * base);
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index d8335f96bd..6d37db9680 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -1559,7 +1559,7 @@ FX_BOOL CFX_ImageRenderer::Start(CFX_DIBitmap* pDevice,
const CFX_DIBSource* pSource,
int bitmap_alpha,
FX_DWORD mask_color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD dib_flags,
FX_BOOL bRgbByteOrder,
int alpha_flag,
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index 43376c2b81..7ff96d5ebf 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -152,7 +152,7 @@ const int16_t SDP_Table[513] = {
class CFX_BilinearMatrix : public CPDF_FixedMatrix {
public:
- CFX_BilinearMatrix(const CFX_AffineMatrix& src, int bits)
+ CFX_BilinearMatrix(const CFX_Matrix& src, int bits)
: CPDF_FixedMatrix(src, bits) {}
inline void Transform(int x,
int y,
@@ -296,7 +296,7 @@ FX_RECT FXDIB_SwapClipBox(FX_RECT& clip,
rect.Normalize();
return rect;
}
-CFX_DIBitmap* CFX_DIBSource::TransformTo(const CFX_AffineMatrix* pDestMatrix,
+CFX_DIBitmap* CFX_DIBSource::TransformTo(const CFX_Matrix* pDestMatrix,
int& result_left,
int& result_top,
FX_DWORD flags,
@@ -337,10 +337,10 @@ CFX_ImageTransformer::CFX_ImageTransformer() {
}
CFX_ImageTransformer::~CFX_ImageTransformer() {}
FX_BOOL CFX_ImageTransformer::Start(const CFX_DIBSource* pSrc,
- const CFX_AffineMatrix* pDestMatrix,
+ const CFX_Matrix* pDestMatrix,
int flags,
const FX_RECT* pDestClip) {
- m_pMatrix = (CFX_AffineMatrix*)pDestMatrix;
+ m_pMatrix = (CFX_Matrix*)pDestMatrix;
CFX_FloatRect unit_rect = pDestMatrix->GetUnitRect();
FX_RECT result_rect = unit_rect.GetClosestRect();
FX_RECT result_clip = result_rect;
@@ -384,8 +384,8 @@ FX_BOOL CFX_ImageTransformer::Start(const CFX_DIBSource* pSrc,
(int)FXSYS_ceil(FXSYS_sqrt2(pDestMatrix->a, pDestMatrix->b));
int stretch_height =
(int)FXSYS_ceil(FXSYS_sqrt2(pDestMatrix->c, pDestMatrix->d));
- CFX_AffineMatrix stretch2dest(1.0f, 0.0f, 0.0f, -1.0f, 0.0f,
- (FX_FLOAT)(stretch_height));
+ CFX_Matrix stretch2dest(1.0f, 0.0f, 0.0f, -1.0f, 0.0f,
+ (FX_FLOAT)(stretch_height));
stretch2dest.Concat(
pDestMatrix->a / stretch_width, pDestMatrix->b / stretch_width,
pDestMatrix->c / stretch_height, pDestMatrix->d / stretch_height,
@@ -442,9 +442,8 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) {
if (pTransformed->m_pAlphaMask) {
pTransformed->m_pAlphaMask->Clear(0);
}
- CFX_AffineMatrix result2stretch(1.0f, 0.0f, 0.0f, 1.0f,
- (FX_FLOAT)(m_ResultLeft),
- (FX_FLOAT)(m_ResultTop));
+ CFX_Matrix result2stretch(1.0f, 0.0f, 0.0f, 1.0f, (FX_FLOAT)(m_ResultLeft),
+ (FX_FLOAT)(m_ResultTop));
result2stretch.Concat(m_dest2stretch);
result2stretch.TranslateI(-m_StretchClip.left, -m_StretchClip.top);
if (stretch_buf_mask == NULL && pTransformed->m_pAlphaMask) {
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index a1790bdd22..94efd864c0 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -71,10 +71,9 @@ FX_BOOL CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB,
width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_Argb : FXDIB_Rgb);
#endif
}
-FX_BOOL CFX_RenderDevice::SetClip_PathFill(
- const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
- int fill_mode) {
+FX_BOOL CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData,
+ const CFX_Matrix* pObject2Device,
+ int fill_mode) {
if (!m_pDeviceDriver->SetClip_PathFill(pPathData, pObject2Device,
fill_mode)) {
return FALSE;
@@ -84,7 +83,7 @@ FX_BOOL CFX_RenderDevice::SetClip_PathFill(
}
FX_BOOL CFX_RenderDevice::SetClip_PathStroke(
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
if (!m_pDeviceDriver->SetClip_PathStroke(pPathData, pObject2Device,
pGraphState)) {
@@ -113,7 +112,7 @@ void CFX_RenderDevice::UpdateClipBox() {
m_ClipBox.bottom = m_Height;
}
FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -212,9 +211,9 @@ FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData,
(((fill_alpha >> 2) << 24) | (strokecolor & 0x00ffffff));
}
}
- CFX_AffineMatrix* pMatrix = NULL;
+ CFX_Matrix* pMatrix = NULL;
if (pObject2Device && !pObject2Device->IsIdentity()) {
- pMatrix = (CFX_AffineMatrix*)pObject2Device;
+ pMatrix = (CFX_Matrix*)pObject2Device;
}
int smooth_path = FX_ZEROAREA_FILL;
if (fill_mode & FXFILL_NOPATHSMOOTH) {
@@ -260,7 +259,7 @@ FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData,
}
CFX_FxgeDevice bitmap_device;
bitmap_device.Attach(&bitmap, 0, FALSE, &Backdrop, TRUE);
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
if (pObject2Device) {
matrix = *pObject2Device;
}
@@ -363,7 +362,7 @@ FX_BOOL CFX_RenderDevice::SetDIBits(const CFX_DIBSource* pBitmap,
int blend_mode,
void* pIccTransform) {
ASSERT(!pBitmap->IsAlphaMask());
- CFX_AffineMatrix ctm = GetCTM();
+ CFX_Matrix ctm = GetCTM();
FX_FLOAT fScaleX = FXSYS_fabs(ctm.a);
FX_FLOAT fScaleY = FXSYS_fabs(ctm.d);
FX_RECT dest_rect(left, top,
@@ -458,7 +457,7 @@ FX_BOOL CFX_RenderDevice::StretchBitMask(const CFX_DIBSource* pBitmap,
FX_BOOL CFX_RenderDevice::StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
void*& handle,
int alpha_flag,
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 4f6c54cac0..543c33ba14 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -156,8 +156,7 @@ void CFX_PathData::AddPointCount(int addPoints) {
AllocPointCount(new_count);
m_PointCount = new_count;
}
-void CFX_PathData::Append(const CFX_PathData* pSrc,
- const CFX_AffineMatrix* pMatrix) {
+void CFX_PathData::Append(const CFX_PathData* pSrc, const CFX_Matrix* pMatrix) {
int old_count = m_PointCount;
AddPointCount(pSrc->m_PointCount);
FXSYS_memcpy(m_pPoints + old_count, pSrc->m_pPoints,
@@ -384,7 +383,7 @@ CFX_FloatRect CFX_PathData::GetBoundingBox(FX_FLOAT line_width,
}
return rect;
}
-void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) {
+void CFX_PathData::Transform(const CFX_Matrix* pMatrix) {
if (pMatrix == NULL) {
return;
}
@@ -393,7 +392,7 @@ void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) {
}
}
FX_BOOL CFX_PathData::GetZeroAreaPath(CFX_PathData& NewPath,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_BOOL& bThin,
FX_BOOL bAdjust) const {
if (m_PointCount < 3) {
@@ -563,7 +562,7 @@ FX_BOOL CFX_PathData::IsRect() const {
}
return m_PointCount == 5 || (m_pPoints[3].m_Flag & FXPT_CLOSEFIGURE);
}
-FX_BOOL CFX_PathData::IsRect(const CFX_AffineMatrix* pMatrix,
+FX_BOOL CFX_PathData::IsRect(const CFX_Matrix* pMatrix,
CFX_FloatRect* pRect) const {
if (pMatrix == NULL) {
if (!IsRect()) {
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index 018a6005e3..bf0c8c1a16 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -90,7 +90,7 @@ void CFX_PSRenderer::RestoreState(FX_BOOL bKeepSaved) {
}
}
void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device) {
+ const CFX_Matrix* pObject2Device) {
int nPoints = pPathData->GetPointCount();
CFX_ByteTextBuf buf;
buf.EstimateSize(nPoints * 10);
@@ -137,7 +137,7 @@ void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData,
m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize());
}
void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) {
StartRendering();
OutputPath(pPathData, pObject2Device);
@@ -153,7 +153,7 @@ void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData,
}
}
void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
StartRendering();
SetGraphState(pGraphState);
@@ -178,7 +178,7 @@ void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData,
}
}
FX_BOOL CFX_PSRenderer::DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -333,9 +333,9 @@ FX_BOOL CFX_PSRenderer::SetDIBits(const CFX_DIBSource* pSource,
int alpha_flag,
void* pIccTransform) {
StartRendering();
- CFX_AffineMatrix matrix((FX_FLOAT)(pSource->GetWidth()), 0.0f, 0.0f,
- -(FX_FLOAT)(pSource->GetHeight()), (FX_FLOAT)(left),
- (FX_FLOAT)(top + pSource->GetHeight()));
+ CFX_Matrix matrix((FX_FLOAT)(pSource->GetWidth()), 0.0f, 0.0f,
+ -(FX_FLOAT)(pSource->GetHeight()), (FX_FLOAT)(left),
+ (FX_FLOAT)(top + pSource->GetHeight()));
return DrawDIBits(pSource, color, &matrix, 0, alpha_flag, pIccTransform);
}
FX_BOOL CFX_PSRenderer::StretchDIBits(const CFX_DIBSource* pSource,
@@ -348,14 +348,14 @@ FX_BOOL CFX_PSRenderer::StretchDIBits(const CFX_DIBSource* pSource,
int alpha_flag,
void* pIccTransform) {
StartRendering();
- CFX_AffineMatrix matrix((FX_FLOAT)(dest_width), 0.0f, 0.0f,
- (FX_FLOAT)(-dest_height), (FX_FLOAT)(dest_left),
- (FX_FLOAT)(dest_top + dest_height));
+ CFX_Matrix matrix((FX_FLOAT)(dest_width), 0.0f, 0.0f,
+ (FX_FLOAT)(-dest_height), (FX_FLOAT)(dest_left),
+ (FX_FLOAT)(dest_top + dest_height));
return DrawDIBits(pSource, color, &matrix, flags, alpha_flag, pIccTransform);
}
FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
int alpha_flag,
void* pIccTransform) {
@@ -607,7 +607,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache,
charpos.m_AdjustMatrix[3];
}
pPSFont->m_nGlyphs++;
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
if (charpos.m_bGlyphAdjust)
matrix.Set(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0);
@@ -657,7 +657,7 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD color,
int alpha_flag,
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index f01bdcfb3e..5e7773e300 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -176,7 +176,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
CFX_Font* pFont,
CFX_FontCache* pCache,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pText2Device,
+ const CFX_Matrix* pText2Device,
FX_DWORD fill_color,
FX_DWORD text_flags,
int alpha_flag,
@@ -220,7 +220,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
return TRUE;
}
}
- CFX_AffineMatrix char2device, deviceCtm, text2Device;
+ CFX_Matrix char2device, deviceCtm, text2Device;
if (pText2Device) {
char2device = *pText2Device;
text2Device = *pText2Device;
@@ -272,7 +272,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars);
int iChar;
deviceCtm = char2device;
- CFX_AffineMatrix matrixCTM = GetCTM();
+ CFX_Matrix matrixCTM = GetCTM();
FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a);
FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d);
deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0);
@@ -290,7 +290,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
}
glyph.m_OriginY = FXSYS_round(glyph.m_fOriginY);
if (charpos.m_bGlyphAdjust) {
- CFX_AffineMatrix new_matrix(
+ CFX_Matrix new_matrix(
charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0);
new_matrix.Concat(deviceCtm);
@@ -1108,8 +1108,8 @@ FX_BOOL CFX_RenderDevice::DrawTextPath(int nChars,
CFX_Font* pFont,
CFX_FontCache* pCache,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pText2User,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pText2User,
+ const CFX_Matrix* pUser2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_ARGB stroke_color,
@@ -1125,7 +1125,7 @@ FX_BOOL CFX_RenderDevice::DrawTextPath(int nChars,
FX_FONTCACHE_DEFINE(pCache, pFont);
for (int iChar = 0; iChar < nChars; iChar++) {
const FXTEXT_CHARPOS& charpos = pCharPos[iChar];
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
if (charpos.m_bGlyphAdjust)
matrix.Set(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1],
charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0);
@@ -1252,7 +1252,7 @@ void CFX_FaceCache::InitPlatform() {}
#endif
CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(
CFX_Font* pFont,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
CFX_ByteStringC& FaceGlyphsKey,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
@@ -1279,14 +1279,13 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(
pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
return pGlyphBitmap;
}
-const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(
- CFX_Font* pFont,
- FX_DWORD glyph_index,
- FX_BOOL bFontStyle,
- const CFX_AffineMatrix* pMatrix,
- int dest_width,
- int anti_alias,
- int& text_flags) {
+const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont,
+ FX_DWORD glyph_index,
+ FX_BOOL bFontStyle,
+ const CFX_Matrix* pMatrix,
+ int dest_width,
+ int anti_alias,
+ int& text_flags) {
if (glyph_index == (FX_DWORD)-1) {
return NULL;
}
@@ -1518,7 +1517,7 @@ static void _ContrastAdjust(uint8_t* pDataIn,
CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias) {
if (m_Face == NULL) {
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index 7cce7b3326..8e012c82e0 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -127,11 +127,11 @@ class CSkia_PathData {
SkPath m_PathData;
void BuildPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device);
+ const CFX_Matrix* pObject2Device);
};
void CSkia_PathData::BuildPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device) {
+ const CFX_Matrix* pObject2Device) {
const CFX_PathData* pFPath = pPathData;
int nPoints = pFPath->GetPointCount();
FX_PATHPOINT* pPoints = pFPath->GetPoints();
@@ -177,7 +177,7 @@ void CSkia_PathData::BuildPath(const CFX_PathData* pPathData,
static void SkRasterizeStroke(SkPaint& spaint,
SkPath* dstPathData,
SkPath& path_data,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_FIXFLOAT scale = FIX8_ONE,
FX_BOOL bStrokeAdjust = FALSE,
@@ -269,16 +269,15 @@ CFX_SkiaDeviceDriver::CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap,
CFX_SkiaDeviceDriver::~CFX_SkiaDeviceDriver() {
delete m_pAggDriver;
}
-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) {
+FX_BOOL CFX_SkiaDeviceDriver::DrawDeviceText(int nChars,
+ const FXTEXT_CHARPOS* pCharPos,
+ CFX_Font* pFont,
+ CFX_FontCache* pCache,
+ const CFX_Matrix* pObject2Device,
+ FX_FIXFLOAT font_size,
+ FX_DWORD color,
+ int alpha_flag,
+ void* pIccTransform) {
return m_pAggDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache,
pObject2Device, font_size, color,
alpha_flag, pIccTransform);
@@ -328,9 +327,9 @@ void CFX_SkiaDeviceDriver::SetClipMask(SkPath& skPath, SkPaint* spaint) {
m_pAggDriver->m_pClipRgn->IntersectMaskF(clip_box.fLeft, clip_box.fTop, mask);
}
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
+ const CFX_PathData* pPathData, // path info
+ const CFX_Matrix* pObject2Device, // optional transformation
+ int fill_mode // fill mode, WINDING or ALTERNATE
) {
if (m_pAggDriver->m_pClipRgn == NULL)
m_pAggDriver->m_pClipRgn = new CFX_ClipRgn(
@@ -365,8 +364,8 @@ FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathFill(
}
FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathStroke(
- const CFX_PathData* pPathData, // path info
- const CFX_AffineMatrix* pObject2Device, // optional transformation
+ const CFX_PathData* pPathData, // path info
+ const CFX_Matrix* pObject2Device, // optional transformation
const CFX_GraphStateData* pGraphState // graphic state, for pen attributes
) {
if (m_pAggDriver->m_pClipRgn == NULL)
@@ -425,8 +424,8 @@ FX_BOOL CFX_SkiaDeviceDriver::RenderRasterizerSkia(SkPath& skPath,
}
FX_BOOL CFX_SkiaDeviceDriver::DrawPath(
- const CFX_PathData* pPathData, // path info
- const CFX_AffineMatrix* pObject2Device, // optional transformation
+ const CFX_PathData* pPathData, // path info
+ const CFX_Matrix* pObject2Device, // optional transformation
const CFX_GraphStateData* pGraphState, // graphic state, for pen attributes
FX_DWORD fill_color, // fill color
FX_DWORD stroke_color, // stroke color
@@ -472,7 +471,7 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawPath(
// flatness problem, second part doing the transformation, so we don't have
// stroking geo problem.
// TESTDOC: Bug #5253 - test[1].pdf
- CFX_AffineMatrix matrix1, matrix2;
+ CFX_Matrix matrix1, matrix2;
if (pObject2Device) {
matrix1.a = FXSYS_fabs(pObject2Device->a) > FXSYS_fabs(pObject2Device->b)
? FXSYS_fabs(pObject2Device->a)
@@ -566,7 +565,7 @@ FX_BOOL CFX_SkiaDeviceDriver::StretchDIBits(const CFX_DIBSource* pSource,
FX_BOOL CFX_SkiaDeviceDriver::StartDIBits(const CFX_DIBSource* pSource,
int bitmap_alpha,
FX_DWORD argb,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
diff --git a/core/src/fxge/skia/fx_skia_device.h b/core/src/fxge/skia/fx_skia_device.h
index a2cfc355b3..013962d046 100644
--- a/core/src/fxge/skia/fx_skia_device.h
+++ b/core/src/fxge/skia/fx_skia_device.h
@@ -24,22 +24,22 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
/** Set clipping path using filled region */
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
+ const CFX_PathData* pPathData, // path info
+ const CFX_Matrix* pObject2Device, // optional transformation
+ int fill_mode // fill mode, WINDING or ALTERNATE
);
/** Set clipping path using stroked region */
virtual FX_BOOL SetClip_PathStroke(
- const CFX_PathData* pPathData, // path info
- const CFX_AffineMatrix* pObject2Device, // optional transformation
+ const CFX_PathData* pPathData, // path info
+ const CFX_Matrix* pObject2Device, // optional transformation
const CFX_GraphStateData*
pGraphState // graphic state, for pen attributes
);
/** Draw a path */
virtual FX_BOOL DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -103,7 +103,7 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
void*& handle,
int alpha_flag = 0,
@@ -115,7 +115,7 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver {
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FIXFLOAT font_size,
FX_DWORD color,
int alpha_flag = 0,
diff --git a/core/src/fxge/win32/dwrite_int.h b/core/src/fxge/win32/dwrite_int.h
index a2c91ce5b4..206cdf5020 100644
--- a/core/src/fxge/win32/dwrite_int.h
+++ b/core/src/fxge/win32/dwrite_int.h
@@ -44,7 +44,7 @@ class CDWriteExt {
FX_BOOL DwRendingString(void* renderTarget,
CFX_ClipRgn* pClipRgn,
FX_RECT& stringRect,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
void* font,
FX_FLOAT font_size,
FX_ARGB text_color,
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index b7b625341e..4ca4316c2e 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -681,7 +681,7 @@ FX_BOOL CGdiDeviceDriver::SetClipRgn(void* hRgn) {
return TRUE;
}
static HPEN _CreatePen(const CFX_GraphStateData* pGraphState,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD argb) {
FX_FLOAT width;
FX_FLOAT scale = 1.f;
@@ -757,7 +757,7 @@ static HBRUSH _CreateBrush(FX_DWORD argb) {
}
static void _SetPathToDC(HDC hDC,
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
BeginPath(hDC);
int nPoints = pPathData->GetPointCount();
FX_PATHPOINT* pPoints = pPathData->GetPoints();
@@ -835,12 +835,12 @@ void CGdiDeviceDriver::DrawLine(FX_FLOAT x1,
MoveToEx(m_hDC, FXSYS_round(x1), FXSYS_round(y1), NULL);
LineTo(m_hDC, FXSYS_round(x2), FXSYS_round(y2));
}
-static FX_BOOL _MatrixNoScaled(const CFX_AffineMatrix* pMatrix) {
+static FX_BOOL _MatrixNoScaled(const CFX_Matrix* pMatrix) {
return pMatrix->GetA() == 1.0f && pMatrix->GetB() == 0 &&
pMatrix->GetC() == 0 && pMatrix->GetD() == 1.0f;
}
FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -975,7 +975,7 @@ FX_BOOL CGdiDeviceDriver::FillRect(const FX_RECT* pRect,
return TRUE;
}
FX_BOOL CGdiDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int fill_mode) {
if (pPathData->GetPointCount() == 5) {
CFX_FloatRect rectf;
@@ -992,7 +992,7 @@ FX_BOOL CGdiDeviceDriver::SetClip_PathFill(const CFX_PathData* pPathData,
}
FX_BOOL CGdiDeviceDriver::SetClip_PathStroke(
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
const CFX_GraphStateData* pGraphState) {
HPEN hPen = _CreatePen(pGraphState, pMatrix, 0xff000000);
hPen = (HPEN)SelectObject(m_hDC, hPen);
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 0d533436b5..ab50f3cf38 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -206,7 +206,7 @@ failed:
FX_BOOL CDWriteExt::DwRendingString(void* renderTarget,
CFX_ClipRgn* pClipRgn,
FX_RECT& stringRect,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
void* font,
FX_FLOAT font_size,
FX_ARGB text_color,
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 368b15fcc0..2886ee81d0 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -965,7 +965,7 @@ FX_BOOL CGdiplusExt::StretchDIBits(HDC hDC,
return TRUE;
}
static GpPen* _GdipCreatePen(const CFX_GraphStateData* pGraphState,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
DWORD argb,
FX_BOOL bTextMode = FALSE) {
CGdiplusExt& GdiplusExt =
@@ -1072,7 +1072,7 @@ static GpPen* _GdipCreatePen(const CFX_GraphStateData* pGraphState,
return pPen;
}
static FX_BOOL IsSmallTriangle(PointF* points,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int& v1,
int& v2) {
int pairs[] = {1, 2, 0, 2, 0, 1};
@@ -1098,7 +1098,7 @@ static FX_BOOL IsSmallTriangle(PointF* points,
}
FX_BOOL CGdiplusExt::DrawPath(HDC hDC,
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_argb,
FX_DWORD stroke_argb,
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 126e5d7f47..c829a438b9 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -136,7 +136,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource,
dest_height, flags, pIccTransform);
}
static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
- const CFX_AffineMatrix* pDestMatrix) {
+ const CFX_Matrix* pDestMatrix) {
ASSERT(pSrc->GetFormat() == FXDIB_1bppRgb ||
pSrc->GetFormat() == FXDIB_1bppMask ||
pSrc->GetFormat() == FXDIB_1bppCmyk);
@@ -152,11 +152,11 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
FX_FLOAT area_scale =
FXSYS_Div((FX_FLOAT)(src_width * src_height), dest_area);
FX_FLOAT size_scale = FXSYS_sqrt(area_scale);
- CFX_AffineMatrix adjusted_matrix(*pDestMatrix);
+ CFX_Matrix adjusted_matrix(*pDestMatrix);
adjusted_matrix.Scale(size_scale, size_scale);
CFX_FloatRect result_rect_f = adjusted_matrix.GetUnitRect();
FX_RECT result_rect = result_rect_f.GetOutterRect();
- CFX_AffineMatrix src2result;
+ CFX_Matrix src2result;
src2result.e = adjusted_matrix.c + adjusted_matrix.e;
src2result.f = adjusted_matrix.d + adjusted_matrix.f;
src2result.a = adjusted_matrix.a / pSrcBitmap->GetWidth();
@@ -164,7 +164,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
src2result.c = -adjusted_matrix.c / pSrcBitmap->GetHeight();
src2result.d = -adjusted_matrix.d / pSrcBitmap->GetHeight();
src2result.TranslateI(-result_rect.left, -result_rect.top);
- CFX_AffineMatrix result2src;
+ CFX_Matrix result2src;
result2src.SetReverse(src2result);
CPDF_FixedMatrix result2src_fix(result2src, 8);
int result_width = result_rect.Width();
@@ -224,7 +224,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc,
FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
@@ -375,22 +375,21 @@ void CPSPrinterDriver::SaveState() {
void CPSPrinterDriver::RestoreState(FX_BOOL bKeepSaved) {
m_PSRenderer.RestoreState(bKeepSaved);
}
-FX_BOOL CPSPrinterDriver::SetClip_PathFill(
- const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
- int fill_mode) {
+FX_BOOL CPSPrinterDriver::SetClip_PathFill(const CFX_PathData* pPathData,
+ const CFX_Matrix* pObject2Device,
+ int fill_mode) {
m_PSRenderer.SetClip_PathFill(pPathData, pObject2Device, fill_mode);
return TRUE;
}
FX_BOOL CPSPrinterDriver::SetClip_PathStroke(
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
m_PSRenderer.SetClip_PathStroke(pPathData, pObject2Device, pGraphState);
return TRUE;
}
FX_BOOL CPSPrinterDriver::DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_ARGB fill_color,
FX_ARGB stroke_color,
@@ -444,7 +443,7 @@ FX_BOOL CPSPrinterDriver::StretchDIBits(const CFX_DIBSource* pBitmap,
FX_BOOL CPSPrinterDriver::StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
@@ -464,7 +463,7 @@ FX_BOOL CPSPrinterDriver::DrawDeviceText(int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD color,
int alpha_flag,
diff --git a/core/src/fxge/win32/win32_int.h b/core/src/fxge/win32/win32_int.h
index 95d31d159d..0616476676 100644
--- a/core/src/fxge/win32/win32_int.h
+++ b/core/src/fxge/win32/win32_int.h
@@ -36,7 +36,7 @@ class CGdiplusExt {
int flags);
FX_BOOL DrawPath(HDC hDC,
const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_argb,
FX_DWORD stroke_argb,
@@ -117,13 +117,13 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver {
}
}
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) override;
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) override;
FX_BOOL DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -212,7 +212,7 @@ class CGdiDisplayDriver : public CGdiDeviceDriver {
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
@@ -260,7 +260,7 @@ class CGdiPrinterDriver : public CGdiDeviceDriver {
virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
@@ -300,13 +300,13 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
void SaveState() override;
void RestoreState(FX_BOOL bKeepSaved = FALSE) override;
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) override;
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) override;
FX_BOOL DrawPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState,
FX_DWORD fill_color,
FX_DWORD stroke_color,
@@ -337,7 +337,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap,
int bitmap_alpha,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD render_flags,
void*& handle,
int alpha_flag,
@@ -347,7 +347,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver {
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
CFX_FontCache* pCache,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
FX_FLOAT font_size,
FX_DWORD color,
int alpha_flag,