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

Side by Side Diff: core/fpdfapi/fpdf_page/include/cpdf_pageobject.h

Issue 2379033002: Move core/fpdfapi/fpdf_page/include to core/fpdfapi/fpdf_page (Closed)
Patch Set: Header sort Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
9
10 #include "core/fpdfapi/fpdf_page/cpdf_contentmark.h"
11 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h"
12 #include "core/fxcrt/include/fx_coordinates.h"
13 #include "core/fxcrt/include/fx_system.h"
14
15 class CPDF_TextObject;
16 class CPDF_PathObject;
17 class CPDF_ImageObject;
18 class CPDF_ShadingObject;
19 class CPDF_FormObject;
20
21 class CPDF_PageObject : public CPDF_GraphicStates {
22 public:
23 enum Type {
24 TEXT = 1,
25 PATH,
26 IMAGE,
27 SHADING,
28 FORM,
29 };
30
31 CPDF_PageObject();
32 ~CPDF_PageObject() override;
33
34 virtual CPDF_PageObject* Clone() const = 0;
35 virtual Type GetType() const = 0;
36 virtual void Transform(const CFX_Matrix& matrix) = 0;
37 virtual bool IsText() const;
38 virtual bool IsPath() const;
39 virtual bool IsImage() const;
40 virtual bool IsShading() const;
41 virtual bool IsForm() const;
42 virtual CPDF_TextObject* AsText();
43 virtual const CPDF_TextObject* AsText() const;
44 virtual CPDF_PathObject* AsPath();
45 virtual const CPDF_PathObject* AsPath() const;
46 virtual CPDF_ImageObject* AsImage();
47 virtual const CPDF_ImageObject* AsImage() const;
48 virtual CPDF_ShadingObject* AsShading();
49 virtual const CPDF_ShadingObject* AsShading() const;
50 virtual CPDF_FormObject* AsForm();
51 virtual const CPDF_FormObject* AsForm() const;
52
53 void TransformClipPath(CFX_Matrix& matrix);
54 void TransformGeneralState(CFX_Matrix& matrix);
55 FX_RECT GetBBox(const CFX_Matrix* pMatrix) const;
56
57 FX_FLOAT m_Left;
58 FX_FLOAT m_Right;
59 FX_FLOAT m_Top;
60 FX_FLOAT m_Bottom;
61 CPDF_ContentMark m_ContentMark;
62
63 protected:
64 void CopyData(const CPDF_PageObject* pSrcObject);
65
66 private:
67 CPDF_PageObject(const CPDF_PageObject& src) = delete;
68 void operator=(const CPDF_PageObject& src) = delete;
69 };
70
71 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGEOBJECT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_page.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698