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 RetainPtr<CPDF_Type3Cache> GetCachedType3(CPDF_Type3Font* pFont);
43 RetainPtr<CPDF_TransferFunc> GetTransferFunc(
44 RetainPtr<const CPDF_Object> pObj);
45
46#if BUILDFLAG(IS_WIN)
48#endif
49
50 protected:
51 // protected for use by test subclasses.
52 RetainPtr<CPDF_TransferFunc> CreateTransferFunc(
53 RetainPtr<const CPDF_Object> pObj) const;
54
55 private:
56 // TODO(tsepez): investigate this map outliving its font keys.
57 std::map<CPDF_Font*, ObservedPtr<CPDF_Type3Cache>> m_Type3FaceMap;
58 std::map<RetainPtr<const CPDF_Object>,
59 ObservedPtr<CPDF_TransferFunc>,
60 std::less<>>
61 m_TransferFuncMap;
62
63#if BUILDFLAG(IS_WIN)
65#endif
66};
67
68#endif // CORE_FPDFAPI_RENDER_CPDF_DOCRENDERDATA_H_
RetainPtr< CPDF_TransferFunc > GetTransferFunc(RetainPtr< const CPDF_Object > pObj)
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_Type3Cache > GetCachedType3(CPDF_Type3Font *pFont)
~CPDF_DocRenderData() override
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)