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 #ifndef CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 5 #ifndef CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
6 #define CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 6 #define CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
7 | 7 |
8 #if defined(_SKIA_SUPPORT_) | 8 #if defined(_SKIA_SUPPORT_) |
9 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { | 9 class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { |
10 public: | 10 public: |
11 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, | 11 CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, |
12 int dither_bits, | 12 int dither_bits, |
13 FX_BOOL bRgbByteOrder, | 13 FX_BOOL bRgbByteOrder, |
14 CFX_DIBitmap* pOriDevice, | 14 CFX_DIBitmap* pOriDevice, |
15 FX_BOOL bGroupKnockout); | 15 FX_BOOL bGroupKnockout); |
16 ~CFX_SkiaDeviceDriver() override; | 16 ~CFX_SkiaDeviceDriver() override; |
17 | 17 |
18 /** Options */ | 18 /** Options */ |
19 virtual int GetDeviceCaps(int caps_id); | 19 virtual int GetDeviceCaps(int caps_id); |
20 | 20 |
21 /** Save and restore all graphic states */ | 21 /** Save and restore all graphic states */ |
22 virtual void SaveState(); | 22 virtual void SaveState(); |
23 virtual void RestoreState(FX_BOOL bKeepSaved); | 23 virtual void RestoreState(FX_BOOL bKeepSaved); |
24 | 24 |
25 /** Set clipping path using filled region */ | 25 /** Set clipping path using filled region */ |
26 virtual FX_BOOL SetClip_PathFill( | 26 virtual FX_BOOL SetClip_PathFill( |
27 const CFX_PathData* pPathData, // path info | 27 const CFX_PathData* pPathData, // path info |
28 const CFX_Matrix* pObject2Device, // optional transformation | 28 const CFX_Matrix* pObject2Device, // optional transformation |
29 int fill_mode // fill mode, WINDING or ALTERNATE | 29 int fill_mode); // fill mode, WINDING or ALTERNATE |
30 ); | |
31 | 30 |
32 /** Set clipping path using stroked region */ | 31 /** Set clipping path using stroked region */ |
33 virtual FX_BOOL SetClip_PathStroke( | 32 virtual FX_BOOL SetClip_PathStroke( |
34 const CFX_PathData* pPathData, // path info | 33 const CFX_PathData* pPathData, // path info |
35 const CFX_Matrix* pObject2Device, // optional transformation | 34 const CFX_Matrix* pObject2Device, // optional transformation |
36 const CFX_GraphStateData* | 35 const CFX_GraphStateData* |
37 pGraphState // graphic state, for pen attributes | 36 pGraphState); // graphic state, for pen attributes |
38 ); | |
39 | 37 |
40 /** Draw a path */ | 38 /** Draw a path */ |
41 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, | 39 virtual FX_BOOL DrawPath(const CFX_PathData* pPathData, |
42 const CFX_Matrix* pObject2Device, | 40 const CFX_Matrix* pObject2Device, |
43 const CFX_GraphStateData* pGraphState, | 41 const CFX_GraphStateData* pGraphState, |
44 FX_DWORD fill_color, | 42 FX_DWORD fill_color, |
45 FX_DWORD stroke_color, | 43 FX_DWORD stroke_color, |
46 int fill_mode, | 44 int fill_mode, |
47 int alpha_flag = 0, | 45 int alpha_flag = 0, |
48 void* pIccTransform = NULL); | 46 void* pIccTransform = NULL); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 FX_BOOL bFill = TRUE); | 136 FX_BOOL bFill = TRUE); |
139 void SetClipMask(rasterizer_scanline_aa& rasterizer); | 137 void SetClipMask(rasterizer_scanline_aa& rasterizer); |
140 void SetClipMask(SkPath& skPath, SkPaint* spaint); | 138 void SetClipMask(SkPath& skPath, SkPaint* spaint); |
141 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } | 139 virtual uint8_t* GetBuffer() const { return m_pAggDriver->GetBuffer(); } |
142 | 140 |
143 CFX_AggDeviceDriver* m_pAggDriver; | 141 CFX_AggDeviceDriver* m_pAggDriver; |
144 }; | 142 }; |
145 #endif // defined(_SKIA_SUPPORT_) | 143 #endif // defined(_SKIA_SUPPORT_) |
146 | 144 |
147 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ | 145 #endif // CORE_SRC_FXGE_SKIA_FX_SKIA_DEVICE_H_ |
OLD | NEW |