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_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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 FX_FLOAT m_LineWidth; | 154 FX_FLOAT m_LineWidth; |
155 }; | 155 }; |
156 | 156 |
157 #define FXDC_DEVICE_CLASS 1 | 157 #define FXDC_DEVICE_CLASS 1 |
158 #define FXDC_PIXEL_WIDTH 2 | 158 #define FXDC_PIXEL_WIDTH 2 |
159 #define FXDC_PIXEL_HEIGHT 3 | 159 #define FXDC_PIXEL_HEIGHT 3 |
160 #define FXDC_BITS_PIXEL 4 | 160 #define FXDC_BITS_PIXEL 4 |
161 #define FXDC_HORZ_SIZE 5 | 161 #define FXDC_HORZ_SIZE 5 |
162 #define FXDC_VERT_SIZE 6 | 162 #define FXDC_VERT_SIZE 6 |
163 #define FXDC_RENDER_CAPS 7 | 163 #define FXDC_RENDER_CAPS 7 |
164 #define FXDC_DITHER_BITS 8 | |
165 #define FXDC_DISPLAY 1 | 164 #define FXDC_DISPLAY 1 |
166 #define FXDC_PRINTER 2 | 165 #define FXDC_PRINTER 2 |
167 #define FXRC_GET_BITS 0x01 | 166 #define FXRC_GET_BITS 0x01 |
168 #define FXRC_BIT_MASK 0x02 | 167 #define FXRC_BIT_MASK 0x02 |
169 #define FXRC_ALPHA_MASK 0x04 | 168 #define FXRC_ALPHA_MASK 0x04 |
170 #define FXRC_ALPHA_PATH 0x10 | 169 #define FXRC_ALPHA_PATH 0x10 |
171 #define FXRC_ALPHA_IMAGE 0x20 | 170 #define FXRC_ALPHA_IMAGE 0x20 |
172 #define FXRC_ALPHA_OUTPUT 0x40 | 171 #define FXRC_ALPHA_OUTPUT 0x40 |
173 #define FXRC_BLEND_MODE 0x80 | 172 #define FXRC_BLEND_MODE 0x80 |
174 #define FXRC_SOFT_CLIP 0x100 | 173 #define FXRC_SOFT_CLIP 0x100 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 int m_DeviceClass; | 393 int m_DeviceClass; |
395 FX_RECT m_ClipBox; | 394 FX_RECT m_ClipBox; |
396 IFX_RenderDeviceDriver* m_pDeviceDriver; | 395 IFX_RenderDeviceDriver* m_pDeviceDriver; |
397 }; | 396 }; |
398 | 397 |
399 class CFX_FxgeDevice : public CFX_RenderDevice { | 398 class CFX_FxgeDevice : public CFX_RenderDevice { |
400 public: | 399 public: |
401 CFX_FxgeDevice(); | 400 CFX_FxgeDevice(); |
402 ~CFX_FxgeDevice() override; | 401 ~CFX_FxgeDevice() override; |
403 | 402 |
404 bool Attach(CFX_DIBitmap* pBitmap, | 403 bool Attach(CFX_DIBitmap* pBitmap) { |
405 int dither_bits = 0, | 404 return AttachEx(pBitmap, false, nullptr, false); |
406 bool bRgbByteOrder = false, | 405 } |
407 CFX_DIBitmap* pOriDevice = NULL, | 406 bool AttachEx(CFX_DIBitmap* pBitmap, |
Lei Zhang
2016/05/26 18:11:29
If you have better name suggestions, let me know.
dsinclair
2016/05/26 18:26:14
My vote would be to merge them and just pass the d
Lei Zhang
2016/05/26 21:06:11
Done. See PS2 -> 4.
| |
408 bool bGroupKnockout = false); | 407 bool bRgbByteOrder, |
408 CFX_DIBitmap* pOriDevice, | |
409 bool bGroupKnockout); | |
409 | 410 |
410 bool Create(int width, | 411 bool Create(int width, int height, FXDIB_Format format) { |
411 int height, | 412 return CreateEx(width, height, format, nullptr); |
412 FXDIB_Format format, | 413 } |
413 int dither_bits = 0, | 414 bool CreateEx(int width, |
414 CFX_DIBitmap* pOriDevice = NULL); | 415 int height, |
416 FXDIB_Format format, | |
417 CFX_DIBitmap* pOriDevice); | |
415 | 418 |
416 #ifdef _SKIA_SUPPORT_ | 419 #ifdef _SKIA_SUPPORT_ |
417 bool AttachRecorder(SkPictureRecorder* recorder); | 420 bool AttachRecorder(SkPictureRecorder* recorder); |
418 SkPictureRecorder* CreateRecorder(int size_x, int size_y); | 421 SkPictureRecorder* CreateRecorder(int size_x, int size_y); |
419 #endif | 422 #endif |
420 | 423 |
421 protected: | 424 protected: |
422 bool m_bOwnedBitmap; | 425 bool m_bOwnedBitmap; |
423 }; | 426 }; |
424 | 427 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
654 FX_BOOL m_bCmykOutput; | 657 FX_BOOL m_bCmykOutput; |
655 FX_BOOL m_bColorSet; | 658 FX_BOOL m_bColorSet; |
656 uint32_t m_LastColor; | 659 uint32_t m_LastColor; |
657 FX_RECT m_ClipBox; | 660 FX_RECT m_ClipBox; |
658 CFX_ArrayTemplate<CPSFont*> m_PSFontList; | 661 CFX_ArrayTemplate<CPSFont*> m_PSFontList; |
659 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; | 662 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; |
660 FX_BOOL m_bInited; | 663 FX_BOOL m_bInited; |
661 }; | 664 }; |
662 | 665 |
663 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ | 666 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ |
OLD | NEW |