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_type3cache.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_TYPE3CACHE_H_
8#define CORE_FPDFAPI_RENDER_CPDF_TYPE3CACHE_H_
9
10#include <stdint.h>
11
12#include <map>
13#include <memory>
14#include <tuple>
15
16#include "core/fxcrt/bytestring.h"
17#include "core/fxcrt/observed_ptr.h"
18#include "core/fxcrt/retain_ptr.h"
19
20class CFX_GlyphBitmap;
21class CFX_Matrix;
22class CPDF_Type3Font;
24
25class CPDF_Type3Cache final : public Retainable, public Observable {
26 public:
28
29 const CFX_GlyphBitmap* LoadGlyph(uint32_t charcode,
30 const CFX_Matrix& mtMatrix);
31
32 private:
33 using SizeKey = std::tuple<int, int, int, int>;
34
35 explicit CPDF_Type3Cache(CPDF_Type3Font* pFont);
36 ~CPDF_Type3Cache() override;
37
38 std::unique_ptr<CFX_GlyphBitmap> RenderGlyph(CPDF_Type3GlyphMap* pSize,
39 uint32_t charcode,
40 const CFX_Matrix& mtMatrix);
41
42 RetainPtr<CPDF_Type3Font> const m_pFont;
43 std::map<SizeKey, std::unique_ptr<CPDF_Type3GlyphMap>> m_SizeMap;
44};
45
46#endif // CORE_FPDFAPI_RENDER_CPDF_TYPE3CACHE_H_
RetainPtr< CPDF_TransferFunc > GetTransferFunc(RetainPtr< const CPDF_Object > pObj)
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
RenderDataIface * GetRenderData() const
~CPDF_Type3Cache() override
const CFX_GlyphBitmap * LoadGlyph(uint32_t charcode, const CFX_Matrix &mtMatrix)
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224