summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-10 14:49:23 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-10 14:49:23 -0800
commitf32c969bce6743fca1e7ff796b54a1692d26d7f0 (patch)
treef35f0ae0c8505394b2f195f4ea849249668af170 /core
parent94edf0c37d1ee6a03697375b9e227071ff2ee69d (diff)
downloadpdfium-f32c969bce6743fca1e7ff796b54a1692d26d7f0.tar.xz
Remove CFX_AffineMatrix/CPDF_Matrix
These are synonyms for CFX_Matrix. Nothing but sed and manual deletion of 2 #defines in fpdf_parser.h and fx_coordinates.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1513363002 .
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_module.h2
-rw-r--r--core/include/fpdfapi/fpdf_objects.h6
-rw-r--r--core/include/fpdfapi/fpdf_page.h12
-rw-r--r--core/include/fpdfapi/fpdf_pageobj.h36
-rw-r--r--core/include/fpdfapi/fpdf_parser.h5
-rw-r--r--core/include/fpdfapi/fpdf_render.h22
-rw-r--r--core/include/fpdfapi/fpdf_resource.h20
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h16
-rw-r--r--core/include/fpdftext/fpdf_text.h2
-rw-r--r--core/include/fxcrt/fx_coordinates.h1
-rw-r--r--core/include/fxge/fx_dib.h12
-rw-r--r--core/include/fxge/fx_font.h8
-rw-r--r--core/include/fxge/fx_ge.h44
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp28
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp17
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp5
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp12
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h10
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp10
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render.cpp94
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp16
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp50
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp58
-rw-r--r--core/src/fpdfapi/fpdf_render/render_int.h92
-rw-r--r--core/src/fpdfdoc/doc_annot.cpp12
-rw-r--r--core/src/fpdfdoc/doc_ap.cpp10
-rw-r--r--core/src/fpdfdoc/doc_formcontrol.cpp6
-rw-r--r--core/src/fpdfdoc/doc_utils.cpp4
-rw-r--r--core/src/fpdftext/fpdf_text.cpp4
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp36
-rw-r--r--core/src/fpdftext/fpdf_text_search.cpp4
-rw-r--r--core/src/fpdftext/text_int.h14
-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
58 files changed, 526 insertions, 558 deletions
diff --git a/core/include/fpdfapi/fpdf_module.h b/core/include/fpdfapi/fpdf_module.h
index 5e99753d74..00aed45d1f 100644
--- a/core/include/fpdfapi/fpdf_module.h
+++ b/core/include/fpdfapi/fpdf_module.h
@@ -12,9 +12,9 @@
#include "third_party/base/nonstd_unique_ptr.h"
class CCodec_ModuleMgr;
-class CFX_AffineMatrix;
class CFX_BitmapDevice;
class CFX_DIBSource;
+class CFX_Matrix;
class CPDF_ColorSpace;
class CPDF_Dictionary;
class CPDF_DocPageData;
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 532ede2a08..143e7d71c2 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -295,7 +295,7 @@ class CPDF_Array : public CPDF_Object {
CPDF_Object* GetElementValue(FX_DWORD index) const;
- CFX_AffineMatrix GetMatrix();
+ CFX_Matrix GetMatrix();
CFX_FloatRect GetRect();
@@ -400,7 +400,7 @@ class CPDF_Dictionary : public CPDF_Object {
CFX_FloatRect GetRect(const CFX_ByteStringC& key) const;
- CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const;
+ CFX_Matrix GetMatrix(const CFX_ByteStringC& key) const;
FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); }
@@ -436,7 +436,7 @@ class CPDF_Dictionary : public CPDF_Object {
void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect);
- void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix);
+ void SetAtMatrix(const CFX_ByteStringC& key, const CFX_Matrix& matrix);
void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue);
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index 6823dc1f96..5fa413d29c 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -63,7 +63,7 @@ class CPDF_PageObjects {
FX_POSITION InsertObject(FX_POSITION posInsertAfter,
CPDF_PageObject* pNewObject);
- void Transform(const CFX_AffineMatrix& matrix);
+ void Transform(const CFX_Matrix& matrix);
FX_BOOL BackgroundAlphaNeeded() const { return m_bBackgroundAlphaNeeded; }
@@ -109,7 +109,7 @@ class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData {
void ParseContent(CPDF_ParseOptions* pOptions = NULL,
FX_BOOL bReParse = FALSE);
- void GetDisplayMatrix(CFX_AffineMatrix& matrix,
+ void GetDisplayMatrix(CFX_Matrix& matrix,
int xPos,
int yPos,
int xSize,
@@ -122,7 +122,7 @@ class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData {
CFX_FloatRect GetPageBBox() const { return m_BBox; }
- const CFX_AffineMatrix& GetPageMatrix() const { return m_PageMatrix; }
+ const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; }
CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const;
@@ -137,7 +137,7 @@ class CPDF_Page : public CPDF_PageObjects, public CFX_PrivateData {
FX_FLOAT m_PageHeight;
- CFX_AffineMatrix m_PageMatrix;
+ CFX_Matrix m_PageMatrix;
CPDF_PageRenderCache* m_pPageRender;
};
@@ -163,13 +163,13 @@ class CPDF_Form : public CPDF_PageObjects {
~CPDF_Form();
void StartParse(CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level = 0);
void ParseContent(CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level = 0);
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h
index 886930ffe7..2b6f78e63f 100644
--- a/core/include/fpdfapi/fpdf_pageobj.h
+++ b/core/include/fpdfapi/fpdf_pageobj.h
@@ -52,11 +52,9 @@ class CPDF_Path : public CFX_CountRef<CFX_PathData> {
return m_pObject->GetBoundingBox(line_width, miter_limit);
}
- void Transform(const CFX_AffineMatrix* pMatrix) {
- GetModify()->Transform(pMatrix);
- }
+ void Transform(const CFX_Matrix* pMatrix) { GetModify()->Transform(pMatrix); }
- void Append(CPDF_Path src, const CFX_AffineMatrix* pMatrix) {
+ void Append(CPDF_Path src, const CFX_Matrix* pMatrix) {
m_pObject->Append(src.m_pObject, pMatrix);
}
@@ -109,7 +107,7 @@ class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> {
void AppendTexts(CPDF_TextObject** pTexts, int count);
- void Transform(const CFX_AffineMatrix& matrix);
+ void Transform(const CFX_Matrix& matrix);
};
class CPDF_ColorStateData {
public:
@@ -362,7 +360,7 @@ class CPDF_PageObject : public CPDF_GraphicStates {
void Copy(const CPDF_PageObject* pSrcObject);
- virtual void Transform(const CFX_AffineMatrix& matrix) = 0;
+ virtual void Transform(const CFX_Matrix& matrix) = 0;
void RemoveClipPath();
@@ -370,13 +368,13 @@ class CPDF_PageObject : public CPDF_GraphicStates {
void CopyClipPath(CPDF_PageObject* pObj);
- void TransformClipPath(CFX_AffineMatrix& matrix);
+ void TransformClipPath(CFX_Matrix& matrix);
- void TransformGeneralState(CFX_AffineMatrix& matrix);
+ void TransformGeneralState(CFX_Matrix& matrix);
void SetColorState(CPDF_ColorState state) { m_ColorState = state; }
- FX_RECT GetBBox(const CFX_AffineMatrix* pMatrix) const;
+ FX_RECT GetBBox(const CFX_Matrix* pMatrix) const;
int m_Type;
@@ -427,7 +425,7 @@ class CPDF_TextObject : public CPDF_PageObject {
FX_FLOAT GetPosY() const { return m_PosY; }
- void GetTextMatrix(CFX_AffineMatrix* pMatrix) const;
+ void GetTextMatrix(CFX_Matrix* pMatrix) const;
CPDF_Font* GetFont() const { return m_TextState.GetFont(); }
@@ -446,7 +444,7 @@ class CPDF_TextObject : public CPDF_PageObject {
void SetTextState(CPDF_TextState TextState);
// CPDF_PageObject:
- void Transform(const CFX_AffineMatrix& matrix) override;
+ void Transform(const CFX_Matrix& matrix) override;
void CalcCharPos(FX_FLOAT* pPosArray) const;
@@ -495,7 +493,7 @@ class CPDF_PathObject : public CPDF_PageObject {
CPDF_PathObject() { m_Type = PDFPAGE_PATH; }
~CPDF_PathObject() override {}
- void Transform(const CFX_AffineMatrix& maxtrix) override;
+ void Transform(const CFX_Matrix& maxtrix) override;
void SetGraphState(CPDF_GraphState GraphState);
@@ -507,7 +505,7 @@ class CPDF_PathObject : public CPDF_PageObject {
FX_BOOL m_bStroke;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
protected:
void CopyData(const CPDF_PageObject* pSrcObject) override;
@@ -518,11 +516,11 @@ class CPDF_ImageObject : public CPDF_PageObject {
CPDF_ImageObject();
~CPDF_ImageObject() override;
- void Transform(const CFX_AffineMatrix& matrix) override;
+ void Transform(const CFX_Matrix& matrix) override;
CPDF_Image* m_pImage;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
void CalcBoundingBox();
@@ -537,9 +535,9 @@ class CPDF_ShadingObject : public CPDF_PageObject {
CPDF_ShadingPattern* m_pShading;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
- void Transform(const CFX_AffineMatrix& matrix) override;
+ void Transform(const CFX_Matrix& matrix) override;
void CalcBoundingBox();
@@ -555,11 +553,11 @@ class CPDF_FormObject : public CPDF_PageObject {
}
~CPDF_FormObject() override;
- void Transform(const CFX_AffineMatrix& matrix) override;
+ void Transform(const CFX_Matrix& matrix) override;
CPDF_Form* m_pForm;
- CFX_AffineMatrix m_FormMatrix;
+ CFX_Matrix m_FormMatrix;
void CalcBoundingBox();
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index dab0719f26..ad85de4c9a 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -15,10 +15,10 @@
class CFDF_Document;
class CFDF_Parser;
-class CFX_AffineMatrix;
class CFX_DIBSource;
class CFX_FloatRect;
class CFX_Font;
+class CFX_Matrix;
class CFX_PrivateData;
class CPDF_ColorSpace;
class CPDF_CryptoHandler;
@@ -122,7 +122,7 @@ class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects {
CPDF_Pattern* LoadPattern(CPDF_Object* pObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* matrix = NULL);
+ const CFX_Matrix* matrix = NULL);
CPDF_Image* LoadImageF(CPDF_Object* pObj);
@@ -789,7 +789,6 @@ class CPDF_Point {
};
#define CPDF_Rect CFX_FloatRect
-#define CPDF_Matrix CFX_AffineMatrix
CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& orig);
CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig);
CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig);
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index 8d87b588c1..d7fdbd463d 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -94,21 +94,21 @@ class CPDF_RenderContext {
void Clear();
void AppendObjectList(CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObject2Device);
+ const CFX_Matrix* pObject2Device);
void Render(CFX_RenderDevice* pDevice,
const CPDF_RenderOptions* pOptions = NULL,
- const CFX_AffineMatrix* pFinalMatrix = NULL);
+ const CFX_Matrix* pFinalMatrix = NULL);
void DrawObjectList(CFX_RenderDevice* pDevice,
CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CPDF_RenderOptions* pOptions);
void GetBackground(CFX_DIBitmap* pBuffer,
const CPDF_PageObject* pObj,
const CPDF_RenderOptions* pOptions,
- CFX_AffineMatrix* pFinalMatrix);
+ CFX_Matrix* pFinalMatrix);
CPDF_PageRenderCache* GetPageCache() const { return m_pPageCache; }
@@ -126,7 +126,7 @@ class CPDF_RenderContext {
void Render(CFX_RenderDevice* pDevice,
const CPDF_PageObject* pStopObj,
const CPDF_RenderOptions* pOptions,
- const CFX_AffineMatrix* pFinalMatrix);
+ const CFX_Matrix* pFinalMatrix);
friend class CPDF_RenderStatus;
friend class CPDF_ProgressiveRenderer;
};
@@ -185,7 +185,7 @@ class CPDF_TextRenderer {
FX_FLOAT origin_y,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* matrix,
+ const CFX_Matrix* matrix,
const CFX_ByteString& str,
FX_ARGB fill_argb,
FX_ARGB stroke_argb = 0,
@@ -198,8 +198,8 @@ class CPDF_TextRenderer {
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
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_ARGB fill_argb,
FX_ARGB stroke_argb,
@@ -212,7 +212,7 @@ class CPDF_TextRenderer {
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pText2Device,
+ const CFX_Matrix* pText2Device,
FX_ARGB fill_argb,
const CPDF_RenderOptions* pOptions);
@@ -222,7 +222,7 @@ class CPDF_TextRenderer {
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pText2Device,
+ const CFX_Matrix* pText2Device,
FX_ARGB fill_argb);
};
class CPDF_PageRenderCache {
@@ -288,6 +288,6 @@ class CPDF_RenderConfig {
int m_RenderStepLimit;
};
-FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix);
+FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix);
#endif // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 6c39e381f5..1f6c8b005b 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -377,7 +377,7 @@ class CPDF_Type3Char {
CFX_DIBitmap* m_pBitmap;
FX_BOOL m_bColored;
int m_Width;
- CFX_AffineMatrix m_ImageMatrix;
+ CFX_Matrix m_ImageMatrix;
FX_RECT m_BBox;
};
@@ -395,11 +395,11 @@ class CPDF_Type3Font : public CPDF_SimpleFont {
return GetCharWidthF(charcode);
}
void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override;
- CFX_AffineMatrix& GetFontMatrix() { return m_FontMatrix; }
+ CFX_Matrix& GetFontMatrix() { return m_FontMatrix; }
void CheckType3FontMetrics();
protected:
- CFX_AffineMatrix m_FontMatrix;
+ CFX_Matrix m_FontMatrix;
private:
FX_BOOL _Load() override;
@@ -647,13 +647,13 @@ class CPDF_Pattern {
int m_PatternType;
- CFX_AffineMatrix m_Pattern2Form;
- CFX_AffineMatrix m_ParentMatrix;
+ CFX_Matrix m_Pattern2Form;
+ CFX_Matrix m_ParentMatrix;
CPDF_Document* m_pDocument;
protected:
- CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix);
+ CPDF_Pattern(const CFX_Matrix* pParentMatrix);
FX_BOOL m_bForceClear;
};
@@ -661,7 +661,7 @@ class CPDF_TilingPattern : public CPDF_Pattern {
public:
CPDF_TilingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
- const CFX_AffineMatrix* parentMatrix);
+ const CFX_Matrix* parentMatrix);
~CPDF_TilingPattern() override;
@@ -695,7 +695,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* parentMatrix);
+ const CFX_Matrix* parentMatrix);
~CPDF_ShadingPattern() override;
@@ -746,11 +746,11 @@ class CPDF_MeshStream {
void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b);
- FX_DWORD GetVertex(CPDF_MeshVertex& vertex, CFX_AffineMatrix* pObject2Bitmap);
+ FX_DWORD GetVertex(CPDF_MeshVertex& vertex, CFX_Matrix* pObject2Bitmap);
FX_BOOL GetVertexRow(CPDF_MeshVertex* vertex,
int count,
- CFX_AffineMatrix* pObject2Bitmap);
+ CFX_Matrix* pObject2Bitmap);
CPDF_Function** m_pFuncs;
CPDF_ColorSpace* m_pCS;
FX_DWORD m_nFuncs, m_nCoordBits, m_nCompBits, m_nFlagBits, m_nComps;
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index 3dea48d3ed..58f81cad92 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -402,19 +402,19 @@ class CPDF_Annot : public CFX_PrivateData {
FX_BOOL DrawAppearance(const CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
AppearanceMode mode,
const CPDF_RenderOptions* pOptions);
FX_BOOL DrawInContext(const CPDF_Page* pPage,
const CPDF_RenderContext* pContext,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
AppearanceMode mode);
void ClearCachedAP();
void DrawBorder(CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
const CPDF_RenderOptions* pOptions);
CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode);
@@ -437,7 +437,7 @@ class CPDF_AnnotList {
void DisplayAnnots(const CPDF_Page* pPage,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_BOOL bShowWidget,
CPDF_RenderOptions* pOptions) {
DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix,
@@ -447,7 +447,7 @@ class CPDF_AnnotList {
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_DWORD dwAnnotFlags,
CPDF_RenderOptions* pOptions,
FX_RECT* pClipRect);
@@ -461,7 +461,7 @@ class CPDF_AnnotList {
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_BOOL bWidget,
CPDF_RenderOptions* pOptions,
FX_RECT* clip_rect);
@@ -517,7 +517,7 @@ class CPDF_DefaultAppearance {
CFX_ByteString GetTextMatrixString();
- CFX_AffineMatrix GetTextMatrix();
+ CFX_Matrix GetTextMatrix();
protected:
CFX_ByteString m_csDA;
@@ -907,7 +907,7 @@ class CPDF_FormControl {
CFX_FloatRect GetRect() const;
void DrawControl(CFX_RenderDevice* pDevice,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
CPDF_Page* pPage,
CPDF_Annot::AppearanceMode mode,
const CPDF_RenderOptions* pOptions = NULL);
diff --git a/core/include/fpdftext/fpdf_text.h b/core/include/fpdftext/fpdf_text.h
index 360e256ce6..1b3ac0da00 100644
--- a/core/include/fpdftext/fpdf_text.h
+++ b/core/include/fpdftext/fpdf_text.h
@@ -51,7 +51,7 @@ typedef struct {
FX_FLOAT m_OriginY;
CFX_FloatRect m_CharBox;
CPDF_TextObject* m_pTextObj;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
} FPDF_CHAR_INFO;
typedef CFX_ArrayTemplate<CFX_FloatRect> CFX_RectArray;
#define FPDFTEXT_LRTB 0
diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h
index e7fbe8549b..bb8f2f71f8 100644
--- a/core/include/fxcrt/fx_coordinates.h
+++ b/core/include/fxcrt/fx_coordinates.h
@@ -741,6 +741,5 @@ class CFX_Matrix {
FX_FLOAT e;
FX_FLOAT f;
};
-#define CFX_AffineMatrix CFX_Matrix
#endif // CORE_INCLUDE_FXCRT_FX_COORDINATES_H_
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index e57b3c9a83..f4f4fd2e6f 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -232,7 +232,7 @@ class CFX_DIBSource {
FX_DWORD flags = 0,
const FX_RECT* pClip = NULL) const;
- CFX_DIBitmap* TransformTo(const CFX_AffineMatrix* pMatrix,
+ CFX_DIBitmap* TransformTo(const CFX_Matrix* pMatrix,
int& left,
int& top,
FX_DWORD flags = 0,
@@ -639,19 +639,19 @@ class CFX_ImageTransformer {
~CFX_ImageTransformer();
FX_BOOL Start(const CFX_DIBSource* pSrc,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int flags,
const FX_RECT* pClip);
FX_BOOL Continue(IFX_Pause* pPause);
- CFX_AffineMatrix* m_pMatrix;
+ CFX_Matrix* m_pMatrix;
FX_RECT m_StretchClip;
int m_ResultLeft;
int m_ResultTop;
int m_ResultWidth;
int m_ResultHeight;
- CFX_AffineMatrix m_dest2stretch;
+ CFX_Matrix m_dest2stretch;
CFX_ImageStretcher m_Stretcher;
CFX_BitmapStorer m_Storer;
FX_DWORD m_Flags;
@@ -667,7 +667,7 @@ class CFX_ImageRenderer {
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 = FALSE,
int alpha_flag = 0,
@@ -681,7 +681,7 @@ class CFX_ImageRenderer {
const CFX_ClipRgn* m_pClipRgn;
int m_BitmapAlpha;
FX_DWORD m_MaskColor;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
CFX_ImageTransformer* m_pTransformer;
CFX_ImageStretcher m_Stretcher;
CFX_BitmapComposer m_Composer;
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 085ead88c7..bb0493d4a1 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -392,7 +392,7 @@ class CFX_FaceCache {
const CFX_GlyphBitmap* LoadGlyphBitmap(CFX_Font* pFont,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias,
int& text_flags);
@@ -404,16 +404,16 @@ class CFX_FaceCache {
CFX_GlyphBitmap* 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);
CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont,
FX_DWORD glyph_index,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
int dest_width,
int anti_alias);
CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
CFX_ByteStringC& FaceGlyphsKey,
FX_DWORD glyph_index,
FX_BOOL bFontStyle,
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index 4cfe622007..01a1c72a8f 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -136,18 +136,18 @@ class CFX_PathData {
CFX_FloatRect GetBoundingBox(FX_FLOAT line_width, FX_FLOAT miter_limit) const;
- void Transform(const CFX_AffineMatrix* pMatrix);
+ void Transform(const CFX_Matrix* pMatrix);
FX_BOOL IsRect() const;
FX_BOOL GetZeroAreaPath(CFX_PathData& NewPath,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_BOOL& bThin,
FX_BOOL bAdjust) const;
- FX_BOOL IsRect(const CFX_AffineMatrix* pMatrix, CFX_FloatRect* rect) const;
+ FX_BOOL IsRect(const CFX_Matrix* pMatrix, CFX_FloatRect* rect) const;
- void Append(const CFX_PathData* pSrc, const CFX_AffineMatrix* pMatrix);
+ void Append(const CFX_PathData* pSrc, const CFX_Matrix* pMatrix);
void AppendRect(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top);
void SetPoint(int index, FX_FLOAT x, FX_FLOAT y, int flag);
@@ -281,17 +281,17 @@ class CFX_RenderDevice {
const FX_RECT& GetClipBox() const { return m_ClipBox; }
FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode);
FX_BOOL SetClip_Rect(const FX_RECT* pRect);
FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState);
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,
@@ -364,7 +364,7 @@ class CFX_RenderDevice {
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,
@@ -380,7 +380,7 @@ class CFX_RenderDevice {
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 = 0,
@@ -391,8 +391,8 @@ class CFX_RenderDevice {
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_DWORD stroke_color,
@@ -495,17 +495,17 @@ class IFX_RenderDeviceDriver {
virtual void RestoreState(FX_BOOL bKeepSaved = FALSE) = 0;
virtual FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode) = 0;
virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState) {
return FALSE;
}
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,
@@ -576,7 +576,7 @@ class 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,
@@ -593,7 +593,7 @@ class 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,
@@ -637,17 +637,17 @@ class CFX_PSRenderer {
void RestoreState(FX_BOOL bKeepSaved = FALSE);
void SetClip_PathFill(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int fill_mode);
void SetClip_PathStroke(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CFX_GraphStateData* pGraphState);
FX_RECT GetClipBox() { return m_ClipBox; }
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,
@@ -674,7 +674,7 @@ class CFX_PSRenderer {
FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap,
FX_DWORD color,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_DWORD flags,
int alpha_flag = 0,
void* pIccTransform = NULL);
@@ -683,7 +683,7 @@ class CFX_PSRenderer {
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,
@@ -712,7 +712,7 @@ class CFX_PSRenderer {
FX_BOOL m_bInited;
void OutputPath(const CFX_PathData* pPathData,
- const CFX_AffineMatrix* pObject2Device);
+ const CFX_Matrix* pObject2Device);
void SetGraphState(const CFX_GraphStateData* pGraphState);
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 36dbb97a6c..4df841fb75 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -9,7 +9,7 @@
#include "core/include/fpdfapi/fpdf_serial.h"
#include "core/src/fpdfapi/fpdf_page/pageint.h"
-CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& ar, CFX_AffineMatrix& matrix) {
+CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& ar, CFX_Matrix& matrix) {
ar << matrix.a << " " << matrix.b << " " << matrix.c << " " << matrix.d << " "
<< matrix.e << " " << matrix.f;
return ar;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index d4c71085a1..1434c9d336 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -1343,12 +1343,12 @@ void CPDF_CIDFont::GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level) {
FX_WORD CID = CIDFromCharCode(charcode);
const uint8_t* pTransform = GetCIDTransform(CID);
if (pTransform && !bVert) {
- CFX_AffineMatrix matrix(CIDTransformToFloat(pTransform[0]),
- CIDTransformToFloat(pTransform[1]),
- CIDTransformToFloat(pTransform[2]),
- CIDTransformToFloat(pTransform[3]),
- CIDTransformToFloat(pTransform[4]) * 1000,
- CIDTransformToFloat(pTransform[5]) * 1000);
+ CFX_Matrix matrix(CIDTransformToFloat(pTransform[0]),
+ CIDTransformToFloat(pTransform[1]),
+ CIDTransformToFloat(pTransform[2]),
+ CIDTransformToFloat(pTransform[3]),
+ CIDTransformToFloat(pTransform[4]) * 1000,
+ CIDTransformToFloat(pTransform[5]) * 1000);
CFX_FloatRect rect_f(rect);
rect_f.Transform(&matrix);
rect = rect_f.GetOutterRect();
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 3777cd078c..45b796ce86 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -65,21 +65,21 @@ void CPDF_PageObject::RecalcBBox() {
break;
}
}
-void CPDF_PageObject::TransformClipPath(CFX_AffineMatrix& matrix) {
+void CPDF_PageObject::TransformClipPath(CFX_Matrix& matrix) {
if (m_ClipPath.IsNull()) {
return;
}
m_ClipPath.GetModify();
m_ClipPath.Transform(matrix);
}
-void CPDF_PageObject::TransformGeneralState(CFX_AffineMatrix& matrix) {
+void CPDF_PageObject::TransformGeneralState(CFX_Matrix& matrix) {
if (m_GeneralState.IsNull()) {
return;
}
CPDF_GeneralStateData* pGS = m_GeneralState.GetModify();
pGS->m_Matrix.Concat(matrix);
}
-FX_RECT CPDF_PageObject::GetBBox(const CFX_AffineMatrix* pMatrix) const {
+FX_RECT CPDF_PageObject::GetBBox(const CFX_Matrix* pMatrix) const {
CFX_FloatRect rect(m_Left, m_Bottom, m_Right, m_Top);
if (pMatrix) {
pMatrix->TransformRect(rect);
@@ -209,7 +209,7 @@ void CPDF_TextObject::CopyData(const CPDF_PageObject* pSrc) {
m_PosY = pSrcObj->m_PosY;
}
-void CPDF_TextObject::GetTextMatrix(CFX_AffineMatrix* pMatrix) const {
+void CPDF_TextObject::GetTextMatrix(CFX_Matrix* pMatrix) const {
FX_FLOAT* pTextMatrix = m_TextState.GetMatrix();
pMatrix->Set(pTextMatrix[0], pTextMatrix[2], pTextMatrix[1], pTextMatrix[3],
m_PosX, m_PosY);
@@ -509,7 +509,7 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX,
min_y = min_y * fontsize / 1000;
max_y = max_y * fontsize / 1000;
}
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
GetTextMatrix(&matrix);
m_Left = min_x;
m_Right = max_x;
@@ -553,9 +553,9 @@ void CPDF_TextObject::CalcCharPos(FX_FLOAT* pPosArray) const {
}
}
-void CPDF_TextObject::Transform(const CFX_AffineMatrix& matrix) {
+void CPDF_TextObject::Transform(const CFX_Matrix& matrix) {
m_TextState.GetModify();
- CFX_AffineMatrix text_matrix;
+ CFX_Matrix text_matrix;
GetTextMatrix(&text_matrix);
text_matrix.Concat(matrix);
FX_FLOAT* pTextMatrix = m_TextState.GetMatrix();
@@ -623,7 +623,7 @@ void CPDF_ShadingObject::CopyData(const CPDF_PageObject* pSrc) {
}
m_Matrix = pSrcObj->m_Matrix;
}
-void CPDF_ShadingObject::Transform(const CFX_AffineMatrix& matrix) {
+void CPDF_ShadingObject::Transform(const CFX_Matrix& matrix) {
if (!m_ClipPath.IsNull()) {
m_ClipPath.GetModify();
m_ClipPath.Transform(matrix);
@@ -648,7 +648,7 @@ void CPDF_ShadingObject::CalcBoundingBox() {
CPDF_FormObject::~CPDF_FormObject() {
delete m_pForm;
}
-void CPDF_FormObject::Transform(const CFX_AffineMatrix& matrix) {
+void CPDF_FormObject::Transform(const CFX_Matrix& matrix) {
m_FormMatrix.Concat(matrix);
CalcBoundingBox();
}
@@ -725,7 +725,7 @@ CPDF_PageObject* CPDF_PageObjects::GetObjectByIndex(int index) const {
}
return (CPDF_PageObject*)m_ObjectList.GetAt(pos);
}
-void CPDF_PageObjects::Transform(const CFX_AffineMatrix& matrix) {
+void CPDF_PageObjects::Transform(const CFX_Matrix& matrix) {
FX_POSITION pos = m_ObjectList.GetHeadPosition();
while (pos) {
CPDF_PageObject* pObj = (CPDF_PageObject*)m_ObjectList.GetNext(pos);
@@ -923,7 +923,7 @@ CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
}
CPDF_Form::~CPDF_Form() {}
void CPDF_Form::StartParse(CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level) {
@@ -936,7 +936,7 @@ void CPDF_Form::StartParse(CPDF_AllStates* pGraphicStates,
m_ParseState = CONTENT_PARSING;
}
void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level) {
@@ -953,7 +953,7 @@ CPDF_Form* CPDF_Form::Clone() const {
}
return pClone;
}
-void CPDF_Page::GetDisplayMatrix(CFX_AffineMatrix& matrix,
+void CPDF_Page::GetDisplayMatrix(CFX_Matrix& matrix,
int xPos,
int yPos,
int xSize,
@@ -962,7 +962,7 @@ void CPDF_Page::GetDisplayMatrix(CFX_AffineMatrix& matrix,
if (m_PageWidth == 0 || m_PageHeight == 0) {
return;
}
- CFX_AffineMatrix display_matrix;
+ CFX_Matrix display_matrix;
int x0, y0, x1, y1, x2, y2;
iRotate %= 4;
switch (iRotate) {
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 3ae04d7111..44d1dc47b6 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -91,7 +91,7 @@ CPDF_ColorSpace* CPDF_Document::LoadColorSpace(CPDF_Object* pCSObj,
}
CPDF_Pattern* CPDF_Document::LoadPattern(CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* matrix) {
+ const CFX_Matrix* matrix) {
return GetValidatePageData()->GetPattern(pPatternObj, bShading, matrix);
}
CPDF_IccProfile* CPDF_Document::LoadIccProfile(CPDF_Stream* pStream) {
@@ -404,7 +404,7 @@ void CPDF_DocPageData::ReleaseColorSpace(CPDF_Object* pColorSpace) {
CPDF_Pattern* CPDF_DocPageData::GetPattern(CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* matrix) {
+ const CFX_Matrix* matrix) {
if (!pPatternObj)
return nullptr;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 5c43b44e76..3852a4852a 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -190,7 +190,7 @@ void CPDF_ClipPath::AppendTexts(CPDF_TextObject** pTexts, int count) {
pData->m_pTextList[pData->m_TextCount + count] = NULL;
pData->m_TextCount += count + 1;
}
-void CPDF_ClipPath::Transform(const CPDF_Matrix& matrix) {
+void CPDF_ClipPath::Transform(const CFX_Matrix& matrix) {
CPDF_ClipPathData* pData = GetModify();
int i;
for (i = 0; i < pData->m_PathCount; i++) {
@@ -529,7 +529,7 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,
if (ToDictionary(pObject)) {
pGeneralState->m_pSoftMask = pObject;
FXSYS_memcpy(pGeneralState->m_SMaskMatrix,
- &pParser->GetCurStates()->m_CTM, sizeof(CPDF_Matrix));
+ &pParser->GetCurStates()->m_CTM, sizeof(CFX_Matrix));
} else {
pGeneralState->m_pSoftMask = NULL;
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
index 9c16173a6f..775bd91d16 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
@@ -32,7 +32,7 @@ void CPDF_ImageObject::CopyData(const CPDF_PageObject* pSrc) {
m_pImage = pSrcObj->m_pImage->Clone();
m_Matrix = pSrcObj->m_Matrix;
}
-void CPDF_ImageObject::Transform(const CFX_AffineMatrix& matrix) {
+void CPDF_ImageObject::Transform(const CFX_Matrix& matrix) {
m_Matrix.Concat(matrix);
CalcBoundingBox();
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index a2d4988f92..21fddead33 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -19,7 +19,7 @@ CPDF_StreamContentParser::CPDF_StreamContentParser(
CPDF_Document* pDocument,
CPDF_Dictionary* pPageResources,
CPDF_Dictionary* pParentResources,
- CFX_AffineMatrix* pmtContentToUser,
+ CFX_Matrix* pmtContentToUser,
CPDF_PageObjects* pObjList,
CPDF_Dictionary* pResources,
CPDF_Rect* pBBox,
@@ -620,7 +620,7 @@ void CPDF_StreamContentParser::Handle_ConcatMatrix() {
FX_FLOAT a2 = GetNumber16(5), b2 = GetNumber16(4), c2 = GetNumber16(3),
d2 = GetNumber16(2);
FX_FLOAT e2 = GetNumber(1), f2 = GetNumber(0);
- CFX_AffineMatrix new_matrix(a2, b2, c2, d2, e2, f2);
+ CFX_Matrix new_matrix(a2, b2, c2, d2, e2, f2);
new_matrix.Concat(m_pCurStates->m_CTM);
m_pCurStates->m_CTM = new_matrix;
OnChangeTextMatrix();
@@ -721,8 +721,7 @@ void CPDF_StreamContentParser::AddForm(CPDF_Stream* pStream) {
if (!m_Options.m_bSeparateForm) {
CPDF_Dictionary* pResources =
pStream->GetDict()->GetDict(FX_BSTRC("Resources"));
- CFX_AffineMatrix form_matrix =
- pStream->GetDict()->GetMatrix(FX_BSTRC("Matrix"));
+ CFX_Matrix form_matrix = pStream->GetDict()->GetMatrix(FX_BSTRC("Matrix"));
form_matrix.Concat(m_pCurStates->m_CTM);
CPDF_Array* pBBox = pStream->GetDict()->GetArray(FX_BSTRC("BBox"));
CFX_FloatRect form_bbox;
@@ -777,7 +776,7 @@ CPDF_ImageObject* CPDF_StreamContentParser::AddImage(CPDF_Stream* pStream,
if (pStream == NULL && pImage == NULL) {
return NULL;
}
- CFX_AffineMatrix ImageMatrix;
+ CFX_Matrix ImageMatrix;
ImageMatrix.Copy(m_pCurStates->m_CTM);
ImageMatrix.Concat(m_mtContentToUser);
CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
@@ -1093,7 +1092,7 @@ void CPDF_StreamContentParser::Handle_SetColorPS_Stroke() {
}
CFX_FloatRect GetShadingBBox(CPDF_Stream* pStream,
ShadingType type,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
CPDF_Function** pFuncs,
int nFuncs,
CPDF_ColorSpace* pCS);
@@ -1387,8 +1386,8 @@ void CPDF_StreamContentParser::Handle_SetTextMatrix() {
m_pCurStates->m_TextLineY = 0;
}
void CPDF_StreamContentParser::OnChangeTextMatrix() {
- CFX_AffineMatrix text_matrix(m_pCurStates->m_TextHorzScale, 0.0f, 0.0f, 1.0f,
- 0.0f, 0.0f);
+ CFX_Matrix text_matrix(m_pCurStates->m_TextHorzScale, 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f);
text_matrix.Concat(m_pCurStates->m_TextMatrix);
text_matrix.Concat(m_pCurStates->m_CTM);
text_matrix.Concat(m_mtContentToUser);
@@ -1511,7 +1510,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke) {
pPathData->SetPointCount(PathPointCount);
FXSYS_memcpy(pPathData->GetPoints(), m_pPathPoints,
sizeof(FX_PATHPOINT) * PathPointCount);
- CFX_AffineMatrix matrix = m_pCurStates->m_CTM;
+ CFX_Matrix matrix = m_pCurStates->m_CTM;
matrix.Concat(m_mtContentToUser);
if (bStroke || FillType) {
CPDF_PathObject* pPathObj = new CPDF_PathObject;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index a1aa686248..d862225ec6 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -962,15 +962,14 @@ void CPDF_ContentParser::Start(CPDF_Page* pPage, CPDF_ParseOptions* pOptions) {
}
void CPDF_ContentParser::Start(CPDF_Form* pForm,
CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level) {
m_pType3Char = pType3Char;
m_pObjects = pForm;
m_bForm = TRUE;
- CFX_AffineMatrix form_matrix =
- pForm->m_pFormDict->GetMatrix(FX_BSTRC("Matrix"));
+ CFX_Matrix form_matrix = pForm->m_pFormDict->GetMatrix(FX_BSTRC("Matrix"));
if (pGraphicStates) {
form_matrix.Concat(pGraphicStates->m_CTM);
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
index 0880388541..a768434647 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
@@ -17,7 +17,7 @@ void CPDF_PathObject::CopyData(const CPDF_PageObject* pSrc) {
m_bStroke = pSrcObj->m_bStroke;
m_Matrix = pSrcObj->m_Matrix;
}
-void CPDF_PathObject::Transform(const CPDF_Matrix& matrix) {
+void CPDF_PathObject::Transform(const CFX_Matrix& matrix) {
m_Matrix.Concat(matrix);
CalcBoundingBox();
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index 0c6b476db2..77e375bcc0 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -26,7 +26,7 @@ ShadingType ToShadingType(int type) {
} // namespace
-CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix)
+CPDF_Pattern::CPDF_Pattern(const CFX_Matrix* pParentMatrix)
: m_pPatternObj(NULL),
m_PatternType(PATTERN_TILING),
m_pDocument(NULL),
@@ -38,7 +38,7 @@ CPDF_Pattern::CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix)
CPDF_Pattern::~CPDF_Pattern() {}
CPDF_TilingPattern::CPDF_TilingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
- const CFX_AffineMatrix* parentMatrix)
+ const CFX_Matrix* parentMatrix)
: CPDF_Pattern(parentMatrix) {
m_PatternType = PATTERN_TILING;
m_pPatternObj = pPatternObj;
@@ -80,7 +80,7 @@ FX_BOOL CPDF_TilingPattern::Load() {
CPDF_ShadingPattern::CPDF_ShadingPattern(CPDF_Document* pDoc,
CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* parentMatrix)
+ const CFX_Matrix* parentMatrix)
: CPDF_Pattern(parentMatrix) {
m_PatternType = PATTERN_SHADING;
m_pPatternObj = bShading ? NULL : pPatternObj;
@@ -253,7 +253,7 @@ void CPDF_MeshStream::GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b) {
}
}
FX_DWORD CPDF_MeshStream::GetVertex(CPDF_MeshVertex& vertex,
- CFX_AffineMatrix* pObject2Bitmap) {
+ CFX_Matrix* pObject2Bitmap) {
FX_DWORD flag = GetFlag();
GetCoords(vertex.x, vertex.y);
pObject2Bitmap->Transform(vertex.x, vertex.y);
@@ -263,7 +263,7 @@ FX_DWORD CPDF_MeshStream::GetVertex(CPDF_MeshVertex& vertex,
}
FX_BOOL CPDF_MeshStream::GetVertexRow(CPDF_MeshVertex* vertex,
int count,
- CFX_AffineMatrix* pObject2Bitmap) {
+ CFX_Matrix* pObject2Bitmap) {
for (int i = 0; i < count; i++) {
if (m_BitStream.IsEOF()) {
return FALSE;
@@ -278,7 +278,7 @@ FX_BOOL CPDF_MeshStream::GetVertexRow(CPDF_MeshVertex* vertex,
CFX_FloatRect GetShadingBBox(CPDF_Stream* pStream,
ShadingType type,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
CPDF_Function** pFuncs,
int nFuncs,
CPDF_ColorSpace* pCS) {
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 84c8366780..d5a035fe2b 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -167,7 +167,7 @@ class CPDF_StreamContentParser {
CPDF_StreamContentParser(CPDF_Document* pDoc,
CPDF_Dictionary* pPageResources,
CPDF_Dictionary* pParentResources,
- CFX_AffineMatrix* pmtContentToUser,
+ CFX_Matrix* pmtContentToUser,
CPDF_PageObjects* pObjList,
CPDF_Dictionary* pResources,
CFX_FloatRect* pBBox,
@@ -312,7 +312,7 @@ class CPDF_StreamContentParser {
CPDF_Dictionary* m_pResources;
CPDF_PageObjects* m_pObjectList;
int m_Level;
- CFX_AffineMatrix m_mtContentToUser;
+ CFX_Matrix m_mtContentToUser;
CFX_FloatRect m_BBox;
CPDF_ParseOptions m_Options;
_ContentParam m_ParamBuf1[PARAM_BUF_SIZE];
@@ -357,7 +357,7 @@ class CPDF_ContentParser {
void Start(CPDF_Page* pPage, CPDF_ParseOptions* pOptions);
void Start(CPDF_Form* pForm,
CPDF_AllStates* pGraphicStates,
- CFX_AffineMatrix* pParentMatrix,
+ CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
CPDF_ParseOptions* pOptions,
int level);
@@ -386,7 +386,7 @@ class CPDF_AllStates : public CPDF_GraphicStates {
void Copy(const CPDF_AllStates& src);
void ProcessExtGS(CPDF_Dictionary* pGS, CPDF_StreamContentParser* pParser);
void SetLineDash(CPDF_Array*, FX_FLOAT, FX_FLOAT scale);
- CFX_AffineMatrix m_TextMatrix, m_CTM, m_ParentMatrix;
+ CFX_Matrix m_TextMatrix, m_CTM, m_ParentMatrix;
FX_FLOAT m_TextX, m_TextY, m_TextLineX, m_TextLineY;
FX_FLOAT m_TextLeading, m_TextRise, m_TextHorzScale;
};
@@ -407,7 +407,7 @@ class CPDF_DocPageData {
void ReleaseColorSpace(CPDF_Object* pColorSpace);
CPDF_Pattern* GetPattern(CPDF_Object* pPatternObj,
FX_BOOL bShading,
- const CFX_AffineMatrix* matrix);
+ const CFX_Matrix* matrix);
void ReleasePattern(CPDF_Object* pPatternObj);
CPDF_Image* GetImage(CPDF_Object* pImageStream);
void ReleaseImage(CPDF_Object* pImageStream);
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 752a09d83d..f91ddfa5dc 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -440,8 +440,8 @@ CFX_FloatRect CPDF_Array::GetRect() {
rect.top = GetNumber(3);
return rect;
}
-CFX_AffineMatrix CPDF_Array::GetMatrix() {
- CFX_AffineMatrix matrix;
+CFX_Matrix CPDF_Array::GetMatrix() {
+ CFX_Matrix matrix;
if (!IsArray() || m_Objects.GetSize() != 6)
return matrix;
@@ -702,8 +702,8 @@ CFX_FloatRect CPDF_Dictionary::GetRect(const CFX_ByteStringC& key) const {
rect = pArray->GetRect();
return rect;
}
-CFX_AffineMatrix CPDF_Dictionary::GetMatrix(const CFX_ByteStringC& key) const {
- CFX_AffineMatrix matrix;
+CFX_Matrix CPDF_Dictionary::GetMatrix(const CFX_ByteStringC& key) const {
+ CFX_Matrix matrix;
CPDF_Array* pArray = GetArray(key);
if (pArray)
matrix = pArray->GetMatrix();
@@ -814,7 +814,7 @@ void CPDF_Dictionary::SetAtRect(const CFX_ByteStringC& key,
SetAt(key, pArray);
}
void CPDF_Dictionary::SetAtMatrix(const CFX_ByteStringC& key,
- const CFX_AffineMatrix& matrix) {
+ const CFX_Matrix& matrix) {
CPDF_Array* pArray = new CPDF_Array;
pArray->AddNumber16(matrix.a);
pArray->AddNumber16(matrix.b);
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index a2638fe7e1..faf6afe7f6 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -181,7 +181,7 @@ CPDF_RenderStatus::~CPDF_RenderStatus() {
FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pDeviceMatrix,
+ const CFX_Matrix* pDeviceMatrix,
const CPDF_PageObject* pStopObj,
const CPDF_RenderStatus* pParentState,
const CPDF_GraphicStates* pInitialStates,
@@ -241,9 +241,9 @@ FX_BOOL CPDF_RenderStatus::Initialize(CPDF_RenderContext* pContext,
return TRUE;
}
void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
CFX_FloatRect clip_rect = m_pDevice->GetClipBox();
- CFX_AffineMatrix device2object;
+ CFX_Matrix device2object;
device2object.SetReverse(*pObj2Device);
device2object.TransformRect(clip_rect);
int index = 0;
@@ -270,9 +270,8 @@ void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjects* pObjs,
}
}
}
-void CPDF_RenderStatus::RenderSingleObject(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device) {
+void CPDF_RenderStatus::RenderSingleObject(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device) {
CFX_AutoRestorer<int> restorer(&s_CurrentRecursionDepth);
if (++s_CurrentRecursionDepth > kRenderMaxRecursionDepth) {
return;
@@ -290,10 +289,9 @@ void CPDF_RenderStatus::RenderSingleObject(
ProcessObjectNoClip(pObj, pObj2Device);
}
-FX_BOOL CPDF_RenderStatus::ContinueSingleObject(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
- IFX_Pause* pPause) {
+FX_BOOL CPDF_RenderStatus::ContinueSingleObject(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device,
+ IFX_Pause* pPause) {
if (m_pObjectRenderer) {
if (m_pObjectRenderer->Continue(pPause))
return TRUE;
@@ -335,11 +333,10 @@ IPDF_ObjectRenderer* IPDF_ObjectRenderer::Create(int type) {
}
return new CPDF_ImageRenderer;
}
-FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
- FX_BOOL bLogical,
- FX_RECT& rect) const {
+FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device,
+ FX_BOOL bLogical,
+ FX_RECT& rect) const {
rect = pObj->GetBBox(pObj2Device);
FX_RECT rtClip = m_pDevice->GetClipBox();
if (!bLogical) {
@@ -359,7 +356,7 @@ FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(
return rect.IsEmpty();
}
void CPDF_RenderStatus::DitherObjectArea(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
CFX_DIBitmap* pBitmap = m_pDevice->GetBitmap();
if (pBitmap == NULL) {
return;
@@ -380,9 +377,8 @@ void CPDF_RenderStatus::DitherObjectArea(const CPDF_PageObject* pObj,
pBitmap->DitherFS(pal, 16, &rect);
}
}
-void CPDF_RenderStatus::ProcessObjectNoClip(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device) {
+void CPDF_RenderStatus::ProcessObjectNoClip(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device) {
FX_BOOL bRet = FALSE;
switch (pObj->m_Type) {
case PDFPAGE_TEXT:
@@ -405,9 +401,8 @@ void CPDF_RenderStatus::ProcessObjectNoClip(
DrawObjWithBackground(pObj, pObj2Device);
}
}
-FX_BOOL CPDF_RenderStatus::DrawObjWithBlend(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device) {
+FX_BOOL CPDF_RenderStatus::DrawObjWithBlend(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device) {
FX_BOOL bRet = FALSE;
switch (pObj->m_Type) {
case PDFPAGE_PATH:
@@ -427,9 +422,8 @@ void CPDF_RenderStatus::GetScaledMatrix(CFX_Matrix& matrix) const {
matrix.a *= FXSYS_fabs(dCTM.a);
matrix.d *= FXSYS_fabs(dCTM.d);
}
-void CPDF_RenderStatus::DrawObjWithBackground(
- const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device) {
+void CPDF_RenderStatus::DrawObjWithBackground(const CPDF_PageObject* pObj,
+ const CFX_Matrix* pObj2Device) {
FX_RECT rect;
if (GetObjectClippedRect(pObj, pObj2Device, FALSE, rect)) {
return;
@@ -443,7 +437,7 @@ void CPDF_RenderStatus::DrawObjWithBackground(
if (!buffer.Initialize(m_pContext, m_pDevice, &rect, pObj, &m_Options, res)) {
return;
}
- CFX_AffineMatrix matrix = *pObj2Device;
+ CFX_Matrix matrix = *pObj2Device;
matrix.Concat(*buffer.GetMatrix());
GetScaledMatrix(matrix);
CPDF_Dictionary* pFormResource = NULL;
@@ -462,14 +456,14 @@ void CPDF_RenderStatus::DrawObjWithBackground(
buffer.OutputToDevice();
}
FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
CPDF_Dictionary* pOC =
pFormObj->m_pForm->m_pFormDict->GetDict(FX_BSTRC("OC"));
if (pOC && m_Options.m_pOCContext &&
!m_Options.m_pOCContext->CheckOCGVisible(pOC)) {
return TRUE;
}
- CFX_AffineMatrix matrix = pFormObj->m_FormMatrix;
+ CFX_Matrix matrix = pFormObj->m_FormMatrix;
matrix.Concat(*pObj2Device);
CPDF_Dictionary* pResources = NULL;
if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
@@ -486,7 +480,7 @@ FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj,
m_pDevice->RestoreState();
return TRUE;
}
-FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix) {
+FX_BOOL IsAvailableMatrix(const CFX_Matrix& matrix) {
if (matrix.a == 0 || matrix.d == 0) {
return matrix.b != 0 && matrix.c != 0;
}
@@ -496,7 +490,7 @@ FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix) {
return TRUE;
}
FX_BOOL CPDF_RenderStatus::ProcessPath(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
int FillType = pPathObj->m_FillType;
FX_BOOL bStroke = pPathObj->m_bStroke;
ProcessPathPattern(pPathObj, pObj2Device, FillType, bStroke);
@@ -511,7 +505,7 @@ FX_BOOL CPDF_RenderStatus::ProcessPath(CPDF_PathObject* pPathObj,
if (bStroke) {
stroke_argb = GetStrokeArgb(pPathObj);
}
- CFX_AffineMatrix path_matrix = pPathObj->m_Matrix;
+ CFX_Matrix path_matrix = pPathObj->m_Matrix;
path_matrix.Concat(*pObj2Device);
if (!IsAvailableMatrix(path_matrix)) {
return TRUE;
@@ -623,7 +617,7 @@ FX_ARGB CPDF_RenderStatus::GetStrokeArgb(const CPDF_PageObject* pObj) const {
return m_Options.TranslateColor(ArgbEncode(alpha, rgb));
}
void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
if (ClipPath.IsNull()) {
if (!m_LastClipPath.IsNull()) {
m_pDevice->RestoreState(TRUE);
@@ -683,7 +677,7 @@ void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath,
}
void CPDF_RenderStatus::DrawClipPath(CPDF_ClipPath ClipPath,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
if (ClipPath.IsNull()) {
return;
}
@@ -707,9 +701,9 @@ void CPDF_RenderStatus::DrawClipPath(CPDF_ClipPath ClipPath,
}
}
FX_BOOL CPDF_RenderStatus::SelectClipPath(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke) {
- CFX_AffineMatrix path_matrix = pPathObj->m_Matrix;
+ CFX_Matrix path_matrix = pPathObj->m_Matrix;
path_matrix.Concat(*pObj2Device);
if (bStroke) {
CFX_GraphStateData graphState(*pPathObj->m_GraphState);
@@ -725,9 +719,8 @@ FX_BOOL CPDF_RenderStatus::SelectClipPath(CPDF_PathObject* pPathObj,
}
return m_pDevice->SetClip_PathFill(pPathObj->m_Path, &path_matrix, fill_mode);
}
-FX_BOOL CPDF_RenderStatus::ProcessTransparency(
- const CPDF_PageObject* pPageObj,
- const CFX_AffineMatrix* pObj2Device) {
+FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
+ const CFX_Matrix* pObj2Device) {
const CPDF_GeneralStateData* pGeneralState = pPageObj->m_GeneralState;
int blend_type =
pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL;
@@ -838,7 +831,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(
CFX_DIBitmap* bitmap = bitmap_device.GetBitmap();
bitmap->Clear(0);
- CFX_AffineMatrix new_matrix = *pObj2Device;
+ CFX_Matrix new_matrix = *pObj2Device;
new_matrix.TranslateI(-rect.left, -rect.top);
new_matrix.Scale(scaleX, scaleY);
nonstd::unique_ptr<CFX_DIBitmap> pTextMask;
@@ -855,7 +848,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(
if (textobj == NULL) {
break;
}
- CFX_AffineMatrix text_matrix;
+ CFX_Matrix text_matrix;
textobj->GetTextMatrix(&text_matrix);
CPDF_TextRenderer::DrawTextPath(
&text_device, textobj->m_nChars, textobj->m_pCharCodes,
@@ -871,7 +864,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(
bitmap_render.ProcessObjectNoClip(pPageObj, &new_matrix);
m_bStopped = bitmap_render.m_bStopped;
if (pSMaskDict) {
- CFX_AffineMatrix smask_matrix;
+ CFX_Matrix smask_matrix;
FXSYS_memcpy(&smask_matrix, pGeneralState->m_SMaskMatrix,
sizeof smask_matrix);
smask_matrix.Concat(*pObj2Device);
@@ -930,7 +923,7 @@ CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj,
return pBackdrop.release();
}
- CFX_AffineMatrix FinalMatrix = m_DeviceMatrix;
+ CFX_Matrix FinalMatrix = m_DeviceMatrix;
FinalMatrix.TranslateI(-left, -top);
FinalMatrix.Scale(scaleX, scaleY);
pBackdrop->Clear(pBackdrop->HasAlpha() ? 0 : 0xffffffff);
@@ -943,7 +936,7 @@ CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj,
void CPDF_RenderContext::GetBackground(CFX_DIBitmap* pBuffer,
const CPDF_PageObject* pObj,
const CPDF_RenderOptions* pOptions,
- CFX_AffineMatrix* pFinalMatrix) {
+ CFX_Matrix* pFinalMatrix) {
CFX_FxgeDevice device;
device.Attach(pBuffer);
@@ -994,9 +987,8 @@ void CPDF_RenderContext::Clear() {
m_bFirstLayer = TRUE;
m_ContentList.RemoveAll();
}
-void CPDF_RenderContext::AppendObjectList(
- CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObject2Device) {
+void CPDF_RenderContext::AppendObjectList(CPDF_PageObjects* pObjs,
+ const CFX_Matrix* pObject2Device) {
_PDF_RenderItem* pItem = m_ContentList.AddSpace();
pItem->m_pObjectList = pObjs;
if (pObject2Device) {
@@ -1007,19 +999,19 @@ void CPDF_RenderContext::AppendObjectList(
}
void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
const CPDF_RenderOptions* pOptions,
- const CFX_AffineMatrix* pLastMatrix) {
+ const CFX_Matrix* pLastMatrix) {
Render(pDevice, NULL, pOptions, pLastMatrix);
}
void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
const CPDF_PageObject* pStopObj,
const CPDF_RenderOptions* pOptions,
- const CFX_AffineMatrix* pLastMatrix) {
+ const CFX_Matrix* pLastMatrix) {
int count = m_ContentList.GetSize();
for (int j = 0; j < count; j++) {
pDevice->SaveState();
_PDF_RenderItem* pItem = m_ContentList.GetDataPtr(j);
if (pLastMatrix) {
- CFX_AffineMatrix FinalMatrix = pItem->m_Matrix;
+ CFX_Matrix FinalMatrix = pItem->m_Matrix;
FinalMatrix.Concat(*pLastMatrix);
CPDF_RenderStatus status;
status.Initialize(this, pDevice, pLastMatrix, pStopObj, NULL, NULL,
@@ -1051,7 +1043,7 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice,
}
void CPDF_RenderContext::DrawObjectList(CFX_RenderDevice* pDevice,
CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
const CPDF_RenderOptions* pOptions) {
AppendObjectList(pObjs, pObject2Device);
Render(pDevice, pOptions);
@@ -1130,7 +1122,7 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) {
pItem->m_pObjectList->m_Transparency, FALSE, NULL);
m_pDevice->SaveState();
m_ClipRect = m_pDevice->GetClipBox();
- CFX_AffineMatrix device2object;
+ CFX_Matrix device2object;
device2object.SetReverse(pItem->m_Matrix);
device2object.TransformRect(m_ClipRect);
}
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 71e847a160..81efc956a2 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -15,7 +15,7 @@
#include "core/src/fpdfapi/fpdf_page/pageint.h"
FX_BOOL CPDF_RenderStatus::ProcessImage(CPDF_ImageObject* pImageObj,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
CPDF_ImageRenderer render;
if (render.Start(this, pImageObj, pObj2Device, m_bStdCS, m_curBlend)) {
render.Continue(NULL);
@@ -471,7 +471,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
}
FX_BOOL CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStdCS,
int blendType) {
m_pRenderStatus = pStatus;
@@ -495,7 +495,7 @@ FX_BOOL CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
const CFX_DIBSource* pDIBSource,
FX_ARGB bitmap_argb,
int bitmap_alpha,
- const CFX_AffineMatrix* pImage2Device,
+ const CFX_Matrix* pImage2Device,
FX_DWORD flags,
FX_BOOL bStdCS,
int blendType) {
@@ -520,7 +520,7 @@ FX_BOOL CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) {
if (rect.IsEmpty()) {
return FALSE;
}
- CFX_AffineMatrix new_matrix = m_ImageMatrix;
+ CFX_Matrix new_matrix = m_ImageMatrix;
new_matrix.TranslateI(-rect.left, -rect.top);
int width = rect.Width();
int height = rect.Height();
@@ -617,7 +617,7 @@ FX_BOOL CPDF_ImageRenderer::DrawMaskedImage() {
if (rect.IsEmpty()) {
return FALSE;
}
- CFX_AffineMatrix new_matrix = m_ImageMatrix;
+ CFX_Matrix new_matrix = m_ImageMatrix;
new_matrix.TranslateI(-rect.left, -rect.top);
int width = rect.Width();
int height = rect.Height();
@@ -901,7 +901,7 @@ ICodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(
int bpc,
const CPDF_Dictionary* pParams);
FX_BOOL CPDF_QuickStretcher::Start(CPDF_ImageObject* pImageObj,
- CFX_AffineMatrix* pImage2Device,
+ CFX_Matrix* pImage2Device,
const FX_RECT* pClipBox) {
if (FXSYS_fabs(pImage2Device->a) < FXSYS_fabs(pImage2Device->b) * 10 &&
FXSYS_fabs(pImage2Device->d) < FXSYS_fabs(pImage2Device->c) * 10) {
@@ -1042,7 +1042,7 @@ FX_BOOL CPDF_QuickStretcher::Continue(IFX_Pause* pPause) {
}
CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
FX_RECT* pClipRect,
- const CFX_AffineMatrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
if (pSMaskDict == NULL) {
return NULL;
}
@@ -1059,7 +1059,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (pFuncObj && (pFuncObj->IsDictionary() || pFuncObj->IsStream()))
pFunc.reset(CPDF_Function::Load(pFuncObj));
- CFX_AffineMatrix matrix = *pMatrix;
+ CFX_Matrix matrix = *pMatrix;
matrix.TranslateI(-pClipRect->left, -pClipRect->top);
CPDF_Form form(m_pContext->m_pDocument, m_pContext->m_pPageResources, pGroup);
form.ParseContent(NULL, NULL, NULL, NULL);
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 576c18ebbd..193c2ae05a 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -13,7 +13,7 @@
#define SHADING_STEPS 256
static void DrawAxialShading(CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
CPDF_Function** pFuncs,
int nFuncs,
@@ -46,7 +46,7 @@ static void DrawAxialShading(CFX_DIBitmap* pBitmap,
FX_FLOAT y_span = end_y - start_y;
FX_FLOAT axis_len_square =
FXSYS_Mul(x_span, x_span) + FXSYS_Mul(y_span, y_span);
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
matrix.SetReverse(*pObject2Bitmap);
int total_results = 0;
for (int j = 0; j < nFuncs; j++) {
@@ -104,7 +104,7 @@ static void DrawAxialShading(CFX_DIBitmap* pBitmap,
}
}
static void DrawRadialShading(CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
CPDF_Function** pFuncs,
int nFuncs,
@@ -121,7 +121,7 @@ static void DrawRadialShading(CFX_DIBitmap* pBitmap,
FX_FLOAT end_x = pCoords->GetNumber(3);
FX_FLOAT end_y = pCoords->GetNumber(4);
FX_FLOAT end_r = pCoords->GetNumber(5);
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
matrix.SetReverse(*pObject2Bitmap);
FX_FLOAT t_min = 0, t_max = 1.0f;
CPDF_Array* pArray = pDict->GetArray(FX_BSTRC("Domain"));
@@ -242,7 +242,7 @@ static void DrawRadialShading(CFX_DIBitmap* pBitmap,
}
}
static void DrawFuncShading(CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Dictionary* pDict,
CPDF_Function** pFuncs,
int nFuncs,
@@ -257,8 +257,8 @@ static void DrawFuncShading(CFX_DIBitmap* pBitmap,
ymin = pDomain->GetNumber(2);
ymax = pDomain->GetNumber(3);
}
- CFX_AffineMatrix mtDomain2Target = pDict->GetMatrix(FX_BSTRC("Matrix"));
- CFX_AffineMatrix matrix, reverse_matrix;
+ CFX_Matrix mtDomain2Target = pDict->GetMatrix(FX_BSTRC("Matrix"));
+ CFX_Matrix matrix, reverse_matrix;
matrix.SetReverse(*pObject2Bitmap);
reverse_matrix.SetReverse(mtDomain2Target);
matrix.Concat(reverse_matrix);
@@ -411,7 +411,7 @@ static void DrawGouraud(CFX_DIBitmap* pBitmap,
}
}
static void DrawFreeGouraudShading(CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
CPDF_Function** pFuncs,
int nFuncs,
@@ -445,7 +445,7 @@ static void DrawFreeGouraudShading(CFX_DIBitmap* pBitmap,
}
}
static void DrawLatticeGouraudShading(CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
CPDF_Function** pFuncs,
int nFuncs,
@@ -748,7 +748,7 @@ FX_BOOL _CheckCoonTensorPara(const CPDF_MeshStream& stream) {
static void DrawCoonPatchMeshes(FX_BOOL bTensor,
CFX_DIBitmap* pBitmap,
- CFX_AffineMatrix* pObject2Bitmap,
+ CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
CPDF_Function** pFuncs,
int nFuncs,
@@ -826,7 +826,7 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
}
}
void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_RECT& clip_rect,
int alpha,
FX_BOOL bAlphaMode) {
@@ -861,7 +861,7 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
}
CPDF_DeviceBuffer buffer;
buffer.Initialize(m_pContext, m_pDevice, &clip_rect, m_pCurObj, 150);
- CFX_AffineMatrix FinalMatrix = *pMatrix;
+ CFX_Matrix FinalMatrix = *pMatrix;
FinalMatrix.Concat(*buffer.GetMatrix());
CFX_DIBitmap* pBitmap = buffer.GetBitmap();
if (pBitmap->GetBuffer() == NULL) {
@@ -913,7 +913,7 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
}
void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
CPDF_PageObject* pPageObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke) {
if (!pattern->Load()) {
return;
@@ -935,7 +935,7 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
m_pDevice->RestoreState();
return;
}
- CFX_AffineMatrix matrix = pattern->m_Pattern2Form;
+ CFX_Matrix matrix = pattern->m_Pattern2Form;
matrix.Concat(*pObj2Device);
GetScaledMatrix(matrix);
int alpha = pPageObj->m_GeneralState.GetAlpha(bStroke);
@@ -944,14 +944,14 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
m_pDevice->RestoreState();
}
FX_BOOL CPDF_RenderStatus::ProcessShading(CPDF_ShadingObject* pShadingObj,
- const CFX_AffineMatrix* pObj2Device) {
+ const CFX_Matrix* pObj2Device) {
FX_RECT rect = pShadingObj->GetBBox(pObj2Device);
FX_RECT clip_box = m_pDevice->GetClipBox();
rect.Intersect(clip_box);
if (rect.IsEmpty()) {
return TRUE;
}
- CFX_AffineMatrix matrix = pShadingObj->m_Matrix;
+ CFX_Matrix matrix = pShadingObj->m_Matrix;
matrix.Concat(*pObj2Device);
DrawShading(pShadingObj->m_pShading, &matrix, rect,
pShadingObj->m_GeneralState.GetAlpha(FALSE),
@@ -961,7 +961,7 @@ FX_BOOL CPDF_RenderStatus::ProcessShading(CPDF_ShadingObject* pShadingObj,
static CFX_DIBitmap* DrawPatternBitmap(CPDF_Document* pDoc,
CPDF_PageRenderCache* pCache,
CPDF_TilingPattern* pPattern,
- const CFX_AffineMatrix* pObject2Device,
+ const CFX_Matrix* pObject2Device,
int width,
int height,
int flags) {
@@ -978,9 +978,9 @@ static CFX_DIBitmap* DrawPatternBitmap(CPDF_Document* pDoc,
pPattern->m_Pattern2Form.TransformRect(cell_bbox);
pObject2Device->TransformRect(cell_bbox);
CFX_FloatRect bitmap_rect(0.0f, 0.0f, (FX_FLOAT)width, (FX_FLOAT)height);
- CFX_AffineMatrix mtAdjust;
+ CFX_Matrix mtAdjust;
mtAdjust.MatchRect(bitmap_rect, cell_bbox);
- CFX_AffineMatrix mtPattern2Bitmap = *pObject2Device;
+ CFX_Matrix mtPattern2Bitmap = *pObject2Device;
mtPattern2Bitmap.Concat(mtAdjust);
CPDF_RenderOptions options;
if (!pPattern->m_bColored) {
@@ -996,7 +996,7 @@ static CFX_DIBitmap* DrawPatternBitmap(CPDF_Document* pDoc,
}
void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke) {
if (!pPattern->Load()) {
return;
@@ -1023,7 +1023,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
FX_FLOAT sd = FXSYS_fabs(dCTM.d);
clip_box.right = clip_box.left + (int32_t)FXSYS_ceil(clip_box.Width() * sa);
clip_box.bottom = clip_box.top + (int32_t)FXSYS_ceil(clip_box.Height() * sd);
- CFX_AffineMatrix mtPattern2Device = pPattern->m_Pattern2Form;
+ CFX_Matrix mtPattern2Device = pPattern->m_Pattern2Form;
mtPattern2Device.Concat(*pObj2Device);
GetScaledMatrix(mtPattern2Device);
FX_BOOL bAligned = FALSE;
@@ -1044,7 +1044,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
height = 1;
}
int min_col, max_col, min_row, max_row;
- CFX_AffineMatrix mtDevice2Pattern;
+ CFX_Matrix mtDevice2Pattern;
mtDevice2Pattern.SetReverse(mtPattern2Device);
CFX_FloatRect clip_box_p(clip_box);
clip_box_p.Transform(&mtDevice2Pattern);
@@ -1073,7 +1073,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
orig_x = col * pPattern->m_XStep;
orig_y = row * pPattern->m_YStep;
mtPattern2Device.Transform(orig_x, orig_y);
- CFX_AffineMatrix matrix = *pObj2Device;
+ CFX_Matrix matrix = *pObj2Device;
matrix.Translate(orig_x - mtPattern2Device.e,
orig_y - mtPattern2Device.f);
m_pDevice->SaveState();
@@ -1182,7 +1182,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
delete pPatternBitmap;
}
void CPDF_RenderStatus::DrawPathWithPattern(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
CPDF_Color* pColor,
FX_BOOL bStroke) {
CPDF_Pattern* pattern = pColor->GetPattern();
@@ -1198,7 +1198,7 @@ void CPDF_RenderStatus::DrawPathWithPattern(CPDF_PathObject* pPathObj,
}
}
void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
int& filltype,
FX_BOOL& bStroke) {
if (filltype) {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 8cfa8dc4fb..47876a2280 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -18,7 +18,7 @@ CPDF_Type3Cache::~CPDF_Type3Cache() {
m_SizeMap.clear();
}
CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(FX_DWORD charcode,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
_CPDF_UniqueKeyGen keygen;
@@ -126,7 +126,7 @@ static int _DetectFirstLastScan(const CFX_DIBitmap* pBitmap, FX_BOOL bFirst) {
}
CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize,
FX_DWORD charcode,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX,
FX_FLOAT retinaScaleY) {
const CPDF_Type3Char* pChar = m_pFont->LoadChar(charcode);
@@ -134,7 +134,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize,
return nullptr;
CFX_DIBitmap* pBitmap = pChar->m_pBitmap;
- CFX_AffineMatrix image_matrix, text_matrix;
+ CFX_Matrix image_matrix, text_matrix;
image_matrix = pChar->m_ImageMatrix;
text_matrix.Set(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d, 0, 0);
image_matrix.Concat(text_matrix);
@@ -194,7 +194,7 @@ void _CPDF_UniqueKeyGen::Generate(int count, ...) {
m_KeyLen = count * sizeof(FX_DWORD);
}
FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
CFX_PathData* pClippingPath) {
if (textobj->m_nChars == 0) {
return TRUE;
@@ -257,7 +257,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
fill_argb = GetFillArgb(textobj);
}
}
- CFX_AffineMatrix text_matrix;
+ CFX_Matrix text_matrix;
textobj->GetTextMatrix(&text_matrix);
if (IsAvailableMatrix(text_matrix) == FALSE) {
return TRUE;
@@ -269,12 +269,12 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
return TRUE;
}
if (bClip || bStroke) {
- const CFX_AffineMatrix* pDeviceMatrix = pObj2Device;
- CFX_AffineMatrix device_matrix;
+ const CFX_Matrix* pDeviceMatrix = pObj2Device;
+ CFX_Matrix device_matrix;
if (bStroke) {
const FX_FLOAT* pCTM = textobj->m_TextState.GetObject()->m_CTM;
if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) {
- CFX_AffineMatrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0);
+ CFX_Matrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0);
text_matrix.ConcatInverse(ctm);
device_matrix.Copy(ctm);
device_matrix.Concat(*pObj2Device);
@@ -354,9 +354,8 @@ class CPDF_RefType3Cache {
FX_DWORD m_dwCount;
CPDF_Type3Font* m_pType3Font;
};
-FX_BOOL CPDF_RenderStatus::ProcessType3Text(
- const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device) {
+FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
+ const CFX_Matrix* pObj2Device) {
CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->GetType3Font();
for (int j = 0; j < m_Type3FontCache.GetSize(); j++) {
if (m_Type3FontCache.GetAt(j) == pType3Font)
@@ -365,9 +364,9 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(
CFX_Matrix dCTM = m_pDevice->GetCTM();
FX_FLOAT sa = FXSYS_fabs(dCTM.a);
FX_FLOAT sd = FXSYS_fabs(dCTM.d);
- CFX_AffineMatrix text_matrix;
+ CFX_Matrix text_matrix;
textobj->GetTextMatrix(&text_matrix);
- CFX_AffineMatrix char_matrix = pType3Font->GetFontMatrix();
+ CFX_Matrix char_matrix = pType3Font->GetFontMatrix();
FX_FLOAT font_size = textobj->m_TextState.GetFontSize();
char_matrix.Scale(font_size, font_size);
FX_ARGB fill_argb = GetFillArgb(textobj, TRUE);
@@ -393,7 +392,7 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(
if (pType3Char == NULL) {
continue;
}
- CFX_AffineMatrix matrix = char_matrix;
+ CFX_Matrix matrix = char_matrix;
matrix.e += iChar ? textobj->m_pCharPos[iChar - 1] : 0;
matrix.Concat(text_matrix);
matrix.Concat(*pObj2Device);
@@ -474,7 +473,7 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(
origin_y - pBitmap->m_Top, fill_argb);
}
} else {
- CFX_AffineMatrix image_matrix = pType3Char->m_ImageMatrix;
+ CFX_Matrix image_matrix = pType3Char->m_ImageMatrix;
image_matrix.Concat(matrix);
CPDF_ImageRenderer renderer;
if (renderer.Start(this, pType3Char->m_pBitmap, fill_argb, 255,
@@ -597,8 +596,8 @@ FX_BOOL CPDF_TextRenderer::DrawTextPath(CFX_RenderDevice* pDevice,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
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_ARGB fill_argb,
FX_ARGB stroke_argb,
@@ -628,7 +627,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
FX_FLOAT origin_x = (FX_FLOAT)left;
FX_FLOAT origin_y =
(FX_FLOAT)top + font_size * (FX_FLOAT)font_bbox.top / 1000.0f;
- CFX_AffineMatrix matrix(1.0f, 0, 0, -1.0f, 0, 0);
+ CFX_Matrix matrix(1.0f, 0, 0, -1.0f, 0, 0);
DrawTextString(pDevice, origin_x, origin_y, pFont, font_size, &matrix, str,
argb);
}
@@ -637,7 +636,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
FX_FLOAT origin_y,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
const CFX_ByteString& str,
FX_ARGB fill_argb,
FX_ARGB stroke_argb,
@@ -667,7 +666,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
cur_pos += pFont->GetCharWidthF(pCharCodes[i]) * font_size / 1000;
}
}
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
if (pMatrix) {
matrix = *pMatrix;
}
@@ -692,7 +691,7 @@ FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice,
FX_FLOAT* pCharPos,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pText2Device,
+ const CFX_Matrix* pText2Device,
FX_ARGB fill_argb,
const CPDF_RenderOptions* pOptions) {
CFX_FontCache* pCache =
@@ -731,14 +730,13 @@ FX_BOOL CPDF_TextRenderer::DrawNormalText(CFX_RenderDevice* pDevice,
&pFont->m_Font, pCache, font_size,
pText2Device, fill_argb, FXGE_flags);
}
-void CPDF_RenderStatus::DrawTextPathWithPattern(
- const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device,
- CPDF_Font* pFont,
- FX_FLOAT font_size,
- const CFX_AffineMatrix* pTextMatrix,
- FX_BOOL bFill,
- FX_BOOL bStroke) {
+void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
+ const CFX_Matrix* pObj2Device,
+ CPDF_Font* pFont,
+ FX_FLOAT font_size,
+ const CFX_Matrix* pTextMatrix,
+ FX_BOOL bFill,
+ FX_BOOL bStroke) {
if (!bStroke) {
CPDF_PathObject path;
CPDF_TextObject* pCopy = new CPDF_TextObject;
@@ -777,7 +775,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(
CPDF_PathObject path;
path.m_GraphState = textobj->m_GraphState;
path.m_ColorState = textobj->m_ColorState;
- 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);
diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h
index 5b862b3401..d173f47b7c 100644
--- a/core/src/fpdfapi/fpdf_render/render_int.h
+++ b/core/src/fpdfapi/fpdf_render/render_int.h
@@ -41,14 +41,14 @@ class CPDF_Type3Cache {
~CPDF_Type3Cache();
CFX_GlyphBitmap* LoadGlyph(FX_DWORD charcode,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX = 1.0f,
FX_FLOAT retinaScaleY = 1.0f);
protected:
CFX_GlyphBitmap* RenderGlyph(CPDF_Type3Glyphs* pSize,
FX_DWORD charcode,
- const CFX_AffineMatrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_FLOAT retinaScaleX = 1.0f,
FX_FLOAT retinaScaleY = 1.0f);
CPDF_Type3Font* const m_pFont;
@@ -93,7 +93,7 @@ class CPDF_DocRenderData {
struct _PDF_RenderItem {
public:
CPDF_PageObjects* m_pObjectList;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
};
typedef CFX_ArrayTemplate<_PDF_RenderItem> CPDF_RenderLayer;
@@ -104,7 +104,7 @@ class IPDF_ObjectRenderer {
virtual ~IPDF_ObjectRenderer() {}
virtual FX_BOOL Start(CPDF_RenderStatus* pRenderStatus,
const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStdCS,
int blendType = FXDIB_BLEND_NORMAL) = 0;
virtual FX_BOOL Continue(IFX_Pause* pPause) = 0;
@@ -117,7 +117,7 @@ class CPDF_RenderStatus {
~CPDF_RenderStatus();
FX_BOOL Initialize(class CPDF_RenderContext* pContext,
CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pDeviceMatrix,
+ const CFX_Matrix* pDeviceMatrix,
const CPDF_PageObject* pStopObj,
const CPDF_RenderStatus* pParentStatus,
const CPDF_GraphicStates* pInitialStates,
@@ -131,11 +131,11 @@ class CPDF_RenderStatus {
FX_DWORD GroupFamily = 0,
FX_BOOL bLoadMask = FALSE);
void RenderObjectList(const CPDF_PageObjects* pObjs,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
void RenderSingleObject(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
FX_BOOL ContinueSingleObject(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
IFX_Pause* pPause);
CPDF_RenderContext* GetContext() { return m_pContext; }
@@ -147,49 +147,46 @@ class CPDF_RenderStatus {
protected:
friend class CPDF_ImageRenderer;
friend class CPDF_RenderContext;
- void ProcessClipPath(CPDF_ClipPath ClipPath,
- const CFX_AffineMatrix* pObj2Device);
- void DrawClipPath(CPDF_ClipPath ClipPath,
- const CFX_AffineMatrix* pObj2Device);
+ void ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
+ void DrawClipPath(CPDF_ClipPath ClipPath, const CFX_Matrix* pObj2Device);
FX_BOOL ProcessTransparency(const CPDF_PageObject* PageObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
void ProcessObjectNoClip(const CPDF_PageObject* PageObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
void DrawObjWithBackground(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
FX_BOOL DrawObjWithBlend(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device);
- FX_BOOL ProcessPath(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
+ FX_BOOL ProcessPath(CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device);
void ProcessPathPattern(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
int& filltype,
FX_BOOL& bStroke);
void DrawPathWithPattern(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
CPDF_Color* pColor,
FX_BOOL bStroke);
void DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke);
void DrawShadingPattern(CPDF_ShadingPattern* pPattern,
CPDF_PageObject* pPageObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke);
FX_BOOL SelectClipPath(CPDF_PathObject* pPathObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStroke);
FX_BOOL ProcessImage(CPDF_ImageObject* pImageObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
FX_BOOL OutputBitmapAlpha(CPDF_ImageObject* pImageObj,
- const CFX_AffineMatrix* pImage2Device);
+ const CFX_Matrix* pImage2Device);
FX_BOOL OutputImage(CPDF_ImageObject* pImageObj,
- const CFX_AffineMatrix* pImage2Device);
+ const CFX_Matrix* pImage2Device);
FX_BOOL OutputDIBSource(const CFX_DIBSource* pOutputBitmap,
FX_ARGB fill_argb,
int bitmap_alpha,
- const CFX_AffineMatrix* pImage2Device,
+ const CFX_Matrix* pImage2Device,
CPDF_ImageCache* pImageCache,
FX_DWORD flags);
void CompositeDIBitmap(CFX_DIBitmap* pDIBitmap,
@@ -200,26 +197,25 @@ class CPDF_RenderStatus {
int blend_mode,
int bIsolated);
FX_BOOL ProcessShading(CPDF_ShadingObject* pShadingObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
void DrawShading(CPDF_ShadingPattern* pPattern,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_RECT& clip_rect,
int alpha,
FX_BOOL bAlphaMode);
FX_BOOL ProcessType3Text(const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
FX_BOOL ProcessText(const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
CFX_PathData* pClippingPath);
void DrawTextPathWithPattern(const CPDF_TextObject* textobj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
CPDF_Font* pFont,
FX_FLOAT font_size,
- const CFX_AffineMatrix* pTextMatrix,
+ const CFX_Matrix* pTextMatrix,
FX_BOOL bFill,
FX_BOOL bStroke);
- FX_BOOL ProcessForm(CPDF_FormObject* pFormObj,
- const CFX_AffineMatrix* pObj2Device);
+ FX_BOOL ProcessForm(CPDF_FormObject* pFormObj, const CFX_Matrix* pObj2Device);
CFX_DIBitmap* GetBackdrop(const CPDF_PageObject* pObj,
const FX_RECT& rect,
int& left,
@@ -227,7 +223,7 @@ class CPDF_RenderStatus {
FX_BOOL bBackAlphaRequired);
CFX_DIBitmap* LoadSMask(CPDF_Dictionary* pSMaskDict,
FX_RECT* pClipRect,
- const CFX_AffineMatrix* pMatrix);
+ const CFX_Matrix* pMatrix);
void Init(CPDF_RenderContext* pParent);
static class CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont);
static CPDF_GraphicStates* CloneObjStates(const CPDF_GraphicStates* pPathObj,
@@ -239,9 +235,9 @@ class CPDF_RenderStatus {
CPDF_RenderContext* m_pContext;
FX_BOOL m_bStopped;
void DitherObjectArea(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device);
+ const CFX_Matrix* pObj2Device);
FX_BOOL GetObjectClippedRect(const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bLogical,
FX_RECT& rect) const;
void GetScaledMatrix(CFX_Matrix& matrix) const;
@@ -251,7 +247,7 @@ class CPDF_RenderStatus {
static int s_CurrentRecursionDepth;
CFX_RenderDevice* m_pDevice;
- CFX_AffineMatrix m_DeviceMatrix;
+ CFX_Matrix m_DeviceMatrix;
CPDF_ClipPath m_LastClipPath;
const CPDF_PageObject* m_pCurObj;
const CPDF_PageObject* m_pStopObj;
@@ -340,7 +336,7 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer {
// IPDF_ObjectRenderer
FX_BOOL Start(CPDF_RenderStatus* pStatus,
const CPDF_PageObject* pObj,
- const CFX_AffineMatrix* pObj2Device,
+ const CFX_Matrix* pObj2Device,
FX_BOOL bStdCS,
int blendType = FXDIB_BLEND_NORMAL) override;
FX_BOOL Continue(IFX_Pause* pPause) override;
@@ -349,7 +345,7 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer {
const CFX_DIBSource* pDIBSource,
FX_ARGB bitmap_argb,
int bitmap_alpha,
- const CFX_AffineMatrix* pImage2Device,
+ const CFX_Matrix* pImage2Device,
FX_DWORD flags,
FX_BOOL bStdCS,
int blendType = FXDIB_BLEND_NORMAL);
@@ -358,8 +354,8 @@ class CPDF_ImageRenderer : public IPDF_ObjectRenderer {
CPDF_RenderStatus* m_pRenderStatus;
CPDF_ImageObject* m_pImageObject;
int m_Status;
- const CFX_AffineMatrix* m_pObj2Device;
- CFX_AffineMatrix m_ImageMatrix;
+ const CFX_Matrix* m_pObj2Device;
+ CFX_Matrix m_ImageMatrix;
CPDF_ImageLoader m_Loader;
const CFX_DIBSource* m_pDIBSource;
CFX_DIBitmap* m_pClone;
@@ -396,7 +392,7 @@ class CPDF_ScaledRenderBuffer {
CFX_RenderDevice* GetDevice() {
return m_pBitmapDevice ? m_pBitmapDevice.get() : m_pDevice;
}
- CFX_AffineMatrix* GetMatrix() { return &m_Matrix; }
+ CFX_Matrix* GetMatrix() { return &m_Matrix; }
void OutputToDevice();
private:
@@ -405,7 +401,7 @@ class CPDF_ScaledRenderBuffer {
FX_RECT m_Rect;
const CPDF_PageObject* m_pObject;
nonstd::unique_ptr<CFX_FxgeDevice> m_pBitmapDevice;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
};
class ICodec_ScanlineDecoder;
@@ -414,7 +410,7 @@ class CPDF_QuickStretcher {
CPDF_QuickStretcher();
~CPDF_QuickStretcher();
FX_BOOL Start(CPDF_ImageObject* pImageObj,
- CFX_AffineMatrix* pImage2Device,
+ CFX_Matrix* pImage2Device,
const FX_RECT* pClipBox);
FX_BOOL Continue(IFX_Pause* pPause);
CFX_DIBitmap* m_pBitmap;
@@ -439,7 +435,7 @@ class CPDF_DeviceBuffer {
int max_dpi = 0);
void OutputToDevice();
CFX_DIBitmap* GetBitmap() const { return m_pBitmap.get(); }
- const CFX_AffineMatrix* GetMatrix() const { return &m_Matrix; }
+ const CFX_Matrix* GetMatrix() const { return &m_Matrix; }
private:
CFX_RenderDevice* m_pDevice;
@@ -447,7 +443,7 @@ class CPDF_DeviceBuffer {
FX_RECT m_Rect;
const CPDF_PageObject* m_pObject;
nonstd::unique_ptr<CFX_DIBitmap> m_pBitmap;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
};
class CPDF_ImageCache {
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index 36494cc2ea..0765acdf6e 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -51,7 +51,7 @@ void CPDF_AnnotList::DisplayPass(const CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
FX_BOOL bWidgetPass,
CPDF_RenderOptions* pOptions,
FX_RECT* clip_rect) {
@@ -102,7 +102,7 @@ void CPDF_AnnotList::DisplayAnnots(const CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
CPDF_RenderContext* pContext,
FX_BOOL bPrinting,
- CFX_AffineMatrix* pUser2Device,
+ CFX_Matrix* pUser2Device,
FX_DWORD dwAnnotFlags,
CPDF_RenderOptions* pOptions,
FX_RECT* pClipRect) {
@@ -206,7 +206,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) {
static CPDF_Form* FPDFDOC_Annot_GetMatrix(const CPDF_Page* pPage,
CPDF_Annot* pAnnot,
CPDF_Annot::AppearanceMode mode,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
CFX_Matrix& matrix) {
CPDF_Form* pForm = pAnnot->GetAPForm(pPage, mode);
if (!pForm) {
@@ -223,7 +223,7 @@ static CPDF_Form* FPDFDOC_Annot_GetMatrix(const CPDF_Page* pPage,
}
FX_BOOL CPDF_Annot::DrawAppearance(const CPDF_Page* pPage,
CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
AppearanceMode mode,
const CPDF_RenderOptions* pOptions) {
CFX_Matrix matrix;
@@ -239,7 +239,7 @@ FX_BOOL CPDF_Annot::DrawAppearance(const CPDF_Page* pPage,
}
FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage,
const CPDF_RenderContext* pContext,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
AppearanceMode mode) {
CFX_Matrix matrix;
CPDF_Form* pForm =
@@ -251,7 +251,7 @@ FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage,
return TRUE;
}
void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice,
- const CFX_AffineMatrix* pUser2Device,
+ const CFX_Matrix* pUser2Device,
const CPDF_RenderOptions* pOptions) {
if (GetSubType() == "Popup") {
return;
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp
index 7fc9407c73..bbac32f404 100644
--- a/core/src/fpdfdoc/doc_ap.cpp
+++ b/core/src/fpdfdoc/doc_ap.cpp
@@ -333,25 +333,25 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
nRotate = pMKDict->GetInteger("R");
}
CPDF_Rect rcBBox;
- CPDF_Matrix matrix;
+ CFX_Matrix matrix;
switch (nRotate % 360) {
case 0:
rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left,
rcAnnot.top - rcAnnot.bottom);
break;
case 90:
- matrix = CPDF_Matrix(0, 1, -1, 0, rcAnnot.right - rcAnnot.left, 0);
+ matrix = CFX_Matrix(0, 1, -1, 0, rcAnnot.right - rcAnnot.left, 0);
rcBBox = CPDF_Rect(0, 0, rcAnnot.top - rcAnnot.bottom,
rcAnnot.right - rcAnnot.left);
break;
case 180:
- matrix = CPDF_Matrix(-1, 0, 0, -1, rcAnnot.right - rcAnnot.left,
- rcAnnot.top - rcAnnot.bottom);
+ matrix = CFX_Matrix(-1, 0, 0, -1, rcAnnot.right - rcAnnot.left,
+ rcAnnot.top - rcAnnot.bottom);
rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left,
rcAnnot.top - rcAnnot.bottom);
break;
case 270:
- matrix = CPDF_Matrix(0, -1, 1, 0, 0, rcAnnot.top - rcAnnot.bottom);
+ matrix = CFX_Matrix(0, -1, 1, 0, 0, rcAnnot.top - rcAnnot.bottom);
rcBBox = CPDF_Rect(0, 0, rcAnnot.top - rcAnnot.bottom,
rcAnnot.right - rcAnnot.left);
break;
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp
index 88b68bc7f7..9bdf13bf85 100644
--- a/core/src/fpdfdoc/doc_formcontrol.cpp
+++ b/core/src/fpdfdoc/doc_formcontrol.cpp
@@ -149,7 +149,7 @@ void CPDF_FormControl::CheckControl(FX_BOOL bChecked) {
CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict,
CPDF_Annot::AppearanceMode mode);
void CPDF_FormControl::DrawControl(CFX_RenderDevice* pDevice,
- CFX_AffineMatrix* pMatrix,
+ CFX_Matrix* pMatrix,
CPDF_Page* pPage,
CPDF_Annot::AppearanceMode mode,
const CPDF_RenderOptions* pOptions) {
@@ -161,10 +161,10 @@ void CPDF_FormControl::DrawControl(CFX_RenderDevice* pDevice,
return;
}
CFX_FloatRect form_bbox = pStream->GetDict()->GetRect("BBox");
- CFX_AffineMatrix form_matrix = pStream->GetDict()->GetMatrix("Matrix");
+ CFX_Matrix form_matrix = pStream->GetDict()->GetMatrix("Matrix");
form_matrix.TransformRect(form_bbox);
CFX_FloatRect arect = m_pWidgetDict->GetRect("Rect");
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
matrix.MatchRect(arect, form_bbox);
matrix.Concat(*pMatrix);
CPDF_Form form(m_pField->m_pForm->m_pDocument,
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index b0eafbff20..adf523f74e 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -208,8 +208,8 @@ CFX_ByteString CPDF_DefaultAppearance::GetTextMatrixString() {
}
return csTM;
}
-CFX_AffineMatrix CPDF_DefaultAppearance::GetTextMatrix() {
- CFX_AffineMatrix tm;
+CFX_Matrix CPDF_DefaultAppearance::GetTextMatrix() {
+ CFX_Matrix tm;
if (m_csDA.IsEmpty()) {
return tm;
}
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index e70d0e0e4b..9a967e62fd 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -69,7 +69,7 @@ void CTextPage::ProcessObject(CPDF_PageObject* pObject) {
}
if (pText->m_TextState.GetBaselineAngle() != 0) {
int cc = 0;
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
pText->GetTextMatrix(&matrix);
for (int i = 0; i < pText->m_nChars; i++) {
FX_DWORD charcode = pText->m_nChars == 1
@@ -707,7 +707,7 @@ static void CheckRotate(CPDF_Page& page, CFX_FloatRect& page_bbox) {
if (total_count == 0) {
return;
}
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
if (rotated_count[0] > total_count * 2 / 3) {
matrix.Set(0, -1, 1, 0, 0, page.GetPageHeight());
} else if (rotated_count[1] > total_count * 2 / 3) {
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index ee768af3bc..314cc0e062 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -51,7 +51,7 @@ FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold) {
}
FX_FLOAT _CalculateBaseSpace(const CPDF_TextObject* pTextObj,
- const CFX_AffineMatrix& matrix) {
+ const CFX_Matrix& matrix) {
FX_FLOAT baseSpace = 0.0;
const int nItems = pTextObj->CountItems();
if (pTextObj->m_TextState.GetObject()->m_CharSpace && nItems >= 3) {
@@ -265,7 +265,7 @@ void CPDF_TextPage::GetRectArray(int start,
}
if (flagNewRect) {
FX_FLOAT orgX = info_curchar.m_OriginX, orgY = info_curchar.m_OriginY;
- CFX_AffineMatrix matrix, matrix_reverse;
+ CFX_Matrix matrix, matrix_reverse;
info_curchar.m_pTextObj->GetTextMatrix(&matrix);
matrix.Concat(info_curchar.m_Matrix);
matrix_reverse.SetReverse(matrix);
@@ -908,11 +908,11 @@ void CPDF_TextPage::ProcessObject() {
pPageObj = m_pPage->GetNextObject(pos);
if (pPageObj) {
if (pPageObj->m_Type == PDFPAGE_TEXT) {
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
ProcessTextObject((CPDF_TextObject*)pPageObj, matrix, pos);
nCount++;
} else if (pPageObj->m_Type == PDFPAGE_FORM) {
- CFX_AffineMatrix formMatrix(1, 0, 0, 1, 0, 0);
+ CFX_Matrix formMatrix(1, 0, 0, 1, 0, 0);
ProcessFormObject((CPDF_FormObject*)pPageObj, formMatrix);
}
}
@@ -926,7 +926,7 @@ void CPDF_TextPage::ProcessObject() {
CloseTempLine();
}
void CPDF_TextPage::ProcessFormObject(CPDF_FormObject* pFormObj,
- const CFX_AffineMatrix& formMatrix) {
+ const CFX_Matrix& formMatrix) {
CPDF_PageObject* pPageObj = NULL;
FX_POSITION pos;
if (!pFormObj) {
@@ -936,7 +936,7 @@ void CPDF_TextPage::ProcessFormObject(CPDF_FormObject* pFormObj,
if (!pos) {
return;
}
- CFX_AffineMatrix curFormMatrix;
+ CFX_Matrix curFormMatrix;
curFormMatrix.Copy(pFormObj->m_FormMatrix);
curFormMatrix.Concat(formMatrix);
while (pos) {
@@ -1187,7 +1187,7 @@ void CPDF_TextPage::CloseTempLine() {
m_TempTextBuf.Delete(0, m_TempTextBuf.GetLength());
}
void CPDF_TextPage::ProcessTextObject(CPDF_TextObject* pTextObj,
- const CFX_AffineMatrix& formMatrix,
+ const CFX_Matrix& formMatrix,
FX_POSITION ObjPos) {
CFX_FloatRect re(pTextObj->m_Left, pTextObj->m_Bottom, pTextObj->m_Right,
pTextObj->m_Top);
@@ -1212,7 +1212,7 @@ void CPDF_TextPage::ProcessTextObject(CPDF_TextObject* pTextObj,
FX_FLOAT prev_width =
GetCharWidth(item.m_CharCode, prev_Obj.m_pTextObj->GetFont()) *
prev_Obj.m_pTextObj->GetFontSize() / 1000;
- CFX_AffineMatrix prev_matrix;
+ CFX_Matrix prev_matrix;
prev_Obj.m_pTextObj->GetTextMatrix(&prev_matrix);
prev_width = FXSYS_fabs(prev_width);
prev_matrix.Concat(prev_Obj.m_formMatrix);
@@ -1221,7 +1221,7 @@ void CPDF_TextPage::ProcessTextObject(CPDF_TextObject* pTextObj,
FX_FLOAT this_width = GetCharWidth(item.m_CharCode, pTextObj->GetFont()) *
pTextObj->GetFontSize() / 1000;
this_width = FXSYS_fabs(this_width);
- CFX_AffineMatrix this_matrix;
+ CFX_Matrix this_matrix;
pTextObj->GetTextMatrix(&this_matrix);
this_width = FXSYS_fabs(this_width);
this_matrix.Concat(formMatrix);
@@ -1247,7 +1247,7 @@ void CPDF_TextPage::ProcessTextObject(CPDF_TextObject* pTextObj,
if (m_ParseOptions.m_bNormalizeObjs) {
for (i = count - 1; i >= 0; i--) {
PDFTEXT_Obj prev_Obj = m_LineObj.GetAt(i);
- CFX_AffineMatrix prev_matrix;
+ CFX_Matrix prev_matrix;
prev_Obj.m_pTextObj->GetTextMatrix(&prev_matrix);
FX_FLOAT Prev_x = prev_Obj.m_pTextObj->GetPosX(),
Prev_y = prev_Obj.m_pTextObj->GetPosY();
@@ -1369,8 +1369,8 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
return;
}
CPDF_Font* pFont = pTextObj->GetFont();
- CFX_AffineMatrix formMatrix = Obj.m_formMatrix;
- CFX_AffineMatrix matrix;
+ CFX_Matrix formMatrix = Obj.m_formMatrix;
+ CFX_Matrix matrix;
pTextObj->GetTextMatrix(&matrix);
matrix.Concat(formMatrix);
FX_FLOAT fPosX = pTextObj->GetPosX();
@@ -1482,9 +1482,9 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) {
if (FXSYS_fabs(pTextObj->m_Right - pTextObj->m_Left) < 0.01f) {
return;
}
- CFX_AffineMatrix formMatrix = Obj.m_formMatrix;
+ CFX_Matrix formMatrix = Obj.m_formMatrix;
CPDF_Font* pFont = pTextObj->GetFont();
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
pTextObj->GetTextMatrix(&matrix);
matrix.Concat(formMatrix);
int32_t bPreMKC = PreMarkedContent(Obj);
@@ -1814,7 +1814,7 @@ FX_BOOL CPDF_TextPage::IsHyphen(FX_WCHAR curChar) {
return FALSE;
}
int CPDF_TextPage::ProcessInsertObject(const CPDF_TextObject* pObj,
- const CFX_AffineMatrix& formMatrix) {
+ const CFX_Matrix& formMatrix) {
FindPreviousTextObject();
FX_BOOL bNewline = FALSE;
int WritingMode = GetTextObjectWritingMode(pObj);
@@ -1873,7 +1873,7 @@ int CPDF_TextPage::ProcessInsertObject(const CPDF_TextObject* pObj,
this_width = FXSYS_fabs(this_width);
FX_FLOAT threshold =
last_width > this_width ? last_width / 4 : this_width / 4;
- CFX_AffineMatrix prev_matrix, prev_reverse;
+ CFX_Matrix prev_matrix, prev_reverse;
m_pPreTextObj->GetTextMatrix(&prev_matrix);
prev_matrix.Concat(m_perMatrix);
prev_reverse.SetReverse(prev_matrix);
@@ -1898,7 +1898,7 @@ int CPDF_TextPage::ProcessInsertObject(const CPDF_TextObject* pObj,
if (nItem > 1) {
CPDF_TextObjectItem tempItem;
m_pPreTextObj->GetItemInfo(0, &tempItem);
- CFX_AffineMatrix m;
+ CFX_Matrix m;
m_pPreTextObj->GetTextMatrix(&m);
if (PrevItem.m_OriginX > tempItem.m_OriginX &&
m_DisplayMatrix.a > 0.9 && m_DisplayMatrix.b < 0.1 &&
@@ -1933,7 +1933,7 @@ int CPDF_TextPage::ProcessInsertObject(const CPDF_TextObject* pObj,
CFX_WideString PrevStr =
m_pPreTextObj->GetFont()->UnicodeFromCharCode(PrevItem.m_CharCode);
FX_WCHAR preChar = PrevStr.GetAt(PrevStr.GetLength() - 1);
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
pObj->GetTextMatrix(&matrix);
matrix.Concat(formMatrix);
threshold = (FX_FLOAT)(nLastWidth > nThisWidth ? nLastWidth : nThisWidth);
diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp
index 0acea11cf2..43486c7ab8 100644
--- a/core/src/fpdftext/fpdf_text_search.cpp
+++ b/core/src/fpdftext/fpdf_text_search.cpp
@@ -113,7 +113,7 @@ int FPDFText_ProcessInterObj(const CPDF_TextObject* pPrevObj,
this_width = FXSYS_fabs(this_width);
FX_FLOAT threshold =
last_width > this_width ? last_width / 4 : this_width / 4;
- CFX_AffineMatrix prev_matrix, prev_reverse;
+ CFX_Matrix prev_matrix, prev_reverse;
pPrevObj->GetTextMatrix(&prev_matrix);
prev_reverse.SetReverse(prev_matrix);
FX_FLOAT x = pObj->GetPosX(), y = pObj->GetPosY();
@@ -151,7 +151,7 @@ int FPDFText_ProcessInterObj(const CPDF_TextObject* pPrevObj,
FX_BOOL CPDF_TextStream::ProcessObject(const CPDF_TextObject* pObj,
FX_BOOL bFirstLine) {
CPDF_Font* pFont = pObj->GetFont();
- CFX_AffineMatrix matrix;
+ CFX_Matrix matrix;
pObj->GetTextMatrix(&matrix);
int item_index = 0;
if (m_pLastObj) {
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index a7f3aaec7d..a8f4f37e98 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -34,7 +34,7 @@ typedef struct _PAGECHAR_INFO {
int32_t m_Flag;
CFX_FloatRect m_CharBox;
CPDF_TextObject* m_pTextObj;
- CFX_AffineMatrix m_Matrix;
+ CFX_Matrix m_Matrix;
int m_Index;
} PAGECHAR_INFO;
typedef CFX_SegmentedArray<PAGECHAR_INFO> PAGECHAR_InfoArray;
@@ -45,7 +45,7 @@ typedef struct {
typedef CFX_ArrayTemplate<FPDF_SEGMENT> SEGMENT_Array;
typedef struct {
CPDF_TextObject* m_pTextObj;
- CFX_AffineMatrix m_formMatrix;
+ CFX_Matrix m_formMatrix;
} PDFTEXT_Obj;
typedef CFX_ArrayTemplate<PDFTEXT_Obj> LINEOBJ;
@@ -103,13 +103,13 @@ class CPDF_TextPage : public IPDF_TextPage {
FX_BOOL GetBaselineRotate(int start, int end, int& Rotate);
void ProcessObject();
void ProcessFormObject(CPDF_FormObject* pFormObj,
- const CFX_AffineMatrix& formMatrix);
+ const CFX_Matrix& formMatrix);
void ProcessTextObject(PDFTEXT_Obj pObj);
void ProcessTextObject(CPDF_TextObject* pTextObj,
- const CFX_AffineMatrix& formMatrix,
+ const CFX_Matrix& formMatrix,
FX_POSITION ObjPos);
int ProcessInsertObject(const CPDF_TextObject* pObj,
- const CFX_AffineMatrix& formMatrix);
+ const CFX_Matrix& formMatrix);
FX_BOOL GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info);
FX_BOOL IsSameAsPreTextObject(CPDF_TextObject* pTextObj, FX_POSITION ObjPos);
FX_BOOL IsSameTextObject(CPDF_TextObject* pTextObj1,
@@ -139,9 +139,9 @@ class CPDF_TextPage : public IPDF_TextPage {
CFX_WideTextBuf m_TempTextBuf;
const int m_parserflag;
CPDF_TextObject* m_pPreTextObj;
- CFX_AffineMatrix m_perMatrix;
+ CFX_Matrix m_perMatrix;
bool m_bIsParsed;
- CFX_AffineMatrix m_DisplayMatrix;
+ CFX_Matrix m_DisplayMatrix;
SEGMENT_Array m_Segment;
CFX_RectArray m_SelRects;
LINEOBJ m_LineObj;
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,