summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 6996b647d3..ee445bbf25 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -391,7 +391,7 @@ void XFA_BOX_Fill_Radial(CXFA_Box box,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart, crEnd;
crStart = fill.GetColor();
@@ -414,7 +414,7 @@ void XFA_BOX_Fill_Pattern(CXFA_Box box,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart, crEnd;
crStart = fill.GetColor();
@@ -449,7 +449,7 @@ void XFA_BOX_Fill_Linear(CXFA_Box box,
CXFA_Graphics* pGS,
CXFA_Path& fillPath,
CFX_RectF rtFill,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
CXFA_Fill fill = box.GetFill();
FX_ARGB crStart = fill.GetColor();
FX_ARGB crEnd;
@@ -485,7 +485,7 @@ void XFA_BOX_Fill(CXFA_Box box,
const std::vector<CXFA_Stroke>& strokes,
CXFA_Graphics* pGS,
const CFX_RectF& rtWidget,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
uint32_t dwFlags) {
CXFA_Fill fill = box.GetFill();
if (!fill || fill.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
@@ -530,7 +530,7 @@ void XFA_BOX_Fill(CXFA_Box box,
void XFA_BOX_StrokePath(CXFA_Stroke stroke,
CXFA_Path* pPath,
CXFA_Graphics* pGS,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
if (!stroke || !stroke.IsVisible()) {
return;
}
@@ -555,7 +555,7 @@ void XFA_BOX_StrokePath(CXFA_Stroke stroke,
void XFA_BOX_StrokeArc(CXFA_Box box,
CXFA_Graphics* pGS,
CFX_RectF rtWidget,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
uint32_t dwFlags) {
CXFA_Edge edge = box.GetEdge(0);
if (!edge || !edge.IsVisible()) {
@@ -641,7 +641,7 @@ void XFA_BOX_StrokeArc(CXFA_Box box,
void XFA_Draw3DRect(CXFA_Graphics* pGraphic,
const CFX_RectF& rt,
float fLineWidth,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
FX_ARGB argbTopLeft,
FX_ARGB argbBottomRight) {
float fBottom = rt.bottom();
@@ -672,7 +672,7 @@ void XFA_Draw3DRect(CXFA_Graphics* pGraphic,
void XFA_BOX_Stroke_3DRect_Lowered(CXFA_Graphics* pGS,
CFX_RectF rt,
float fThickness,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
@@ -688,7 +688,7 @@ void XFA_BOX_Stroke_3DRect_Lowered(CXFA_Graphics* pGS,
void XFA_BOX_Stroke_3DRect_Raised(CXFA_Graphics* pGS,
CFX_RectF rt,
float fThickness,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
float fHalfWidth = fThickness / 2.0f;
CFX_RectF rtInner(rt);
rtInner.Deflate(fHalfWidth, fHalfWidth);
@@ -704,7 +704,7 @@ void XFA_BOX_Stroke_3DRect_Raised(CXFA_Graphics* pGS,
void XFA_BOX_Stroke_3DRect_Etched(CXFA_Graphics* pGS,
CFX_RectF rt,
float fThickness,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
float fHalfWidth = fThickness / 2.0f;
XFA_Draw3DRect(pGS, rt, fThickness, pMatrix, 0xFF808080, 0xFFFFFFFF);
CFX_RectF rtInner(rt);
@@ -715,7 +715,7 @@ void XFA_BOX_Stroke_3DRect_Etched(CXFA_Graphics* pGS,
void XFA_BOX_Stroke_3DRect_Embossed(CXFA_Graphics* pGS,
CFX_RectF rt,
float fThickness,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
float fHalfWidth = fThickness / 2.0f;
XFA_Draw3DRect(pGS, rt, fThickness, pMatrix, 0xFF808080, 0xFF000000);
CFX_RectF rtInner(rt);
@@ -727,7 +727,7 @@ void XFA_BOX_Stroke_Rect(CXFA_Box box,
const std::vector<CXFA_Stroke>& strokes,
CXFA_Graphics* pGS,
CFX_RectF rtWidget,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
bool bVisible = false;
float fThickness = 0;
int32_t i3DType = box.Get3DStyle(bVisible, fThickness);
@@ -816,7 +816,7 @@ void XFA_BOX_Stroke(CXFA_Box box,
const std::vector<CXFA_Stroke>& strokes,
CXFA_Graphics* pGS,
CFX_RectF rtWidget,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
uint32_t dwFlags) {
if (box.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) {
XFA_BOX_StrokeArc(box, pGS, rtWidget, pMatrix, dwFlags);
@@ -881,7 +881,7 @@ void XFA_BOX_Stroke(CXFA_Box box,
void XFA_DrawBox(CXFA_Box box,
CXFA_Graphics* pGS,
const CFX_RectF& rtWidget,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
uint32_t dwFlags) {
if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return;
@@ -976,7 +976,7 @@ bool CXFA_FFWidget::GetToolTip(CFX_WideString& wsToolTip) {
}
void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
uint32_t dwStatus) {
if (!IsMatchVisibleStatus(dwStatus))
return;
@@ -991,7 +991,7 @@ void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS,
XFA_RectWidthoutMargin(rtBorder, margin);
rtBorder.Normalize();
- DrawBorder(pGS, border, rtBorder, pMatrix);
+ DrawBorder(pGS, border, rtBorder, &matrix);
}
bool CXFA_FFWidget::IsLoaded() {
@@ -1014,14 +1014,14 @@ void CXFA_FFWidget::UpdateWidgetProperty() {}
void CXFA_FFWidget::DrawBorder(CXFA_Graphics* pGS,
CXFA_Box box,
const CFX_RectF& rtBorder,
- CFX_Matrix* pMatrix) {
+ const CFX_Matrix* pMatrix) {
XFA_DrawBox(box, pGS, rtBorder, pMatrix, 0);
}
void CXFA_FFWidget::DrawBorderWithFlags(CXFA_Graphics* pGS,
CXFA_Box box,
const CFX_RectF& rtBorder,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix* pMatrix,
uint32_t dwFlags) {
XFA_DrawBox(box, pGS, rtBorder, pMatrix, dwFlags);
}
@@ -1683,7 +1683,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(
void XFA_DrawImage(CXFA_Graphics* pGS,
const CFX_RectF& rtImage,
- CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap,
int32_t iAspect,
int32_t iImageXDpi,
@@ -1738,12 +1738,12 @@ void XFA_DrawImage(CXFA_Graphics* pGS,
CFX_RenderDevice::StateRestorer restorer(pRenderDevice);
CFX_PathData path;
path.AppendRect(rtImage.left, rtImage.bottom(), rtImage.right(), rtImage.top);
- pRenderDevice->SetClip_PathFill(&path, pMatrix, FXFILL_WINDING);
+ pRenderDevice->SetClip_PathFill(&path, &matrix, FXFILL_WINDING);
CFX_Matrix mtImage(1, 0, 0, -1, 0, 1);
mtImage.Concat(
CFX_Matrix(rtFit.width, 0, 0, rtFit.height, rtFit.left, rtFit.top));
- mtImage.Concat(*pMatrix);
+ mtImage.Concat(matrix);
CXFA_ImageRenderer imageRender;
if (!imageRender.Start(pRenderDevice, pDIBitmap, 0, 255, &mtImage,