summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/cxfa_ffimage.cpp3
-rw-r--r--xfa/fxfa/cxfa_ffimageedit.cpp5
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp10
-rw-r--r--xfa/fxfa/cxfa_ffwidget.h3
4 files changed, 8 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_ffimage.cpp b/xfa/fxfa/cxfa_ffimage.cpp
index 15916de456..9d9010158e 100644
--- a/xfa/fxfa/cxfa_ffimage.cpp
+++ b/xfa/fxfa/cxfa_ffimage.cpp
@@ -68,8 +68,7 @@ void CXFA_FFImage::RenderWidget(CXFA_Graphics* pGS,
auto* value = m_pNode->GetFormValueIfExists();
CXFA_Image* image = value ? value->GetImageIfExists() : nullptr;
if (image) {
- CFX_Size dpi = m_pNode->GetImageDpi();
XFA_DrawImage(pGS, rtImage, mtRotate, pDIBitmap, image->GetAspect(),
- dpi.width, dpi.height, iHorzAlign, iVertAlign);
+ m_pNode->GetImageDpi(), iHorzAlign, iVertAlign);
}
}
diff --git a/xfa/fxfa/cxfa_ffimageedit.cpp b/xfa/fxfa/cxfa_ffimageedit.cpp
index f07bc1e267..c1d1a09bac 100644
--- a/xfa/fxfa/cxfa_ffimageedit.cpp
+++ b/xfa/fxfa/cxfa_ffimageedit.cpp
@@ -89,9 +89,8 @@ void CXFA_FFImageEdit::RenderWidget(CXFA_Graphics* pGS,
iAspect = image->GetAspect();
}
- CFX_Size dpi = m_pNode->GetImageEditDpi();
- XFA_DrawImage(pGS, rtImage, mtRotate, pDIBitmap, iAspect, dpi.width,
- dpi.height, iHorzAlign, iVertAlign);
+ XFA_DrawImage(pGS, rtImage, mtRotate, pDIBitmap, iAspect,
+ m_pNode->GetImageEditDpi(), iHorzAlign, iVertAlign);
}
bool CXFA_FFImageEdit::AcceptsFocusOnButtonDown(uint32_t dwFlags,
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 553612ea87..96c611e3f7 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -74,8 +74,7 @@ void XFA_DrawImage(CXFA_Graphics* pGS,
const CFX_Matrix& matrix,
const RetainPtr<CFX_DIBitmap>& pDIBitmap,
XFA_AttributeEnum iAspect,
- int32_t iImageXDpi,
- int32_t iImageYDpi,
+ const CFX_Size& dpi,
XFA_AttributeEnum iHorzAlign,
XFA_AttributeEnum iVertAlign) {
if (rtImage.IsEmpty())
@@ -83,10 +82,9 @@ void XFA_DrawImage(CXFA_Graphics* pGS,
if (!pDIBitmap || !pDIBitmap->GetBuffer())
return;
- CFX_RectF rtFit(
- rtImage.TopLeft(),
- XFA_UnitPx2Pt((float)pDIBitmap->GetWidth(), (float)iImageXDpi),
- XFA_UnitPx2Pt((float)pDIBitmap->GetHeight(), (float)iImageYDpi));
+ CFX_RectF rtFit(rtImage.TopLeft(),
+ XFA_UnitPx2Pt(pDIBitmap->GetWidth(), dpi.width),
+ XFA_UnitPx2Pt(pDIBitmap->GetHeight(), dpi.height));
switch (iAspect) {
case XFA_AttributeEnum::Fit: {
float f1 = rtImage.height / rtFit.height;
diff --git a/xfa/fxfa/cxfa_ffwidget.h b/xfa/fxfa/cxfa_ffwidget.h
index 0381a0c913..9c6215627d 100644
--- a/xfa/fxfa/cxfa_ffwidget.h
+++ b/xfa/fxfa/cxfa_ffwidget.h
@@ -39,8 +39,7 @@ void XFA_DrawImage(CXFA_Graphics* pGS,
const CFX_Matrix& matrix,
const RetainPtr<CFX_DIBitmap>& pDIBitmap,
XFA_AttributeEnum iAspect,
- int32_t iImageXDpi,
- int32_t iImageYDpi,
+ const CFX_Size& dpi,
XFA_AttributeEnum iHorzAlign = XFA_AttributeEnum::Left,
XFA_AttributeEnum iVertAlign = XFA_AttributeEnum::Top);