summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics/cxfa_graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxgraphics/cxfa_graphics.cpp')
-rw-r--r--xfa/fxgraphics/cxfa_graphics.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp
index 66a109ddaa..47517309b7 100644
--- a/xfa/fxgraphics/cxfa_graphics.cpp
+++ b/xfa/fxgraphics/cxfa_graphics.cpp
@@ -11,6 +11,7 @@
#include "core/fxge/cfx_defaultrenderdevice.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/cfx_unicodeencoding.h"
+#include "core/fxge/dib/cfx_dibitmap.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fxgraphics/cxfa_gecolor.h"
#include "xfa/fxgraphics/cxfa_gepath.h"
@@ -194,15 +195,6 @@ void CXFA_Graphics::FillPath(CXFA_GEPath* path,
RenderDeviceFillPath(path, fillMode, matrix);
}
-void CXFA_Graphics::StretchImage(const RetainPtr<CFX_DIBSource>& source,
- const CFX_RectF& rect,
- const CFX_Matrix& matrix) {
- if (!source)
- return;
- if (m_type == FX_CONTEXT_Device && m_renderDevice)
- RenderDeviceStretchImage(source, rect, matrix);
-}
-
void CXFA_Graphics::ConcatMatrix(const CFX_Matrix* matrix) {
if (!matrix)
return;
@@ -304,31 +296,6 @@ void CXFA_Graphics::RenderDeviceFillPath(const CXFA_GEPath* path,
}
}
-void CXFA_Graphics::RenderDeviceStretchImage(
- const RetainPtr<CFX_DIBSource>& source,
- const CFX_RectF& rect,
- const CFX_Matrix& matrix) {
- CFX_Matrix m1(m_info.CTM.a, m_info.CTM.b, m_info.CTM.c, m_info.CTM.d,
- m_info.CTM.e, m_info.CTM.f);
- m1.Concat(matrix);
-
- RetainPtr<CFX_DIBitmap> bmp1 =
- source->StretchTo(static_cast<int32_t>(rect.Width()),
- static_cast<int32_t>(rect.Height()), 0, nullptr);
- CFX_Matrix m2(rect.Width(), 0.0, 0.0, rect.Height(), rect.left, rect.top);
- m2.Concat(m1);
-
- int32_t left;
- int32_t top;
- RetainPtr<CFX_DIBitmap> bmp2 = bmp1->FlipImage(false, true);
- RetainPtr<CFX_DIBitmap> bmp3 = bmp2->TransformTo(&m2, &left, &top);
- CFX_RectF r = GetClipRect();
- RetainPtr<CFX_DIBitmap> bitmap = m_renderDevice->GetBitmap();
- bitmap->CompositeBitmap(FXSYS_round(r.left), FXSYS_round(r.top),
- FXSYS_round(r.Width()), FXSYS_round(r.Height()), bmp3,
- FXSYS_round(r.left - left), FXSYS_round(r.top - top));
-}
-
void CXFA_Graphics::FillPathWithPattern(const CXFA_GEPath* path,
FX_FillMode fillMode,
const CFX_Matrix& matrix) {