summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_render
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-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
5 files changed, 148 insertions, 162 deletions
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 {