OLD | NEW |
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_FXGE_FX_DIB_H_ | 7 #ifndef CORE_INCLUDE_FXGE_FX_DIB_H_ |
8 #define CORE_INCLUDE_FXGE_FX_DIB_H_ | 8 #define CORE_INCLUDE_FXGE_FX_DIB_H_ |
9 | 9 |
10 #include "core/include/fxcrt/fx_basic.h" | 10 #include "core/include/fxcrt/fx_basic.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 CFX_DIBitmap* CloneConvert(FXDIB_Format format, | 226 CFX_DIBitmap* CloneConvert(FXDIB_Format format, |
227 const FX_RECT* pClip = NULL, | 227 const FX_RECT* pClip = NULL, |
228 void* pIccTransform = NULL) const; | 228 void* pIccTransform = NULL) const; |
229 | 229 |
230 CFX_DIBitmap* StretchTo(int dest_width, | 230 CFX_DIBitmap* StretchTo(int dest_width, |
231 int dest_height, | 231 int dest_height, |
232 FX_DWORD flags = 0, | 232 FX_DWORD flags = 0, |
233 const FX_RECT* pClip = NULL) const; | 233 const FX_RECT* pClip = NULL) const; |
234 | 234 |
235 CFX_DIBitmap* TransformTo(const CFX_AffineMatrix* pMatrix, | 235 CFX_DIBitmap* TransformTo(const CFX_Matrix* pMatrix, |
236 int& left, | 236 int& left, |
237 int& top, | 237 int& top, |
238 FX_DWORD flags = 0, | 238 FX_DWORD flags = 0, |
239 const FX_RECT* pClip = NULL) const; | 239 const FX_RECT* pClip = NULL) const; |
240 | 240 |
241 CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = NULL) const; | 241 CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = NULL) const; |
242 | 242 |
243 FX_BOOL CopyAlphaMask(const CFX_DIBSource* pAlphaMask, | 243 FX_BOOL CopyAlphaMask(const CFX_DIBSource* pAlphaMask, |
244 const FX_RECT* pClip = NULL); | 244 const FX_RECT* pClip = NULL); |
245 | 245 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 uint8_t* m_pScanline; | 632 uint8_t* m_pScanline; |
633 uint8_t* m_pMaskScanline; | 633 uint8_t* m_pMaskScanline; |
634 FXDIB_Format m_DestFormat; | 634 FXDIB_Format m_DestFormat; |
635 }; | 635 }; |
636 class CFX_ImageTransformer { | 636 class CFX_ImageTransformer { |
637 public: | 637 public: |
638 CFX_ImageTransformer(); | 638 CFX_ImageTransformer(); |
639 ~CFX_ImageTransformer(); | 639 ~CFX_ImageTransformer(); |
640 | 640 |
641 FX_BOOL Start(const CFX_DIBSource* pSrc, | 641 FX_BOOL Start(const CFX_DIBSource* pSrc, |
642 const CFX_AffineMatrix* pMatrix, | 642 const CFX_Matrix* pMatrix, |
643 int flags, | 643 int flags, |
644 const FX_RECT* pClip); | 644 const FX_RECT* pClip); |
645 | 645 |
646 FX_BOOL Continue(IFX_Pause* pPause); | 646 FX_BOOL Continue(IFX_Pause* pPause); |
647 | 647 |
648 CFX_AffineMatrix* m_pMatrix; | 648 CFX_Matrix* m_pMatrix; |
649 FX_RECT m_StretchClip; | 649 FX_RECT m_StretchClip; |
650 int m_ResultLeft; | 650 int m_ResultLeft; |
651 int m_ResultTop; | 651 int m_ResultTop; |
652 int m_ResultWidth; | 652 int m_ResultWidth; |
653 int m_ResultHeight; | 653 int m_ResultHeight; |
654 CFX_AffineMatrix m_dest2stretch; | 654 CFX_Matrix m_dest2stretch; |
655 CFX_ImageStretcher m_Stretcher; | 655 CFX_ImageStretcher m_Stretcher; |
656 CFX_BitmapStorer m_Storer; | 656 CFX_BitmapStorer m_Storer; |
657 FX_DWORD m_Flags; | 657 FX_DWORD m_Flags; |
658 int m_Status; | 658 int m_Status; |
659 }; | 659 }; |
660 class CFX_ImageRenderer { | 660 class CFX_ImageRenderer { |
661 public: | 661 public: |
662 CFX_ImageRenderer(); | 662 CFX_ImageRenderer(); |
663 ~CFX_ImageRenderer(); | 663 ~CFX_ImageRenderer(); |
664 | 664 |
665 FX_BOOL Start(CFX_DIBitmap* pDevice, | 665 FX_BOOL Start(CFX_DIBitmap* pDevice, |
666 const CFX_ClipRgn* pClipRgn, | 666 const CFX_ClipRgn* pClipRgn, |
667 const CFX_DIBSource* pSource, | 667 const CFX_DIBSource* pSource, |
668 int bitmap_alpha, | 668 int bitmap_alpha, |
669 FX_DWORD mask_color, | 669 FX_DWORD mask_color, |
670 const CFX_AffineMatrix* pMatrix, | 670 const CFX_Matrix* pMatrix, |
671 FX_DWORD dib_flags, | 671 FX_DWORD dib_flags, |
672 FX_BOOL bRgbByteOrder = FALSE, | 672 FX_BOOL bRgbByteOrder = FALSE, |
673 int alpha_flag = 0, | 673 int alpha_flag = 0, |
674 void* pIccTransform = NULL, | 674 void* pIccTransform = NULL, |
675 int blend_type = FXDIB_BLEND_NORMAL); | 675 int blend_type = FXDIB_BLEND_NORMAL); |
676 | 676 |
677 FX_BOOL Continue(IFX_Pause* pPause); | 677 FX_BOOL Continue(IFX_Pause* pPause); |
678 | 678 |
679 protected: | 679 protected: |
680 CFX_DIBitmap* m_pDevice; | 680 CFX_DIBitmap* m_pDevice; |
681 const CFX_ClipRgn* m_pClipRgn; | 681 const CFX_ClipRgn* m_pClipRgn; |
682 int m_BitmapAlpha; | 682 int m_BitmapAlpha; |
683 FX_DWORD m_MaskColor; | 683 FX_DWORD m_MaskColor; |
684 CFX_AffineMatrix m_Matrix; | 684 CFX_Matrix m_Matrix; |
685 CFX_ImageTransformer* m_pTransformer; | 685 CFX_ImageTransformer* m_pTransformer; |
686 CFX_ImageStretcher m_Stretcher; | 686 CFX_ImageStretcher m_Stretcher; |
687 CFX_BitmapComposer m_Composer; | 687 CFX_BitmapComposer m_Composer; |
688 int m_Status; | 688 int m_Status; |
689 FX_RECT m_ClipBox; | 689 FX_RECT m_ClipBox; |
690 FX_DWORD m_Flags; | 690 FX_DWORD m_Flags; |
691 int m_AlphaFlag; | 691 int m_AlphaFlag; |
692 void* m_pIccTransform; | 692 void* m_pIccTransform; |
693 FX_BOOL m_bRgbByteOrder; | 693 FX_BOOL m_bRgbByteOrder; |
694 int m_BlendType; | 694 int m_BlendType; |
695 }; | 695 }; |
696 | 696 |
697 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_ | 697 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_ |
OLD | NEW |