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
faxmodule.h
Go to the documentation of this file.
1// Copyright 2016 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_FXCODEC_FAX_FAXMODULE_H_
8#define CORE_FXCODEC_FAX_FAXMODULE_H_
9
10#include <stdint.h>
11
12#include <memory>
13
14#include "build/build_config.h"
15#include "core/fxcrt/span.h"
16
17#if BUILDFLAG(IS_WIN)
18#include "core/fxcrt/data_vector.h"
19#include "core/fxcrt/retain_ptr.h"
20#endif
21
22class CFX_DIBBase;
23
24namespace fxcodec {
25
26class ScanlineDecoder;
27
28class FaxModule {
29 public:
31 pdfium::span<const uint8_t> src_span,
32 int width,
33 int height,
34 int K,
35 bool EndOfLine,
36 bool EncodedByteAlign,
37 bool BlackIs1,
38 int Columns,
39 int Rows);
40
41 // Return the ending bit position.
42 static int FaxG4Decode(pdfium::span<const uint8_t> src_buf,
43 int starting_bitpos,
44 int width,
45 int height,
46 int pitch,
47 uint8_t* dest_buf);
48
49#if BUILDFLAG(IS_WIN)
50 // `src` must have a BPP value of 1.
52#endif // BUILDFLAG(IS_WIN)
53
54 FaxModule() = delete;
55 FaxModule(const FaxModule&) = delete;
56 FaxModule& operator=(const FaxModule&) = delete;
57};
58
59} // namespace fxcodec
60
62
63#endif // CORE_FXCODEC_FAX_FAXMODULE_H_
fxcrt::ByteString ByteString
Definition bytestring.h:180
#define DCHECK
Definition check.h:33
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition cpdf_array.h:29
int GetIntegerFor(const ByteString &key) const
int GetIntegerFor(const ByteString &key, int default_int) const
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
FaxModule(const FaxModule &)=delete
static int FaxG4Decode(pdfium::span< const uint8_t > src_buf, int starting_bitpos, int width, int height, int pitch, uint8_t *dest_buf)
FaxModule & operator=(const FaxModule &)=delete
static std::unique_ptr< ScanlineDecoder > CreateDecoder(pdfium::span< const uint8_t > src_span, int width, int height, int K, bool EndOfLine, bool EncodedByteAlign, bool BlackIs1, int Columns, int Rows)
ByteString & operator+=(char ch)
bool operator==(const char *ptr) const
ByteString & operator+=(const char *str)
ByteString & operator=(const char *str)
static WideString FromUTF8(ByteStringView str)
fxcodec::DataAndBytesConsumed DataAndBytesConsumed
fxcodec::FaxModule FaxModule
Definition faxmodule.h:61
static size_t StripLanguageCodes(pdfium::span< wchar_t > s, size_t n)
std::optional< DecoderArray > GetDecoderArray(RetainPtr< const CPDF_Dictionary > pDict)
ByteString PDF_EncodeString(ByteStringView src)
std::optional< PDFDataDecodeResult > PDF_DataDecode(pdfium::span< const uint8_t > src_span, uint32_t estimated_size, bool bImageAcc, const DecoderArray &decoder_array)
fxcodec::DataAndBytesConsumed HexDecode(pdfium::span< const uint8_t > src_span)
ByteString PDF_EncodeText(WideStringView str)
bool ValidateDecoderPipeline(const CPDF_Array *pDecoders)
fxcodec::DataAndBytesConsumed FlateOrLZWDecode(bool use_lzw, pdfium::span< const uint8_t > src_span, const CPDF_Dictionary *pParams, uint32_t estimated_size)
WideString PDF_DecodeText(pdfium::span< const uint8_t > span)
std::unique_ptr< fxcodec::ScanlineDecoder > CreateFaxDecoder(pdfium::span< const uint8_t > src_span, int width, int height, const CPDF_Dictionary *pParams)
const std::array< uint16_t, 256 > kPDFDocEncoding
fxcodec::DataAndBytesConsumed A85Decode(pdfium::span< const uint8_t > src_span)
fxcodec::DataAndBytesConsumed RunLengthDecode(pdfium::span< const uint8_t > src_span)
ByteString PDF_HexEncodeString(ByteStringView src)
std::unique_ptr< fxcodec::ScanlineDecoder > CreateFlateDecoder(pdfium::span< const uint8_t > src_span, int width, int height, int nComps, int bpc, const CPDF_Dictionary *pParams)
bool PDFCharIsLineEnding(uint8_t c)
int FXSYS_HexCharToInt(char c)
#define FX_INVALID_OFFSET
pdfium::CheckedNumeric< uint32_t > FX_SAFE_UINT32
pdfium::CheckedNumeric< int32_t > FX_SAFE_INT32
fxcrt::ByteStringView ByteStringView
fxcrt::WideStringView WideStringView
PDFDataDecodeResult(PDFDataDecodeResult &&that) noexcept
PDFDataDecodeResult & operator=(PDFDataDecodeResult &&that) noexcept
fxcrt::WideString WideString
Definition widestring.h:207