| 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_FX_DIB_H_ | 7 #ifndef CORE_FXGE_FX_DIB_H_ |
| 8 #define CORE_FXGE_FX_DIB_H_ | 8 #define CORE_FXGE_FX_DIB_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 uint32_t GetPaletteArgb(int index) const { return GetPaletteEntry(index); } | 211 uint32_t GetPaletteArgb(int index) const { return GetPaletteEntry(index); } |
| 212 void SetPaletteArgb(int index, uint32_t color) { | 212 void SetPaletteArgb(int index, uint32_t color) { |
| 213 SetPaletteEntry(index, color); | 213 SetPaletteEntry(index, color); |
| 214 } | 214 } |
| 215 | 215 |
| 216 // Copies into internally-owned palette. | 216 // Copies into internally-owned palette. |
| 217 void SetPalette(const uint32_t* pSrcPal); | 217 void SetPalette(const uint32_t* pSrcPal); |
| 218 | 218 |
| 219 std::unique_ptr<CFX_DIBitmap> Clone(const FX_RECT* pClip = nullptr) const; | 219 std::unique_ptr<CFX_DIBitmap> Clone(const FX_RECT* pClip = nullptr) const; |
| 220 std::unique_ptr<CFX_DIBitmap> CloneConvert(FXDIB_Format format) const; | 220 std::unique_ptr<CFX_DIBitmap> CloneConvert(FXDIB_Format format) const; |
| 221 | |
| 222 std::unique_ptr<CFX_DIBitmap> StretchTo(int dest_width, | 221 std::unique_ptr<CFX_DIBitmap> StretchTo(int dest_width, |
| 223 int dest_height, | 222 int dest_height, |
| 224 uint32_t flags = 0, | 223 uint32_t flags = 0, |
| 225 const FX_RECT* pClip = nullptr) const; | 224 const FX_RECT* pClip = nullptr) const; |
| 226 std::unique_ptr<CFX_DIBitmap> TransformTo( | 225 std::unique_ptr<CFX_DIBitmap> TransformTo( |
| 227 const CFX_Matrix* pMatrix, | 226 const CFX_Matrix* pMatrix, |
| 228 int& left, | 227 int& left, |
| 229 int& top, | 228 int& top, |
| 230 uint32_t flags = 0, | 229 uint32_t flags = 0, |
| 231 const FX_RECT* pClip = nullptr) const; | 230 const FX_RECT* pClip = nullptr) const; |
| 231 std::unique_ptr<CFX_DIBitmap> SwapXY(bool bXFlip, |
| 232 bool bYFlip, |
| 233 const FX_RECT* pClip = nullptr) const; |
| 234 std::unique_ptr<CFX_DIBitmap> FlipImage(bool bXFlip, bool bYFlip) const; |
| 232 | 235 |
| 233 std::unique_ptr<CFX_DIBitmap> CloneAlphaMask( | 236 std::unique_ptr<CFX_DIBitmap> CloneAlphaMask( |
| 234 const FX_RECT* pClip = nullptr) const; | 237 const FX_RECT* pClip = nullptr) const; |
| 235 | 238 |
| 236 // Copies into internally-owned mask. | 239 // Copies into internally-owned mask. |
| 237 bool SetAlphaMask(const CFX_DIBSource* pAlphaMask, | 240 bool SetAlphaMask(const CFX_DIBSource* pAlphaMask, |
| 238 const FX_RECT* pClip = nullptr); | 241 const FX_RECT* pClip = nullptr); |
| 239 | 242 |
| 240 CFX_DIBitmap* SwapXY(bool bXFlip, | |
| 241 bool bYFlip, | |
| 242 const FX_RECT* pClip = nullptr) const; | |
| 243 | |
| 244 CFX_DIBitmap* FlipImage(bool bXFlip, bool bYFlip) const; | |
| 245 | 243 |
| 246 void GetOverlapRect(int& dest_left, | 244 void GetOverlapRect(int& dest_left, |
| 247 int& dest_top, | 245 int& dest_top, |
| 248 int& width, | 246 int& width, |
| 249 int& height, | 247 int& height, |
| 250 int src_width, | 248 int src_width, |
| 251 int src_height, | 249 int src_height, |
| 252 int& src_left, | 250 int& src_left, |
| 253 int& src_top, | 251 int& src_top, |
| 254 const CFX_ClipRgn* pClipRgn); | 252 const CFX_ClipRgn* pClipRgn); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 int m_Status; | 688 int m_Status; |
| 691 FX_RECT m_ClipBox; | 689 FX_RECT m_ClipBox; |
| 692 uint32_t m_Flags; | 690 uint32_t m_Flags; |
| 693 int m_AlphaFlag; | 691 int m_AlphaFlag; |
| 694 void* m_pIccTransform; | 692 void* m_pIccTransform; |
| 695 bool m_bRgbByteOrder; | 693 bool m_bRgbByteOrder; |
| 696 int m_BlendType; | 694 int m_BlendType; |
| 697 }; | 695 }; |
| 698 | 696 |
| 699 #endif // CORE_FXGE_FX_DIB_H_ | 697 #endif // CORE_FXGE_FX_DIB_H_ |
| OLD | NEW |