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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool bRgbByteOrder, |
406 bool bRgbByteOrder = false, | 405 CFX_DIBitmap* pOriDevice, |
407 CFX_DIBitmap* pOriDevice = NULL, | 406 bool bGroupKnockout); |
408 bool bGroupKnockout = false); | |
409 | |
410 bool Create(int width, | 407 bool Create(int width, |
411 int height, | 408 int height, |
412 FXDIB_Format format, | 409 FXDIB_Format format, |
413 int dither_bits = 0, | 410 CFX_DIBitmap* pOriDevice); |
414 CFX_DIBitmap* pOriDevice = NULL); | |
415 | 411 |
416 #ifdef _SKIA_SUPPORT_ | 412 #ifdef _SKIA_SUPPORT_ |
417 bool AttachRecorder(SkPictureRecorder* recorder); | 413 bool AttachRecorder(SkPictureRecorder* recorder); |
418 SkPictureRecorder* CreateRecorder(int size_x, int size_y); | 414 SkPictureRecorder* CreateRecorder(int size_x, int size_y); |
419 #endif | 415 #endif |
420 | 416 |
421 protected: | 417 protected: |
422 bool m_bOwnedBitmap; | 418 bool m_bOwnedBitmap; |
423 }; | 419 }; |
424 | 420 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 FX_BOOL m_bCmykOutput; | 650 FX_BOOL m_bCmykOutput; |
655 FX_BOOL m_bColorSet; | 651 FX_BOOL m_bColorSet; |
656 uint32_t m_LastColor; | 652 uint32_t m_LastColor; |
657 FX_RECT m_ClipBox; | 653 FX_RECT m_ClipBox; |
658 CFX_ArrayTemplate<CPSFont*> m_PSFontList; | 654 CFX_ArrayTemplate<CPSFont*> m_PSFontList; |
659 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; | 655 CFX_ArrayTemplate<FX_RECT> m_ClipBoxStack; |
660 FX_BOOL m_bInited; | 656 FX_BOOL m_bInited; |
661 }; | 657 }; |
662 | 658 |
663 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ | 659 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ |
OLD | NEW |