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

Side by Side Diff: core/include/fpdfapi/fpdf_pageobj.h

Issue 1088733002: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase. Created 5 years, 8 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
« no previous file with comments | « core/include/fpdfapi/fpdf_page.h ('k') | core/include/fpdfapi/fpdf_parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FPDF_PAGEOBJ_H_ 7 #ifndef _FPDF_PAGEOBJ_H_
8 #define _FPDF_PAGEOBJ_H_ 8 #define _FPDF_PAGEOBJ_H_
9 #ifndef _FPDF_RESOURCE_ 9 #ifndef _FPDF_RESOURCE_
10 #include "fpdf_resource.h" 10 #include "fpdf_resource.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void AppendRect(FX_FLOAT left, FX_FLOAT botto m, FX_FLOAT right, FX_FLOAT top) 92 void AppendRect(FX_FLOAT left, FX_FLOAT botto m, FX_FLOAT right, FX_FLOAT top)
93 { 93 {
94 m_pObject->AppendRect(left, bottom, right, top); 94 m_pObject->AppendRect(left, bottom, right, top);
95 } 95 }
96 96
97 FX_BOOL IsRect() const 97 FX_BOOL IsRect() const
98 { 98 {
99 return m_pObject->IsRect(); 99 return m_pObject->IsRect();
100 } 100 }
101 }; 101 };
102 class CPDF_ClipPathData : public CFX_Object 102 class CPDF_ClipPathData
103 { 103 {
104 public: 104 public:
105 105
106 CPDF_ClipPathData(); 106 CPDF_ClipPathData();
107 107
108 CPDF_ClipPathData(const CPDF_ClipPathData&); 108 CPDF_ClipPathData(const CPDF_ClipPathData&);
109 109
110 ~CPDF_ClipPathData(); 110 ~CPDF_ClipPathData();
111 111
112 void SetCount(int path_count, int text_count) ; 112 void SetCount(int path_count, int text_count) ;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 CFX_FloatRect GetClipBox() const; 154 CFX_FloatRect GetClipBox() const;
155 155
156 void AppendPath(CPDF_Path path, int type, FX_ BOOL bAutoMerge); 156 void AppendPath(CPDF_Path path, int type, FX_ BOOL bAutoMerge);
157 157
158 void DeletePath(int layer_index); 158 void DeletePath(int layer_index);
159 159
160 void AppendTexts(CPDF_TextObject** pTexts, in t count); 160 void AppendTexts(CPDF_TextObject** pTexts, in t count);
161 161
162 void Transform(const CFX_AffineMatrix& matrix ); 162 void Transform(const CFX_AffineMatrix& matrix );
163 }; 163 };
164 class CPDF_ColorStateData : public CFX_Object 164 class CPDF_ColorStateData
165 { 165 {
166 public: 166 public:
167 167
168 CPDF_ColorStateData(): m_FillRGB(0), m_StrokeRGB(0) {} 168 CPDF_ColorStateData(): m_FillRGB(0), m_StrokeRGB(0) {}
169 169
170 CPDF_ColorStateData(const CPDF_ColorStateData& src); 170 CPDF_ColorStateData(const CPDF_ColorStateData& src);
171 171
172 void Default(); 172 void Default();
173 173
174 CPDF_Color m_FillColor; 174 CPDF_Color m_FillColor;
(...skipping 26 matching lines...) Expand all
201 201
202 void SetStrokePattern(CPDF_Pattern* pattern, FX_FLOAT* pValue, int nValues); 202 void SetStrokePattern(CPDF_Pattern* pattern, FX_FLOAT* pValue, int nValues);
203 private: 203 private:
204 void SetColor(CPDF_Color& color, FX_DWORD& rg b, CPDF_ColorSpace* pCS, FX_FLOAT* pValue, int nValues); 204 void SetColor(CPDF_Color& color, FX_DWORD& rg b, CPDF_ColorSpace* pCS, FX_FLOAT* pValue, int nValues);
205 }; 205 };
206 typedef CFX_GraphStateData CPDF_GraphStateData; 206 typedef CFX_GraphStateData CPDF_GraphStateData;
207 class CPDF_GraphState : public CFX_CountRef<CFX_GraphStateData> 207 class CPDF_GraphState : public CFX_CountRef<CFX_GraphStateData>
208 { 208 {
209 public: 209 public:
210 }; 210 };
211 class CPDF_TextStateData : public CFX_Object 211 class CPDF_TextStateData
212 { 212 {
213 public: 213 public:
214 214
215 CPDF_TextStateData(); 215 CPDF_TextStateData();
216 216
217 CPDF_TextStateData(const CPDF_TextStateData& src); 217 CPDF_TextStateData(const CPDF_TextStateData& src);
218 218
219 ~CPDF_TextStateData(); 219 ~CPDF_TextStateData();
220 220
221 CPDF_Font* m_pFont; 221 CPDF_Font* m_pFont;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 FX_FLOAT GetFontSizeV() const; 260 FX_FLOAT GetFontSizeV() const;
261 261
262 FX_FLOAT GetFontSizeH() const; 262 FX_FLOAT GetFontSizeH() const;
263 263
264 FX_FLOAT GetBaselineAngle() const; 264 FX_FLOAT GetBaselineAngle() const;
265 265
266 FX_FLOAT GetShearAngle() const; 266 FX_FLOAT GetShearAngle() const;
267 267
268 }; 268 };
269 class CPDF_TransferFunc; 269 class CPDF_TransferFunc;
270 class CPDF_GeneralStateData : public CFX_Object 270 class CPDF_GeneralStateData
271 { 271 {
272 public: 272 public:
273 273
274 CPDF_GeneralStateData(); 274 CPDF_GeneralStateData();
275 275
276 CPDF_GeneralStateData(const CPDF_GeneralStateData& src); 276 CPDF_GeneralStateData(const CPDF_GeneralStateData& src);
277 ~CPDF_GeneralStateData(); 277 ~CPDF_GeneralStateData();
278 278
279 void SetBlendMode(FX_BSTR blend_mode); 279 void SetBlendMode(FX_BSTR blend_mode);
280 280
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 int GetBlendType() const 329 int GetBlendType() const
330 { 330 {
331 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL; 331 return m_pObject ? m_pObject->m_BlendType : FXDIB_BLEND_NORMAL;
332 } 332 }
333 333
334 int GetAlpha(FX_BOOL bStroke) const 334 int GetAlpha(FX_BOOL bStroke) const
335 { 335 {
336 return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_p Object->m_FillAlpha) * 255) : 255; 336 return m_pObject ? FXSYS_round((bStroke ? m_pObject->m_StrokeAlpha : m_p Object->m_FillAlpha) * 255) : 255;
337 } 337 }
338 }; 338 };
339 class CPDF_ContentMarkItem : public CFX_Object 339 class CPDF_ContentMarkItem
340 { 340 {
341 public: 341 public:
342 342
343 typedef enum { 343 typedef enum {
344 None, 344 None,
345 PropertiesDict, 345 PropertiesDict,
346 DirectDict, 346 DirectDict,
347 MCID 347 MCID
348 } ParamType; 348 } ParamType;
349 349
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 m_pParam = param; 381 m_pParam = param;
382 } 382 }
383 private: 383 private:
384 384
385 CFX_ByteString m_MarkName; 385 CFX_ByteString m_MarkName;
386 386
387 ParamType m_ParamType; 387 ParamType m_ParamType;
388 388
389 void* m_pParam; 389 void* m_pParam;
390 }; 390 };
391 class CPDF_ContentMarkData : public CFX_Object 391 class CPDF_ContentMarkData
392 { 392 {
393 public: 393 public:
394 394
395 CPDF_ContentMarkData() { } 395 CPDF_ContentMarkData() { }
396 396
397 CPDF_ContentMarkData(const CPDF_ContentMarkData& src); 397 CPDF_ContentMarkData(const CPDF_ContentMarkData& src);
398 398
399 inline int CountItems() const 399 inline int CountItems() const
400 { 400 {
401 return m_Marks.GetSize(); 401 return m_Marks.GetSize();
(...skipping 25 matching lines...) Expand all
427 FX_BOOL HasMark(FX_BSTR mark) const; 427 FX_BOOL HasMark(FX_BSTR mark) const;
428 428
429 FX_BOOL LookupMark(FX_BSTR mark, CPDF_Dictionary *& pDict) const; 429 FX_BOOL LookupMark(FX_BSTR mark, CPDF_Dictionary *& pDict) const;
430 }; 430 };
431 #define PDFPAGE_TEXT 1 431 #define PDFPAGE_TEXT 1
432 #define PDFPAGE_PATH 2 432 #define PDFPAGE_PATH 2
433 #define PDFPAGE_IMAGE 3 433 #define PDFPAGE_IMAGE 3
434 #define PDFPAGE_SHADING 4 434 #define PDFPAGE_SHADING 4
435 #define PDFPAGE_FORM 5 435 #define PDFPAGE_FORM 5
436 #define PDFPAGE_INLINES 6 436 #define PDFPAGE_INLINES 6
437 class CPDF_GraphicStates : public CFX_Object 437 class CPDF_GraphicStates
438 { 438 {
439 public: 439 public:
440 440
441 void CopyStates(const CPDF_GraphicStates& src ); 441 void CopyStates(const CPDF_GraphicStates& src );
442 442
443 void DefaultStates(); 443 void DefaultStates();
444 444
445 CPDF_ClipPath m_ClipPath; 445 CPDF_ClipPath m_ClipPath;
446 446
447 CPDF_GraphState m_GraphState; 447 CPDF_GraphState m_GraphState;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 protected: 500 protected:
501 501
502 virtual void CopyData(const CPDF_PageObject* pSrcObject) {} 502 virtual void CopyData(const CPDF_PageObject* pSrcObject) {}
503 503
504 void RecalcBBox(); 504 void RecalcBBox();
505 505
506 CPDF_PageObject() {} 506 CPDF_PageObject() {}
507 507
508 virtual ~CPDF_PageObject() {} 508 virtual ~CPDF_PageObject() {}
509 }; 509 };
510 struct CPDF_TextObjectItem : public CFX_Object { 510 struct CPDF_TextObjectItem {
511 511
512 FX_DWORD m_CharCode; 512 FX_DWORD m_CharCode;
513 513
514 FX_FLOAT m_OriginX; 514 FX_FLOAT m_OriginX;
515 515
516 FX_FLOAT m_OriginY; 516 FX_FLOAT m_OriginY;
517 }; 517 };
518 class CPDF_TextObject : public CPDF_PageObject 518 class CPDF_TextObject : public CPDF_PageObject
519 { 519 {
520 public: 520 public:
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 CFX_DIBitmap* m_pBitmap; 714 CFX_DIBitmap* m_pBitmap;
715 715
716 CFX_ArrayTemplate<CFX_AffineMatrix> m_Matrices; 716 CFX_ArrayTemplate<CFX_AffineMatrix> m_Matrices;
717 717
718 void AddMatrix(CFX_AffineMatrix& matrix); 718 void AddMatrix(CFX_AffineMatrix& matrix);
719 protected: 719 protected:
720 virtual void Transform(const CFX_AffineMatrix& matrix) {} 720 virtual void Transform(const CFX_AffineMatrix& matrix) {}
721 virtual void CopyData(const CPDF_PageObject* pSrcObjet) {} 721 virtual void CopyData(const CPDF_PageObject* pSrcObjet) {}
722 }; 722 };
723 #endif 723 #endif
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_page.h ('k') | core/include/fpdfapi/fpdf_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698