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 "../fxcrt/fx_basic.h" | 10 #include "../fxcrt/fx_basic.h" |
(...skipping 500 matching lines...) Loading... |
511 CFX_DIBitmap* Detach(); | 511 CFX_DIBitmap* Detach(); |
512 | 512 |
513 void Replace(CFX_DIBitmap* pBitmap); | 513 void Replace(CFX_DIBitmap* pBitmap); |
514 private: | 514 private: |
515 CFX_DIBitmap* m_pBitmap; | 515 CFX_DIBitmap* m_pBitmap; |
516 }; | 516 }; |
517 class CStretchEngine; | 517 class CStretchEngine; |
518 class CFX_ImageStretcher | 518 class CFX_ImageStretcher |
519 { | 519 { |
520 public: | 520 public: |
521 | |
522 CFX_ImageStretcher(); | 521 CFX_ImageStretcher(); |
523 | |
524 ~CFX_ImageStretcher(); | 522 ~CFX_ImageStretcher(); |
525 | 523 |
526 int32_t» » Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource*
pBitmap, | 524 FX_BOOL Start(IFX_ScanlineComposer* pDest, const CFX_DIBSource* pBitmap, |
527 int dest_width, int dest_height, const FX_RECT& bitmap
_rect, FX_DWORD flags); | 525 int dest_width, int dest_height, const FX_RECT& bitmap_rect, |
| 526 FX_DWORD flags); |
528 | 527 |
| 528 FX_BOOL Continue(IFX_Pause* pPause); |
| 529 FX_BOOL StartQuickStretch(); |
| 530 FX_BOOL StartStretch(); |
| 531 FX_BOOL ContinueQuickStretch(IFX_Pause* pPause); |
| 532 FX_BOOL ContinueStretch(IFX_Pause* pPause); |
529 | 533 |
530 int32_t Continue(IFX_Pause* pPause); | |
531 IFX_ScanlineComposer* m_pDest; | 534 IFX_ScanlineComposer* m_pDest; |
532 const CFX_DIBSource* m_pSource; | 535 const CFX_DIBSource* m_pSource; |
533 CStretchEngine* m_pStretchEngine; | 536 CStretchEngine* m_pStretchEngine; |
534 FX_DWORD m_Flags; | 537 FX_DWORD m_Flags; |
535 FX_BOOL» » » m_bFlipX, | 538 FX_BOOL» » » m_bFlipX; |
536 m_bFlipY; | 539 FX_BOOL m_bFlipY; |
537 int»» » » m_DestWidth, | 540 int»» » » m_DestWidth; |
538 m_DestHeight; | 541 int m_DestHeight; |
539 FX_RECT m_ClipRect; | 542 FX_RECT m_ClipRect; |
540 int m_LineIndex; | 543 int m_LineIndex; |
541 int m_DestBPP; | 544 int m_DestBPP; |
542 uint8_t* m_pScanline; | 545 uint8_t* m_pScanline; |
543 uint8_t* m_pMaskScanline; | 546 uint8_t* m_pMaskScanline; |
544 FXDIB_Format m_DestFormat; | 547 FXDIB_Format m_DestFormat; |
545 | |
546 int32_t StartQuickStretch(); | |
547 | |
548 int32_t StartStretch(); | |
549 | |
550 int32_t ContinueQuickStretch(IFX_Pause* pPause); | |
551 | |
552 int32_t ContinueStretch(IFX_Pause* pPause); | |
553 }; | 548 }; |
554 class CFX_ImageTransformer | 549 class CFX_ImageTransformer |
555 { | 550 { |
556 public: | 551 public: |
557 | |
558 CFX_ImageTransformer(); | 552 CFX_ImageTransformer(); |
559 | |
560 ~CFX_ImageTransformer(); | 553 ~CFX_ImageTransformer(); |
561 | 554 |
562 int32_t» Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix
, int flags, const FX_RECT* pClip); | 555 FX_BOOL Start(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pMatrix, |
| 556 int flags, const FX_RECT* pClip); |
563 | 557 |
| 558 FX_BOOL Continue(IFX_Pause* pPause); |
564 | 559 |
565 int32_t Continue(IFX_Pause* pPause); | |
566 CFX_AffineMatrix* m_pMatrix; | 560 CFX_AffineMatrix* m_pMatrix; |
567 FX_RECT m_StretchClip; | 561 FX_RECT m_StretchClip; |
568 int»» » m_ResultLeft, m_ResultTop, m_ResultWidth, m_ResultHeight
; | 562 int»» » m_ResultLeft; |
| 563 int»» » m_ResultTop; |
| 564 int»» » m_ResultWidth; |
| 565 int»» » m_ResultHeight; |
569 CFX_AffineMatrix m_dest2stretch; | 566 CFX_AffineMatrix m_dest2stretch; |
570 CFX_ImageStretcher m_Stretcher; | 567 CFX_ImageStretcher m_Stretcher; |
571 CFX_BitmapStorer m_Storer; | 568 CFX_BitmapStorer m_Storer; |
572 FX_DWORD m_Flags; | 569 FX_DWORD m_Flags; |
573 int m_Status; | 570 int m_Status; |
574 }; | 571 }; |
575 class CFX_ImageRenderer | 572 class CFX_ImageRenderer |
576 { | 573 { |
577 public: | 574 public: |
578 | |
579 CFX_ImageRenderer(); | 575 CFX_ImageRenderer(); |
580 | |
581 ~CFX_ImageRenderer(); | 576 ~CFX_ImageRenderer(); |
582 | 577 |
583 int32_t» » » Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn*
pClipRgn, | 578 FX_BOOL Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn, |
584 const CFX_DIBSource* pSource, int bitmap_alpha, | 579 const CFX_DIBSource* pSource, int bitmap_alpha, |
585 FX_DWORD mask_color, const CFX_AffineMatrix* pMatr
ix, FX_DWORD dib_flags, | 580 FX_DWORD mask_color, const CFX_AffineMatrix* pMatrix, |
586 FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0,
void* pIccTransform = NULL, | 581 FX_DWORD dib_flags, FX_BOOL bRgbByteOrder = FALSE, |
587 int blend_type = FXDIB_BLEND_NORMAL); | 582 int alpha_flag = 0, void* pIccTransform = NULL, |
| 583 int blend_type = FXDIB_BLEND_NORMAL); |
588 | 584 |
589 int32_t» » » Continue(IFX_Pause* pPause); | 585 FX_BOOL Continue(IFX_Pause* pPause); |
| 586 |
590 protected: | 587 protected: |
591 CFX_DIBitmap* m_pDevice; | 588 CFX_DIBitmap* m_pDevice; |
592 const CFX_ClipRgn* m_pClipRgn; | 589 const CFX_ClipRgn* m_pClipRgn; |
593 int m_BitmapAlpha; | 590 int m_BitmapAlpha; |
594 FX_DWORD m_MaskColor; | 591 FX_DWORD m_MaskColor; |
595 CFX_AffineMatrix m_Matrix; | 592 CFX_AffineMatrix m_Matrix; |
596 CFX_ImageTransformer* m_pTransformer; | 593 CFX_ImageTransformer* m_pTransformer; |
597 CFX_ImageStretcher m_Stretcher; | 594 CFX_ImageStretcher m_Stretcher; |
598 CFX_BitmapComposer m_Composer; | 595 CFX_BitmapComposer m_Composer; |
599 int m_Status; | 596 int m_Status; |
600 FX_RECT m_ClipBox; | 597 FX_RECT m_ClipBox; |
601 FX_DWORD m_Flags; | 598 FX_DWORD m_Flags; |
602 int m_AlphaFlag; | 599 int m_AlphaFlag; |
603 void* m_pIccTransform; | 600 void* m_pIccTransform; |
604 FX_BOOL m_bRgbByteOrder; | 601 FX_BOOL m_bRgbByteOrder; |
605 int m_BlendType; | 602 int m_BlendType; |
606 }; | 603 }; |
607 | 604 |
608 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_ | 605 #endif // CORE_INCLUDE_FXGE_FX_DIB_H_ |
OLD | NEW |