diff options
author | dan sinclair <dsinclair@chromium.org> | 2016-03-23 19:21:44 -0400 |
---|---|---|
committer | dan sinclair <dsinclair@chromium.org> | 2016-03-23 19:21:44 -0400 |
commit | 61b2fc718910a5ab2a75ec5026b239ff33bccfdc (patch) | |
tree | 4031f4cea10dac3d77969035e66fc17235cb1d3d /core/fpdfapi/fpdf_page/cpdf_meshstream.h | |
parent | 46a8a2041868c5df6883647226dab1482e2bf4c2 (diff) | |
download | pdfium-61b2fc718910a5ab2a75ec5026b239ff33bccfdc.tar.xz |
Split core/include/fpdfapi/fpdf_resource.h
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places
the classes into individual files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1824033002 .
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_meshstream.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_meshstream.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_meshstream.h b/core/fpdfapi/fpdf_page/cpdf_meshstream.h new file mode 100644 index 0000000000..4934c0b133 --- /dev/null +++ b/core/fpdfapi/fpdf_page/cpdf_meshstream.h @@ -0,0 +1,63 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_MESHSTREAM_H_ +#define CORE_FPDFAPI_FPDF_PAGE_CPDF_MESHSTREAM_H_ + +#include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_system.h" + +struct CPDF_MeshVertex { + FX_FLOAT x; + FX_FLOAT y; + FX_FLOAT r; + FX_FLOAT g; + FX_FLOAT b; +}; + +class CFX_Matrix; +class CPDF_ColorSpace; +class CPDF_Function; +class CPDF_Stream; + +class CPDF_MeshStream { + public: + FX_BOOL Load(CPDF_Stream* pShadingStream, + CPDF_Function** pFuncs, + int nFuncs, + CPDF_ColorSpace* pCS); + + FX_DWORD GetFlag(); + + void GetCoords(FX_FLOAT& x, FX_FLOAT& y); + void GetColor(FX_FLOAT& r, FX_FLOAT& g, FX_FLOAT& b); + + FX_DWORD GetVertex(CPDF_MeshVertex& vertex, CFX_Matrix* pObject2Bitmap); + FX_BOOL GetVertexRow(CPDF_MeshVertex* vertex, + int count, + CFX_Matrix* pObject2Bitmap); + + CPDF_Function** m_pFuncs; + CPDF_ColorSpace* m_pCS; + FX_DWORD m_nFuncs; + FX_DWORD m_nCoordBits; + FX_DWORD m_nCompBits; + FX_DWORD m_nFlagBits; + FX_DWORD m_nComps; + FX_DWORD m_CoordMax; + FX_DWORD m_CompMax; + FX_FLOAT m_xmin; + FX_FLOAT m_xmax; + FX_FLOAT m_ymin; + FX_FLOAT m_ymax; + FX_FLOAT m_ColorMin[8]; + FX_FLOAT m_ColorMax[8]; + CPDF_StreamAcc m_Stream; + CFX_BitStream m_BitStream; +}; + +#endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_MESHSTREAM_H_ |