| 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_ALPHA_FILL(flag, val) flag = ((val) | (flag & 0xffffff00)) | |
| 158 | 157 |
| 159 class CFX_DIBSource { | 158 class CFX_DIBSource { |
| 160 public: | 159 public: |
| 161 virtual ~CFX_DIBSource(); | 160 virtual ~CFX_DIBSource(); |
| 162 | 161 |
| 163 int GetWidth() const { return m_Width; } | 162 int GetWidth() const { return m_Width; } |
| 164 int GetHeight() const { return m_Height; } | 163 int GetHeight() const { return m_Height; } |
| 165 | 164 |
| 166 FXDIB_Format GetFormat() const { | 165 FXDIB_Format GetFormat() const { |
| 167 return (FXDIB_Format)(m_AlphaFlag * 0x100 + m_bpp); | 166 return (FXDIB_Format)(m_AlphaFlag * 0x100 + m_bpp); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 int m_Status; | 658 int m_Status; |
| 660 FX_RECT m_ClipBox; | 659 FX_RECT m_ClipBox; |
| 661 uint32_t m_Flags; | 660 uint32_t m_Flags; |
| 662 int m_AlphaFlag; | 661 int m_AlphaFlag; |
| 663 void* m_pIccTransform; | 662 void* m_pIccTransform; |
| 664 FX_BOOL m_bRgbByteOrder; | 663 FX_BOOL m_bRgbByteOrder; |
| 665 int m_BlendType; | 664 int m_BlendType; |
| 666 }; | 665 }; |
| 667 | 666 |
| 668 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_ | 667 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_ |
| OLD | NEW |