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

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

Issue 1513363002: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 5 years 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_render.h ('k') | core/include/fpdfdoc/fpdf_doc.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_RESOURCE_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 // Takes ownership of |pForm|. 370 // Takes ownership of |pForm|.
371 explicit CPDF_Type3Char(CPDF_Form* pForm); 371 explicit CPDF_Type3Char(CPDF_Form* pForm);
372 ~CPDF_Type3Char(); 372 ~CPDF_Type3Char();
373 373
374 FX_BOOL LoadBitmap(CPDF_RenderContext* pContext); 374 FX_BOOL LoadBitmap(CPDF_RenderContext* pContext);
375 375
376 CPDF_Form* m_pForm; 376 CPDF_Form* m_pForm;
377 CFX_DIBitmap* m_pBitmap; 377 CFX_DIBitmap* m_pBitmap;
378 FX_BOOL m_bColored; 378 FX_BOOL m_bColored;
379 int m_Width; 379 int m_Width;
380 CFX_AffineMatrix m_ImageMatrix; 380 CFX_Matrix m_ImageMatrix;
381 FX_RECT m_BBox; 381 FX_RECT m_BBox;
382 }; 382 };
383 383
384 class CPDF_Type3Font : public CPDF_SimpleFont { 384 class CPDF_Type3Font : public CPDF_SimpleFont {
385 public: 385 public:
386 CPDF_Type3Font(); 386 CPDF_Type3Font();
387 ~CPDF_Type3Font() override; 387 ~CPDF_Type3Font() override;
388 388
389 void SetPageResources(CPDF_Dictionary* pResources) { 389 void SetPageResources(CPDF_Dictionary* pResources) {
390 m_pPageResources = pResources; 390 m_pPageResources = pResources;
391 } 391 }
392 CPDF_Type3Char* LoadChar(FX_DWORD charcode, int level = 0); 392 CPDF_Type3Char* LoadChar(FX_DWORD charcode, int level = 0);
393 int GetCharWidthF(FX_DWORD charcode, int level = 0) override; 393 int GetCharWidthF(FX_DWORD charcode, int level = 0) override;
394 int GetCharTypeWidth(FX_DWORD charcode) override { 394 int GetCharTypeWidth(FX_DWORD charcode) override {
395 return GetCharWidthF(charcode); 395 return GetCharWidthF(charcode);
396 } 396 }
397 void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override; 397 void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override;
398 CFX_AffineMatrix& GetFontMatrix() { return m_FontMatrix; } 398 CFX_Matrix& GetFontMatrix() { return m_FontMatrix; }
399 void CheckType3FontMetrics(); 399 void CheckType3FontMetrics();
400 400
401 protected: 401 protected:
402 CFX_AffineMatrix m_FontMatrix; 402 CFX_Matrix m_FontMatrix;
403 403
404 private: 404 private:
405 FX_BOOL _Load() override; 405 FX_BOOL _Load() override;
406 void LoadGlyphMap() override {} 406 void LoadGlyphMap() override {}
407 407
408 int m_CharWidthL[256]; 408 int m_CharWidthL[256];
409 CPDF_Dictionary* m_pCharProcs; 409 CPDF_Dictionary* m_pCharProcs;
410 CPDF_Dictionary* m_pPageResources; 410 CPDF_Dictionary* m_pPageResources;
411 CPDF_Dictionary* m_pFontResources; 411 CPDF_Dictionary* m_pFontResources;
412 std::map<FX_DWORD, CPDF_Type3Char*> m_CacheMap; 412 std::map<FX_DWORD, CPDF_Type3Char*> m_CacheMap;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 #define PATTERN_SHADING 2 640 #define PATTERN_SHADING 2
641 class CPDF_Pattern { 641 class CPDF_Pattern {
642 public: 642 public:
643 virtual ~CPDF_Pattern(); 643 virtual ~CPDF_Pattern();
644 void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; } 644 void SetForceClear(FX_BOOL bForceClear) { m_bForceClear = bForceClear; }
645 645
646 CPDF_Object* m_pPatternObj; 646 CPDF_Object* m_pPatternObj;
647 647
648 int m_PatternType; 648 int m_PatternType;
649 649
650 CFX_AffineMatrix m_Pattern2Form; 650 CFX_Matrix m_Pattern2Form;
651 CFX_AffineMatrix m_ParentMatrix; 651 CFX_Matrix m_ParentMatrix;
652 652
653 CPDF_Document* m_pDocument; 653 CPDF_Document* m_pDocument;
654 654
655 protected: 655 protected:
656 CPDF_Pattern(const CFX_AffineMatrix* pParentMatrix); 656 CPDF_Pattern(const CFX_Matrix* pParentMatrix);
657 FX_BOOL m_bForceClear; 657 FX_BOOL m_bForceClear;
658 }; 658 };
659 659
660 class CPDF_TilingPattern : public CPDF_Pattern { 660 class CPDF_TilingPattern : public CPDF_Pattern {
661 public: 661 public:
662 CPDF_TilingPattern(CPDF_Document* pDoc, 662 CPDF_TilingPattern(CPDF_Document* pDoc,
663 CPDF_Object* pPatternObj, 663 CPDF_Object* pPatternObj,
664 const CFX_AffineMatrix* parentMatrix); 664 const CFX_Matrix* parentMatrix);
665 665
666 ~CPDF_TilingPattern() override; 666 ~CPDF_TilingPattern() override;
667 667
668 FX_BOOL Load(); 668 FX_BOOL Load();
669 669
670 FX_BOOL m_bColored; 670 FX_BOOL m_bColored;
671 671
672 CFX_FloatRect m_BBox; 672 CFX_FloatRect m_BBox;
673 673
674 FX_FLOAT m_XStep; 674 FX_FLOAT m_XStep;
(...skipping 13 matching lines...) Expand all
688 kCoonsPatchMeshShading = 6, 688 kCoonsPatchMeshShading = 6,
689 kTensorProductPatchMeshShading = 7, 689 kTensorProductPatchMeshShading = 7,
690 kMaxShading = 8 690 kMaxShading = 8
691 } ShadingType; 691 } ShadingType;
692 692
693 class CPDF_ShadingPattern : public CPDF_Pattern { 693 class CPDF_ShadingPattern : public CPDF_Pattern {
694 public: 694 public:
695 CPDF_ShadingPattern(CPDF_Document* pDoc, 695 CPDF_ShadingPattern(CPDF_Document* pDoc,
696 CPDF_Object* pPatternObj, 696 CPDF_Object* pPatternObj,
697 FX_BOOL bShading, 697 FX_BOOL bShading,
698 const CFX_AffineMatrix* parentMatrix); 698 const CFX_Matrix* parentMatrix);
699 699
700 ~CPDF_ShadingPattern() override; 700 ~CPDF_ShadingPattern() override;
701 701
702 bool IsMeshShading() const { 702 bool IsMeshShading() const {
703 return m_ShadingType == kFreeFormGouraudTriangleMeshShading || 703 return m_ShadingType == kFreeFormGouraudTriangleMeshShading ||
704 m_ShadingType == kLatticeFormGouraudTriangleMeshShading || 704 m_ShadingType == kLatticeFormGouraudTriangleMeshShading ||
705 m_ShadingType == kCoonsPatchMeshShading || 705 m_ShadingType == kCoonsPatchMeshShading ||
706 m_ShadingType == kTensorProductPatchMeshShading; 706 m_ShadingType == kTensorProductPatchMeshShading;
707 } 707 }
708 708
(...skipping 30 matching lines...) Expand all
739 CPDF_Function** pFuncs, 739 CPDF_Function** pFuncs,
740 int nFuncs, 740 int nFuncs,
741 CPDF_ColorSpace* pCS); 741 CPDF_ColorSpace* pCS);
742 742
743 FX_DWORD GetFlag(); 743 FX_DWORD GetFlag();
744 744
745 void GetCoords(FX_FLOAT& x, FX_FLOAT& y); 745 void GetCoords(FX_FLOAT& x, FX_FLOAT& y);
746 746
747 void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b); 747 void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b);
748 748
749 FX_DWORD GetVertex(CPDF_MeshVertex& vertex, CFX_AffineMatrix* pObject2Bitmap); 749 FX_DWORD GetVertex(CPDF_MeshVertex& vertex, CFX_Matrix* pObject2Bitmap);
750 750
751 FX_BOOL GetVertexRow(CPDF_MeshVertex* vertex, 751 FX_BOOL GetVertexRow(CPDF_MeshVertex* vertex,
752 int count, 752 int count,
753 CFX_AffineMatrix* pObject2Bitmap); 753 CFX_Matrix* pObject2Bitmap);
754 CPDF_Function** m_pFuncs; 754 CPDF_Function** m_pFuncs;
755 CPDF_ColorSpace* m_pCS; 755 CPDF_ColorSpace* m_pCS;
756 FX_DWORD m_nFuncs, m_nCoordBits, m_nCompBits, m_nFlagBits, m_nComps; 756 FX_DWORD m_nFuncs, m_nCoordBits, m_nCompBits, m_nFlagBits, m_nComps;
757 FX_DWORD m_CoordMax, m_CompMax; 757 FX_DWORD m_CoordMax, m_CompMax;
758 FX_FLOAT m_xmin, m_xmax, m_ymin, m_ymax; 758 FX_FLOAT m_xmin, m_xmax, m_ymin, m_ymax;
759 FX_FLOAT m_ColorMin[8], m_ColorMax[8]; 759 FX_FLOAT m_ColorMin[8], m_ColorMax[8];
760 CPDF_StreamAcc m_Stream; 760 CPDF_StreamAcc m_Stream;
761 CFX_BitStream m_BitStream; 761 CFX_BitStream m_BitStream;
762 }; 762 };
763 #define PDF_IMAGE_NO_COMPRESS 0x0000 763 #define PDF_IMAGE_NO_COMPRESS 0x0000
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 852
853 FX_BOOL m_bInterpolate; 853 FX_BOOL m_bInterpolate;
854 854
855 CPDF_Document* m_pDocument; 855 CPDF_Document* m_pDocument;
856 856
857 CPDF_Dictionary* m_pOC; 857 CPDF_Dictionary* m_pOC;
858 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); 858 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size);
859 }; 859 };
860 860
861 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 861 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_render.h ('k') | core/include/fpdfdoc/fpdf_doc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698