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

Side by Side Diff: core/src/fxge/agg/include/fx_agg_driver.h

Issue 402463002: Replace agg with skia (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix clang compile error Created 6 years, 5 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
(Empty)
1 // Copyright 2014 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 _FX_AGG_DEVICE_DRIVER_
8 #define _FX_AGG_DEVICE_DRIVER_
9 #include "fxfx_agg_path_storage.h"
10 #include "fxfx_agg_rasterizer_scanline_aa.h"
11 class CAgg_PathData : public CFX_Object
12 {
13 public:
14 CAgg_PathData() {}
15 ~CAgg_PathData() {}
16 FX_NAMESPACE_DECLARE(agg, path_storage) m_PathData;
17 void BuildPath(const CFX_PathData* pPathData, const C FX_AffineMatrix* pObject2Device);
18 };
19 class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver
20 {
21 public:
22 CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, int dither_bits, FX_BOOL bRgbByte Order, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout);
23 virtual ~CFX_AggDeviceDriver();
24 void InitPlatform();
25 void DestroyPlatform();
26
27
28 virtual int GetDeviceCaps(int caps_id);
29
30
31 virtual void SaveState();
32 virtual void RestoreState(FX_BOOL bKeepSaved);
33
34
35 virtual FX_BOOL SetClip_PathFill(const CFX_PathData* pPathData,
36 const CFX_AffineMatrix* pObject2Device,
37 int fill_mode
38 );
39
40
41 virtual FX_BOOL SetClip_PathStroke(const CFX_PathData* pPathData ,
42 const CFX_AffineMatrix* pObject2Devic e,
43 const CFX_GraphStateData* pGraphState
44 );
45
46
47 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData,
48 const CFX_AffineMatrix* pObject2Device,
49 const CFX_GraphStateData* pGraphState,
50 FX_DWORD fill_color,
51 FX_DWORD stroke_color,
52 int fill_mode,
53 int alpha_flag,
54 void* pIccTransform,
55 int blend_type
56 );
57
58 virtual FX_BOOL SetPixel(int x, int y, FX_DWORD color,
59 int alpha_flag, void* pIccTransform);
60
61 virtual FX_BOOL FillRect(const FX_RECT* pRect,
62 FX_DWORD fill_color, int alpha_flag, void* pIcc Transform, int blend_type);
63
64
65 virtual FX_BOOL DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FL OAT x2, FX_FLOAT y2, FX_DWORD color,
66 int alpha_flag, void* pIccTransform, in t blend_type)
67 {
68 return FALSE;
69 }
70
71 virtual FX_BOOL GetClipBox(FX_RECT* pRect);
72
73
74 virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int t op, void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE);
75 virtual CFX_DIBitmap* GetBackDrop()
76 {
77 return m_pOriDevice;
78 }
79
80 virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, FX_DWORD color, const FX_RECT* pSrcRect, int left, int top, int blend_type,
81 int alpha_flag, void* pIccTransform);
82 virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, FX_D WORD color, int dest_left, int dest_top,
83 int dest_width, int dest_height, const FX_ RECT* pClipRect, FX_DWORD flags,
84 int alpha_flag, void* pIccTransform, int b lend_type);
85
86 virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bi tmap_alpha, FX_DWORD color,
87 const CFX_AffineMatrix* pMatrix, FX_DWORD fl ags, FX_LPVOID& handle,
88 int alpha_flag, void* pIccTransform, int ble nd_type);
89 virtual FX_BOOL ContinueDIBits(FX_LPVOID handle, IFX_Pause* pPau se);
90 virtual void CancelDIBits(FX_LPVOID handle);
91
92 virtual FX_BOOL DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPo s, CFX_Font* pFont,
93 CFX_FontCache* pCache, const CFX_AffineMa trix* pObject2Device, FX_FLOAT font_size, FX_DWORD color,
94 int alpha_flag, void* pIccTransform);
95 virtual FX_BOOL RenderRasterizer(FX_NAMESPACE_DECLARE(agg, raste rizer_scanline_aa)& rasterizer, FX_DWORD color, FX_BOOL bFullCover, FX_BOOL bGro upKnockout,
96 int alpha_flag, void* pIccTransform);
97
98 void SetClipMask(FX_NAMESPACE_DECLARE(agg, ra sterizer_scanline_aa)& rasterizer);
99
100 virtual FX_LPBYTE GetBuffer() const
101 {
102 return m_pBitmap->GetBuffer();
103 }
104 virtual int GetDriverType()
105 {
106 return 1;
107 }
108
109 CFX_DIBitmap* m_pBitmap;
110 CFX_ClipRgn* m_pClipRgn;
111 CFX_PtrArray m_StateStack;
112 void* m_pPlatformGraphics;
113 void* m_pPlatformBitmap;
114 void* m_pDwRenderTartget;
115 int m_FillFlags;
116 int m_DitherBits;
117 FX_BOOL m_bRgbByteOrder;
118 CFX_DIBitmap* m_pOriDevice;
119 FX_BOOL m_bGroupKnockout;
120 };
121 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/agg/agg23/fx_agg_vcgen_stroke.cpp ('k') | core/src/fxge/agg/include/fxfx_agg_basics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698