summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_icon.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-20 11:07:00 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-20 15:33:39 +0000
commit14ddd425193946692042fcd910857963d333be3b (patch)
treef287d1e2f5e41545e29a75fd32188d02862a5b81 /fpdfsdk/pdfwindow/cpwl_icon.cpp
parent2c4a805ac3d649caf34b125fdda1450c7ba8432f (diff)
downloadpdfium-14ddd425193946692042fcd910857963d333be3b.tar.xz
Consolidate Appearance Stream code in CPWL_AppStream.
This CL moves the remaining appearance stream code to CPWL_AppStream. The unused GetThisAppearanceStream methods have been removed. Change-Id: I0bdfbb11962ee7975394a40a1ea45d076ee9151d Reviewed-on: https://pdfium-review.googlesource.com/8312 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_icon.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_icon.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_icon.cpp b/fpdfsdk/pdfwindow/cpwl_icon.cpp
index ebf3b4fc12..d2f2e5fb93 100644
--- a/fpdfsdk/pdfwindow/cpwl_icon.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_icon.cpp
@@ -11,46 +11,12 @@
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
-#include "fpdfsdk/pdfwindow/cpwl_utils.h"
#include "fpdfsdk/pdfwindow/cpwl_wnd.h"
CPWL_Image::CPWL_Image() : m_pPDFStream(nullptr) {}
CPWL_Image::~CPWL_Image() {}
-CFX_ByteString CPWL_Image::GetImageAppStream() {
- std::ostringstream sAppStream;
-
- CFX_ByteString sAlias = GetImageAlias();
- CFX_FloatRect rcPlate = GetClientRect();
- CFX_Matrix mt = GetImageMatrix().GetInverse();
-
- float fHScale = 1.0f;
- float fVScale = 1.0f;
- GetScale(fHScale, fVScale);
-
- float fx = 0.0f;
- float fy = 0.0f;
- GetImageOffset(fx, fy);
-
- if (m_pPDFStream && sAlias.GetLength() > 0) {
- sAppStream << "q\n";
- sAppStream << rcPlate.left << " " << rcPlate.bottom << " "
- << rcPlate.right - rcPlate.left << " "
- << rcPlate.top - rcPlate.bottom << " re W n\n";
-
- sAppStream << fHScale << " 0 0 " << fVScale << " " << rcPlate.left + fx
- << " " << rcPlate.bottom + fy << " cm\n";
- sAppStream << mt.a << " " << mt.b << " " << mt.c << " " << mt.d << " "
- << mt.e << " " << mt.f << " cm\n";
-
- sAppStream << "0 g 0 G 1 w /" << sAlias << " Do\n"
- << "Q\n";
- }
-
- return CFX_ByteString(sAppStream);
-}
-
void CPWL_Image::SetPDFStream(CPDF_Stream* pStream) {
m_pPDFStream = pStream;
}