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

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

Issue 1292613003: Use override in more classes in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 5 years, 4 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 | « no previous file | 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 CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_
9 9
10 #include "../fxge/fx_ge.h" 10 #include "../fxge/fx_ge.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 FX_FLOAT right, 63 FX_FLOAT right,
64 FX_FLOAT top) { 64 FX_FLOAT top) {
65 m_pObject->AppendRect(left, bottom, right, top); 65 m_pObject->AppendRect(left, bottom, right, top);
66 } 66 }
67 67
68 FX_BOOL IsRect() const { return m_pObject->IsRect(); } 68 FX_BOOL IsRect() const { return m_pObject->IsRect(); }
69 }; 69 };
70 class CPDF_ClipPathData { 70 class CPDF_ClipPathData {
71 public: 71 public:
72 CPDF_ClipPathData(); 72 CPDF_ClipPathData();
73
74 CPDF_ClipPathData(const CPDF_ClipPathData&); 73 CPDF_ClipPathData(const CPDF_ClipPathData&);
75
76 ~CPDF_ClipPathData(); 74 ~CPDF_ClipPathData();
77 75
78 void SetCount(int path_count, int text_count); 76 void SetCount(int path_count, int text_count);
79 77
80 public: 78 public:
81 int m_PathCount; 79 int m_PathCount;
82 80
83 CPDF_Path* m_pPathList; 81 CPDF_Path* m_pPathList;
84 82
85 uint8_t* m_pTypeList; 83 uint8_t* m_pTypeList;
86 84
87 int m_TextCount; 85 int m_TextCount;
88 86
89 CPDF_TextObject** m_pTextList; 87 CPDF_TextObject** m_pTextList;
90 }; 88 };
89
91 class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> { 90 class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> {
92 public: 91 public:
93 FX_DWORD GetPathCount() const { return m_pObject->m_PathCount; } 92 FX_DWORD GetPathCount() const { return m_pObject->m_PathCount; }
94 93
95 CPDF_Path GetPath(int i) const { return m_pObject->m_pPathList[i]; } 94 CPDF_Path GetPath(int i) const { return m_pObject->m_pPathList[i]; }
96 95
97 int GetClipType(int i) const { return m_pObject->m_pTypeList[i]; } 96 int GetClipType(int i) const { return m_pObject->m_pTypeList[i]; }
98 97
99 FX_DWORD GetTextCount() const { return m_pObject->m_TextCount; } 98 FX_DWORD GetTextCount() const { return m_pObject->m_TextCount; }
100 99
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 int m_nChars; 484 int m_nChars;
486 485
487 FX_DWORD* m_pCharCodes; 486 FX_DWORD* m_pCharCodes;
488 487
489 FX_FLOAT* m_pCharPos; 488 FX_FLOAT* m_pCharPos;
490 }; 489 };
491 490
492 class CPDF_PathObject : public CPDF_PageObject { 491 class CPDF_PathObject : public CPDF_PageObject {
493 public: 492 public:
494 CPDF_PathObject() { m_Type = PDFPAGE_PATH; } 493 CPDF_PathObject() { m_Type = PDFPAGE_PATH; }
494 ~CPDF_PathObject() override {}
495 495
496 virtual ~CPDF_PathObject() {}
497 void Transform(const CFX_AffineMatrix& maxtrix) override; 496 void Transform(const CFX_AffineMatrix& maxtrix) override;
498 497
499 void SetGraphState(CPDF_GraphState GraphState); 498 void SetGraphState(CPDF_GraphState GraphState);
500 499
500 void CalcBoundingBox();
501
501 CPDF_Path m_Path; 502 CPDF_Path m_Path;
502 503
503 int m_FillType; 504 int m_FillType;
504 505
505 FX_BOOL m_bStroke; 506 FX_BOOL m_bStroke;
506 507
507 CFX_AffineMatrix m_Matrix; 508 CFX_AffineMatrix m_Matrix;
508 509
509 void CalcBoundingBox();
510
511 protected: 510 protected:
512 void CopyData(const CPDF_PageObject* pSrcObject) override; 511 void CopyData(const CPDF_PageObject* pSrcObject) override;
513 }; 512 };
514 513
515 class CPDF_ImageObject : public CPDF_PageObject { 514 class CPDF_ImageObject : public CPDF_PageObject {
516 public: 515 public:
517 CPDF_ImageObject(); 516 CPDF_ImageObject();
517 ~CPDF_ImageObject() override;
518 518
519 virtual ~CPDF_ImageObject();
520 void Transform(const CFX_AffineMatrix& matrix) override; 519 void Transform(const CFX_AffineMatrix& matrix) override;
521 520
522 CPDF_Image* m_pImage; 521 CPDF_Image* m_pImage;
523 522
524 CFX_AffineMatrix m_Matrix; 523 CFX_AffineMatrix m_Matrix;
525 524
526 void CalcBoundingBox(); 525 void CalcBoundingBox();
527 526
528 private: 527 private:
529 void CopyData(const CPDF_PageObject* pSrcObject) override; 528 void CopyData(const CPDF_PageObject* pSrcObject) override;
530 }; 529 };
531 530
532 class CPDF_ShadingObject : public CPDF_PageObject { 531 class CPDF_ShadingObject : public CPDF_PageObject {
533 public: 532 public:
534 CPDF_ShadingObject(); 533 CPDF_ShadingObject();
535 534 ~CPDF_ShadingObject() override;
536 virtual ~CPDF_ShadingObject();
537 535
538 CPDF_ShadingPattern* m_pShading; 536 CPDF_ShadingPattern* m_pShading;
539 537
540 CFX_AffineMatrix m_Matrix; 538 CFX_AffineMatrix m_Matrix;
541 539
542 void Transform(const CFX_AffineMatrix& matrix) override; 540 void Transform(const CFX_AffineMatrix& matrix) override;
543 541
544 void CalcBoundingBox(); 542 void CalcBoundingBox();
545 543
546 protected: 544 protected:
547 void CopyData(const CPDF_PageObject* pSrcObject) override; 545 void CopyData(const CPDF_PageObject* pSrcObject) override;
548 }; 546 };
549 547
550 class CPDF_FormObject : public CPDF_PageObject { 548 class CPDF_FormObject : public CPDF_PageObject {
551 public: 549 public:
552 CPDF_FormObject() { 550 CPDF_FormObject() {
553 m_Type = PDFPAGE_FORM; 551 m_Type = PDFPAGE_FORM;
554 m_pForm = NULL; 552 m_pForm = NULL;
555 } 553 }
554 ~CPDF_FormObject() override;
556 555
557 virtual ~CPDF_FormObject();
558 void Transform(const CFX_AffineMatrix& matrix) override; 556 void Transform(const CFX_AffineMatrix& matrix) override;
559 557
560 CPDF_Form* m_pForm; 558 CPDF_Form* m_pForm;
561 559
562 CFX_AffineMatrix m_FormMatrix; 560 CFX_AffineMatrix m_FormMatrix;
563 561
564 void CalcBoundingBox(); 562 void CalcBoundingBox();
565 563
566 protected: 564 protected:
567 void CopyData(const CPDF_PageObject* pSrcObject) override; 565 void CopyData(const CPDF_PageObject* pSrcObject) override;
568 }; 566 };
569 567
570 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_ 568 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PAGEOBJ_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fpdfapi/fpdf_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698