From 14ddd425193946692042fcd910857963d333be3b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 20 Jul 2017 11:07:00 -0400 Subject: 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 Reviewed-by: Henrique Nakashima --- fpdfsdk/pdfwindow/cpwl_icon.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'fpdfsdk/pdfwindow/cpwl_icon.cpp') 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; } -- cgit v1.2.3