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
cpdf_boolean.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_FPDFAPI_PARSER_CPDF_BOOLEAN_H_
8#define CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_
9
10#include "core/fpdfapi/parser/cpdf_object.h"
11#include "core/fxcrt/bytestring.h"
12#include "core/fxcrt/retain_ptr.h"
13
14class CPDF_Boolean final : public CPDF_Object {
15 public:
17
18 // CPDF_Object:
19 Type GetType() const override;
20 RetainPtr<CPDF_Object> Clone() const override;
21 ByteString GetString() const override;
22 int GetInteger() const override;
23 void SetString(const ByteString& str) override;
24 CPDF_Boolean* AsMutableBoolean() override;
25 bool WriteTo(IFX_ArchiveStream* archive,
26 const CPDF_Encryptor* encryptor) const override;
27
28 private:
29 CPDF_Boolean();
30 explicit CPDF_Boolean(bool value);
31 ~CPDF_Boolean() override;
32
33 bool m_bValue = false;
34};
35
36inline CPDF_Boolean* ToBoolean(CPDF_Object* obj) {
37 return obj ? obj->AsMutableBoolean() : nullptr;
38}
39
40inline const CPDF_Boolean* ToBoolean(const CPDF_Object* obj) {
41 return obj ? obj->AsBoolean() : nullptr;
42}
43
44#endif // CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_
ByteString GetString() const override
Type GetType() const override
int GetInteger() const override
void SetString(const ByteString &str) override
~CPDF_Boolean() override
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
CPDF_Boolean * AsMutableBoolean() override
RetainPtr< CPDF_Object > Clone() const override
void SetJpegImage(RetainPtr< IFX_SeekableReadStream > pFile)
bool Continue(PauseIndicatorIface *pPause)
RetainPtr< CFX_DIBBase > LoadDIBBase() const
void ResetCache(CPDF_Page *pPage)
RetainPtr< const CPDF_Dictionary > GetOC() const
RetainPtr< const CPDF_Stream > GetStream() const
~CPDF_Image() override
bool StartLoadDIBBase(const CPDF_Dictionary *pFormResource, const CPDF_Dictionary *pPageResource, bool bStdCS, CPDF_ColorSpace::Family GroupFamily, bool bLoadMask, const CFX_Size &max_size_required)
RetainPtr< const CPDF_Dictionary > GetDict() const
void SetJpegImageInline(RetainPtr< IFX_SeekableReadStream > pFile)
RetainPtr< CFX_DIBBase > DetachBitmap()
static bool IsValidJpegBitsPerComponent(int32_t bpc)
void SetImage(const RetainPtr< CFX_DIBitmap > &pBitmap)
RetainPtr< CPDF_DIB > CreateNewDIB() const
static bool IsValidJpegComponent(int32_t comps)
RetainPtr< CFX_DIBBase > DetachMask()
void ConvertStreamToIndirectObject()
const CPDF_Boolean * AsBoolean() const
virtual CPDF_Boolean * AsMutableBoolean()
CPDF_Page * GetPage() const
void ResetBitmapForImage(RetainPtr< CPDF_Image > pImage)
RetainPtr< CFX_DIBBase > DetachCurBitmap()
bool StartGetCachedBitmap(RetainPtr< CPDF_Image > pImage, const CPDF_Dictionary *pFormResources, const CPDF_Dictionary *pPageResources, bool bStdCS, CPDF_ColorSpace::Family eFamily, bool bLoadMask, const CFX_Size &max_size_required)
bool Continue(PauseIndicatorIface *pPause)
uint32_t GetCurMatteColor() const
void CacheOptimization(int32_t dwLimitCacheSize)
CPDF_PageImageCache(CPDF_Page *pPage)
RetainPtr< CFX_DIBBase > DetachCurMask()
uint32_t GetTimeCount() const
CPDF_PageImageCache * GetPageImageCache()
Definition cpdf_page.h:83
const CPDF_Boolean * ToBoolean(const CPDF_Object *obj)
CPDF_Boolean * ToBoolean(CPDF_Object *obj)
#define FXARGB_B(argb)
Definition fx_dib.h:127
#define FXARGB_G(argb)
Definition fx_dib.h:126
#define FXARGB_R(argb)
Definition fx_dib.h:125
FXDIB_Format
Definition fx_dib.h:19
const char kDecodeParms[]
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224