npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 1 | // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
| 7 | #ifndef CORE_FPDFAPI_RENDER_CPDF_TRANSFERFUNC_H_ |
| 8 | #define CORE_FPDFAPI_RENDER_CPDF_TRANSFERFUNC_H_ |
| 9 | |
Dan Sinclair | 0b95042 | 2017-09-21 15:49:49 -0400 | [diff] [blame] | 10 | #include "core/fxcrt/retain_ptr.h" |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame^] | 11 | #include "core/fxcrt/unowned_ptr.h" |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 12 | #include "core/fxge/fx_dib.h" |
| 13 | |
| 14 | class CPDF_Document; |
Nicolas Pena | 37cc5fb | 2017-04-04 12:12:49 -0400 | [diff] [blame] | 15 | class CFX_DIBSource; |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 16 | |
Dan Sinclair | 0b95042 | 2017-09-21 15:49:49 -0400 | [diff] [blame] | 17 | class CPDF_TransferFunc : public Retainable { |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 18 | public: |
Tom Sepez | 3a1d9b4 | 2017-04-03 14:05:17 -0700 | [diff] [blame] | 19 | template <typename T, typename... Args> |
Dan Sinclair | 0b95042 | 2017-09-21 15:49:49 -0400 | [diff] [blame] | 20 | friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 21 | |
| 22 | FX_COLORREF TranslateColor(FX_COLORREF src) const; |
Dan Sinclair | 0b95042 | 2017-09-21 15:49:49 -0400 | [diff] [blame] | 23 | RetainPtr<CFX_DIBSource> TranslateImage(const RetainPtr<CFX_DIBSource>& pSrc); |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 24 | |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame^] | 25 | UnownedPtr<CPDF_Document> const m_pPDFDoc; |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 26 | bool m_bIdentity; |
| 27 | uint8_t m_Samples[256 * 3]; |
Tom Sepez | 3a1d9b4 | 2017-04-03 14:05:17 -0700 | [diff] [blame] | 28 | |
| 29 | private: |
| 30 | explicit CPDF_TransferFunc(CPDF_Document* pDoc); |
| 31 | ~CPDF_TransferFunc() override; |
npm | ca5300a | 2016-11-21 07:28:42 -0800 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | #endif // CORE_FPDFAPI_RENDER_CPDF_TRANSFERFUNC_H_ |