Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_bitstream.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
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_FXCRT_CFX_BITSTREAM_H_
8#define CORE_FXCRT_CFX_BITSTREAM_H_
9
10#include <stddef.h>
11#include <stdint.h>
12
13#include "third_party/base/containers/span.h"
14
16 public:
17 explicit CFX_BitStream(pdfium::span<const uint8_t> pData);
19
20 void ByteAlign();
21
22 bool IsEOF() const { return m_BitPos >= m_BitSize; }
23 size_t GetPos() const { return m_BitPos; }
24 uint32_t GetBits(uint32_t nBits);
25
26 void SkipBits(size_t nBits) { m_BitPos += nBits; }
27 void Rewind() { m_BitPos = 0; }
28
30 return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0;
31 }
32
33 private:
34 size_t m_BitPos = 0;
35 const size_t m_BitSize;
36 pdfium::span<const uint8_t> const m_pData;
37};
38
39#endif // CORE_FXCRT_CFX_BITSTREAM_H_
size_t BitsRemaining() const
void SkipBits(size_t nBits)
uint32_t GetBits(uint32_t nBits)
size_t GetPos() const
CFX_BitStream(pdfium::span< const uint8_t > pData)
bool IsEOF() const
CFX_PointF ReadCoords()
uint32_t ComponentBits() const
uint32_t Components() const
bool CanReadCoords() const
bool CanReadFlag() const
bool ReadVertex(const CFX_Matrix &pObject2Bitmap, CPDF_MeshVertex *vertex, uint32_t *flag)
void SkipBits(uint32_t nbits)
bool CanReadColor() const
CPDF_MeshStream(ShadingType type, const std::vector< std::unique_ptr< CPDF_Function > > &funcs, RetainPtr< const CPDF_Stream > pShadingStream, RetainPtr< CPDF_ColorSpace > pCS)
std::vector< CPDF_MeshVertex > ReadVertexRow(const CFX_Matrix &pObject2Bitmap, int count)
std::tuple< float, float, float > ReadColor()
CFX_PointF position
CPDF_MeshVertex(const CPDF_MeshVertex &)
@ kCoonsPatchMeshShading
@ kTensorProductPatchMeshShading
@ kLatticeFormGouraudTriangleMeshShading
@ kFreeFormGouraudTriangleMeshShading