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 "core/fxcrt/raw_span.h"
14#include "core/fxcrt/span.h"
15
17 public:
18 explicit CFX_BitStream(pdfium::span<const uint8_t> pData);
20
21 void ByteAlign();
22
23 bool IsEOF() const { return m_BitPos >= m_BitSize; }
24 size_t GetPos() const { return m_BitPos; }
25 uint32_t GetBits(uint32_t nBits);
26
27 void SkipBits(size_t nBits) { m_BitPos += nBits; }
28 void Rewind() { m_BitPos = 0; }
29
31 return m_BitSize >= m_BitPos ? m_BitSize - m_BitPos : 0;
32 }
33
34 private:
35 size_t m_BitPos = 0;
36 const size_t m_BitSize;
37 pdfium::raw_span<const uint8_t> const m_pData;
38};
39
40#endif // CORE_FXCRT_CFX_BITSTREAM_H_
#define DCHECK
Definition check.h:33
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
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition cpdf_array.h:29
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
CFX_PointF ReadCoords() const
uint32_t ComponentBits() const
uint32_t ReadFlag() 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)
FX_RGB_STRUCT< float > ReadColor() const
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)
CFX_PointF position
FX_RGB_STRUCT< float > rgb
CPDF_MeshVertex(const CPDF_MeshVertex &)
@ kCoonsPatchMeshShading
@ kTensorProductPatchMeshShading
@ kLatticeFormGouraudTriangleMeshShading
@ kFreeFormGouraudTriangleMeshShading
CFX_PTemplate< float > CFX_PointF