Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Unified Diff: core/fpdfapi/fpdf_page/include/cpdf_pageobject.h

Issue 1811053002: Move core/include/fpdfapi/fpdf_pageobj.h into core/fpdfapi. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_page.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/include/cpdf_pageobject.h
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h b/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h
new file mode 100644
index 0000000000000000000000000000000000000000..2f55547b4716c048e58f71a41ba22558d869f7a4
--- /dev/null
+++ b/core/fpdfapi/fpdf_page/include/cpdf_pageobject.h
@@ -0,0 +1,71 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
+#define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
+
+#include "core/fpdfapi/fpdf_page/cpdf_contentmark.h"
+#include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h"
+#include "core/include/fxcrt/fx_coordinates.h"
+#include "core/include/fxcrt/fx_system.h"
+
+class CPDF_TextObject;
+class CPDF_PathObject;
+class CPDF_ImageObject;
+class CPDF_ShadingObject;
+class CPDF_FormObject;
+
+class CPDF_PageObject : public CPDF_GraphicStates {
+ public:
+ enum Type {
+ TEXT = 1,
+ PATH,
+ IMAGE,
+ SHADING,
+ FORM,
+ };
+
+ CPDF_PageObject();
+ virtual ~CPDF_PageObject();
+
+ virtual CPDF_PageObject* Clone() const = 0;
+ virtual Type GetType() const = 0;
+ virtual void Transform(const CFX_Matrix& matrix) = 0;
+ virtual bool IsText() const { return false; }
+ virtual bool IsPath() const { return false; }
+ virtual bool IsImage() const { return false; }
+ virtual bool IsShading() const { return false; }
+ virtual bool IsForm() const { return false; }
+ virtual CPDF_TextObject* AsText() { return nullptr; }
+ virtual const CPDF_TextObject* AsText() const { return nullptr; }
+ virtual CPDF_PathObject* AsPath() { return nullptr; }
+ virtual const CPDF_PathObject* AsPath() const { return nullptr; }
+ virtual CPDF_ImageObject* AsImage() { return nullptr; }
+ virtual const CPDF_ImageObject* AsImage() const { return nullptr; }
+ virtual CPDF_ShadingObject* AsShading() { return nullptr; }
+ virtual const CPDF_ShadingObject* AsShading() const { return nullptr; }
+ virtual CPDF_FormObject* AsForm() { return nullptr; }
+ virtual const CPDF_FormObject* AsForm() const { return nullptr; }
+
+ void TransformClipPath(CFX_Matrix& matrix);
+ void TransformGeneralState(CFX_Matrix& matrix);
+ FX_RECT GetBBox(const CFX_Matrix* pMatrix) const;
+
+ FX_FLOAT m_Left;
+ FX_FLOAT m_Right;
+ FX_FLOAT m_Top;
+ FX_FLOAT m_Bottom;
+ CPDF_ContentMark m_ContentMark;
+
+ protected:
+ void CopyData(const CPDF_PageObject* pSrcObject);
+
+ private:
+ CPDF_PageObject(const CPDF_PageObject& src) = delete;
+ void operator=(const CPDF_PageObject& src) = delete;
+};
+
+#endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_page.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698