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

Side by Side Diff: core/fxge/win32/cfx_psrenderer.h

Issue 2615703002: Revert postscript code removal. (Closed)
Patch Set: Move files, remove extra class, remove non const refs Created 3 years, 11 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 | « core/fxge/cfx_windowsdevice.h ('k') | core/fxge/win32/cfx_psrenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FXGE_WIN32_CFX_PSRENDERER_H_
8 #define CORE_FXGE_WIN32_CFX_PSRENDERER_H_
9
10 #include "core/fxcrt/fx_coordinates.h"
11 #include "core/fxcrt/fx_system.h"
12 #include "core/fxge/cfx_graphstatedata.h"
13 #include "core/fxge/win32/cpsoutput.h"
14
15 class CFX_DIBSource;
16 class CFX_FaceCache;
17 class CFX_Font;
18 class CFX_FontCache;
19 class CFX_Matrix;
20 class CFX_PathData;
21 class CPSFont;
22 struct FXTEXT_CHARPOS;
23
24 class CFX_PSRenderer {
25 public:
26 CFX_PSRenderer();
27 ~CFX_PSRenderer();
28
29 void Init(CPSOutput* pOutput,
30 int pslevel,
31 int width,
32 int height,
33 bool bCmykOutput);
34 bool StartRendering();
35 void EndRendering();
36 void SaveState();
37 void RestoreState(bool bKeepSaved);
38 void SetClip_PathFill(const CFX_PathData* pPathData,
39 const CFX_Matrix* pObject2Device,
40 int fill_mode);
41 void SetClip_PathStroke(const CFX_PathData* pPathData,
42 const CFX_Matrix* pObject2Device,
43 const CFX_GraphStateData* pGraphState);
44 FX_RECT GetClipBox() { return m_ClipBox; }
45 bool DrawPath(const CFX_PathData* pPathData,
46 const CFX_Matrix* pObject2Device,
47 const CFX_GraphStateData* pGraphState,
48 uint32_t fill_color,
49 uint32_t stroke_color,
50 int fill_mode);
51 bool SetDIBits(const CFX_DIBSource* pBitmap,
52 uint32_t color,
53 int dest_left,
54 int dest_top);
55 bool StretchDIBits(const CFX_DIBSource* pBitmap,
56 uint32_t color,
57 int dest_left,
58 int dest_top,
59 int dest_width,
60 int dest_height,
61 uint32_t flags);
62 bool DrawDIBits(const CFX_DIBSource* pBitmap,
63 uint32_t color,
64 const CFX_Matrix* pMatrix,
65 uint32_t flags);
66 bool DrawText(int nChars,
67 const FXTEXT_CHARPOS* pCharPos,
68 CFX_Font* pFont,
69 const CFX_Matrix* pObject2Device,
70 FX_FLOAT font_size,
71 uint32_t color);
72
73 private:
74 void OutputPath(const CFX_PathData* pPathData,
75 const CFX_Matrix* pObject2Device);
76 void SetGraphState(const CFX_GraphStateData* pGraphState);
77 void SetColor(uint32_t color);
78 void FindPSFontGlyph(CFX_FaceCache* pFaceCache,
79 CFX_Font* pFont,
80 const FXTEXT_CHARPOS& charpos,
81 int* ps_fontnum,
82 int* ps_glyphindex);
83 void WritePSBinary(const uint8_t* data, int len);
84
85 CPSOutput* m_pOutput;
86 int m_PSLevel;
87 CFX_GraphStateData m_CurGraphState;
88 bool m_bGraphStateSet;
89 bool m_bCmykOutput;
90 bool m_bColorSet;
91 uint32_t m_LastColor;
92 FX_RECT m_ClipBox;
93 CFX_ArrayTemplate<CPSFont*> m_PSFontList;
94 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack;
95 bool m_bInited;
96 };
97
98 #endif // CORE_FXGE_WIN32_CFX_PSRENDERER_H_
OLDNEW
« no previous file with comments | « core/fxge/cfx_windowsdevice.h ('k') | core/fxge/win32/cfx_psrenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698