| 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_DIB_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_DIB_H_ |
| 8 #define CORE_FXGE_INCLUDE_FX_DIB_H_ | 8 #define CORE_FXGE_INCLUDE_FX_DIB_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 #define FXARGB_TODIB(argb) (argb) | 147 #define FXARGB_TODIB(argb) (argb) |
| 148 #define FXCMYK_TODIB(cmyk) \ | 148 #define FXCMYK_TODIB(cmyk) \ |
| 149 ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | \ | 149 ((uint8_t)((cmyk) >> 24) | ((uint8_t)((cmyk) >> 16)) << 8 | \ |
| 150 ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24)) | 150 ((uint8_t)((cmyk) >> 8)) << 16 | ((uint8_t)(cmyk) << 24)) |
| 151 #define FXARGB_TOBGRORDERDIB(argb) \ | 151 #define FXARGB_TOBGRORDERDIB(argb) \ |
| 152 ((uint8_t)(argb >> 16) | ((uint8_t)(argb >> 8)) << 8 | \ | 152 ((uint8_t)(argb >> 16) | ((uint8_t)(argb >> 8)) << 8 | \ |
| 153 ((uint8_t)(argb)) << 16 | ((uint8_t)(argb >> 24) << 24)) | 153 ((uint8_t)(argb)) << 16 | ((uint8_t)(argb >> 24) << 24)) |
| 154 #define FXGETFLAG_COLORTYPE(flag) (uint8_t)((flag) >> 8) | 154 #define FXGETFLAG_COLORTYPE(flag) (uint8_t)((flag) >> 8) |
| 155 #define FXGETFLAG_ALPHA_FILL(flag) (uint8_t)(flag) | 155 #define FXGETFLAG_ALPHA_FILL(flag) (uint8_t)(flag) |
| 156 #define FXGETFLAG_ALPHA_STROKE(flag) (uint8_t)((flag) >> 16) | 156 #define FXGETFLAG_ALPHA_STROKE(flag) (uint8_t)((flag) >> 16) |
| 157 #define FXSETFLAG_COLORTYPE(flag, val) \ | |
| 158 flag = (((val) << 8) | (flag & 0xffff00ff)) | |
| 159 #define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val) | (flag & 0xffffff00)) | 157 #define FXSETFLAG_ALPHA_FILL(flag, val) flag = ((val) | (flag & 0xffffff00)) |
| 160 #define FXSETFLAG_ALPHA_STROKE(flag, val) \ | |
| 161 flag = (((val) << 16) | (flag & 0xff00ffff)) | |
| 162 | 158 |
| 163 class CFX_DIBSource { | 159 class CFX_DIBSource { |
| 164 public: | 160 public: |
| 165 virtual ~CFX_DIBSource(); | 161 virtual ~CFX_DIBSource(); |
| 166 | 162 |
| 167 int GetWidth() const { return m_Width; } | 163 int GetWidth() const { return m_Width; } |
| 168 int GetHeight() const { return m_Height; } | 164 int GetHeight() const { return m_Height; } |
| 169 | 165 |
| 170 FXDIB_Format GetFormat() const { | 166 FXDIB_Format GetFormat() const { |
| 171 return (FXDIB_Format)(m_AlphaFlag * 0x100 + m_bpp); | 167 return (FXDIB_Format)(m_AlphaFlag * 0x100 + m_bpp); |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 int m_Status; | 662 int m_Status; |
| 667 FX_RECT m_ClipBox; | 663 FX_RECT m_ClipBox; |
| 668 uint32_t m_Flags; | 664 uint32_t m_Flags; |
| 669 int m_AlphaFlag; | 665 int m_AlphaFlag; |
| 670 void* m_pIccTransform; | 666 void* m_pIccTransform; |
| 671 FX_BOOL m_bRgbByteOrder; | 667 FX_BOOL m_bRgbByteOrder; |
| 672 int m_BlendType; | 668 int m_BlendType; |
| 673 }; | 669 }; |
| 674 | 670 |
| 675 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_ | 671 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_ |
| OLD | NEW |