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

Side by Side Diff: core/fxge/include/fx_ge.h

Issue 2019603002: Remove unused PS generation code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@print_clean
Patch Set: Remove more dead code - reland 2d63eaa Created 4 years, 7 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
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_FXGE_INCLUDE_FX_GE_H_ 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_H_
8 #define CORE_FXGE_INCLUDE_FX_GE_H_ 8 #define CORE_FXGE_INCLUDE_FX_GE_H_
9 9
10 #include "core/fxge/include/fx_dib.h" 10 #include "core/fxge/include/fx_dib.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 virtual FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern, 560 virtual FX_BOOL DrawShading(const CPDF_ShadingPattern* pPattern,
561 const CFX_Matrix* pMatrix, 561 const CFX_Matrix* pMatrix,
562 const FX_RECT& clip_rect, 562 const FX_RECT& clip_rect,
563 int alpha, 563 int alpha,
564 FX_BOOL bAlphaMode) { 564 FX_BOOL bAlphaMode) {
565 return false; 565 return false;
566 } 566 }
567 }; 567 };
568 568
569 class IFX_PSOutput {
570 public:
571 virtual void Release() = 0;
572 virtual void OutputPS(const FX_CHAR* str, int len) = 0;
573
574 protected:
575 virtual ~IFX_PSOutput() {}
576 };
577
578 class CFX_PSRenderer {
579 public:
580 CFX_PSRenderer();
581 ~CFX_PSRenderer();
582
583 void Init(IFX_PSOutput* pOutput,
584 int ps_level,
585 int width,
586 int height,
587 FX_BOOL bCmykOutput);
588 FX_BOOL StartRendering();
589 void EndRendering();
590 void SaveState();
591 void RestoreState(bool bKeepSaved);
592 void SetClip_PathFill(const CFX_PathData* pPathData,
593 const CFX_Matrix* pObject2Device,
594 int fill_mode);
595 void SetClip_PathStroke(const CFX_PathData* pPathData,
596 const CFX_Matrix* pObject2Device,
597 const CFX_GraphStateData* pGraphState);
598 FX_RECT GetClipBox() { return m_ClipBox; }
599 FX_BOOL DrawPath(const CFX_PathData* pPathData,
600 const CFX_Matrix* pObject2Device,
601 const CFX_GraphStateData* pGraphState,
602 uint32_t fill_color,
603 uint32_t stroke_color,
604 int fill_mode,
605 int alpha_flag = 0,
606 void* pIccTransform = NULL);
607 FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap,
608 uint32_t color,
609 int dest_left,
610 int dest_top,
611 int alpha_flag = 0,
612 void* pIccTransform = NULL);
613 FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap,
614 uint32_t color,
615 int dest_left,
616 int dest_top,
617 int dest_width,
618 int dest_height,
619 uint32_t flags,
620 int alpha_flag = 0,
621 void* pIccTransform = NULL);
622 FX_BOOL DrawDIBits(const CFX_DIBSource* pBitmap,
623 uint32_t color,
624 const CFX_Matrix* pMatrix,
625 uint32_t flags,
626 int alpha_flag = 0,
627 void* pIccTransform = NULL);
628 FX_BOOL DrawText(int nChars,
629 const FXTEXT_CHARPOS* pCharPos,
630 CFX_Font* pFont,
631 CFX_FontCache* pCache,
632 const CFX_Matrix* pObject2Device,
633 FX_FLOAT font_size,
634 uint32_t color,
635 int alpha_flag = 0,
636 void* pIccTransform = NULL);
637
638 private:
639 void OutputPath(const CFX_PathData* pPathData,
640 const CFX_Matrix* pObject2Device);
641 void SetGraphState(const CFX_GraphStateData* pGraphState);
642 void SetColor(uint32_t color, int alpha_flag, void* pIccTransform);
643 void FindPSFontGlyph(CFX_FaceCache* pFaceCache,
644 CFX_Font* pFont,
645 const FXTEXT_CHARPOS& charpos,
646 int& ps_fontnum,
647 int& ps_glyphindex);
648 void WritePSBinary(const uint8_t* data, int len);
649
650 IFX_PSOutput* m_pOutput;
651 int m_PSLevel;
652 CFX_GraphStateData m_CurGraphState;
653 FX_BOOL m_bGraphStateSet;
654 FX_BOOL m_bCmykOutput;
655 FX_BOOL m_bColorSet;
656 uint32_t m_LastColor;
657 FX_RECT m_ClipBox;
658 CFX_ArrayTemplate<CPSFont*> m_PSFontList;
659 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack;
660 FX_BOOL m_bInited;
661 };
662
663 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ 569 #endif // CORE_FXGE_INCLUDE_FX_GE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698