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_docrenderdata.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_RENDER_CPDF_DOCRENDERDATA_H_
8#define CORE_FPDFAPI_RENDER_CPDF_DOCRENDERDATA_H_
9
10#include <functional>
11#include <map>
12
13#include "build/build_config.h"
14#include "core/fpdfapi/parser/cpdf_document.h"
15#include "core/fxcrt/observed_ptr.h"
16#include "core/fxcrt/retain_ptr.h"
17
18#if BUILDFLAG(IS_WIN)
19#include <memory>
20#endif
21
22class CPDF_Font;
23class CPDF_Object;
24class CPDF_TransferFunc;
25class CPDF_Type3Cache;
26class CPDF_Type3Font;
27
28#if BUILDFLAG(IS_WIN)
29class CFX_PSFontTracker;
30#endif
31
33 public:
35
37 ~CPDF_DocRenderData() override;
38
41
42 // The argument to these methods must be non-null.
43 RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* font);
44 RetainPtr<CPDF_TransferFunc> GetTransferFunc(
45 RetainPtr<const CPDF_Object> obj);
46
47#if BUILDFLAG(IS_WIN)
49#endif
50
51 protected:
52 // protected for use by test subclasses.
53 RetainPtr<CPDF_TransferFunc> CreateTransferFunc(
54 RetainPtr<const CPDF_Object> pObj) const;
55
56 private:
57 // TODO(tsepez): investigate this map outliving its font keys.
58 std::map<CPDF_Font*, ObservedPtr<CPDF_Type3Cache>> m_Type3FaceMap;
59 std::map<RetainPtr<const CPDF_Object>,
60 ObservedPtr<CPDF_TransferFunc>,
61 std::less<>>
62 m_TransferFuncMap;
63
64#if BUILDFLAG(IS_WIN)
66#endif
67};
68
69#endif // CORE_FPDFAPI_RENDER_CPDF_DOCRENDERDATA_H_
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
CPDF_DocRenderData & operator=(const CPDF_DocRenderData &)=delete
RetainPtr< CPDF_TransferFunc > CreateTransferFunc(RetainPtr< const CPDF_Object > pObj) const
static CPDF_DocRenderData * FromDocument(const CPDF_Document *pDoc)
RetainPtr< CPDF_TransferFunc > GetTransferFunc(RetainPtr< const CPDF_Object > obj)
~CPDF_DocRenderData() override
RetainPtr< CPDF_Type3Cache > GetCachedType3(CPDF_Type3Font *font)
CPDF_DocRenderData(const CPDF_DocRenderData &)=delete
RetainPtr< CPDF_Image > GetImage() const
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)
static void Destroy()
static void Create()
virtual CPDF_ImageObject * AsImage()
static RetainPtr< IFX_SeekableReadStream > CreateFromFilename(const char *filename)
Definition fx_stream.cpp:68
static std::string GetTestFilePath(const std::string &file_name)
TEST(FXCRYPT, MD5GenerateEmtpyData)