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_type3char.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_FONT_CPDF_TYPE3CHAR_H_
8#define CORE_FPDFAPI_FONT_CPDF_TYPE3CHAR_H_
9
10#include <memory>
11#include <utility>
12
13#include "core/fpdfapi/font/cpdf_font.h"
14#include "core/fxcrt/fx_coordinates.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "third_party/abseil-cpp/absl/types/optional.h"
17#include "third_party/base/containers/span.h"
18
19class CFX_DIBitmap;
20
22 public:
25
26 static float TextUnitToGlyphUnit(float fTextUnit);
28
30 void InitializeFromStreamData(bool bColored, pdfium::span<const float> pData);
31 void Transform(CPDF_Font::FormIface* pForm, const CFX_Matrix& matrix);
32 void WillBeDestroyed();
33
34 RetainPtr<CFX_DIBitmap> GetBitmap();
35
36 bool colored() const { return m_bColored; }
37 int width() const { return m_Width; }
38 const CFX_Matrix& matrix() const { return m_ImageMatrix; }
39 const FX_RECT& bbox() const { return m_BBox; }
40
41 const CPDF_Font::FormIface* form() const { return m_pForm.get(); }
42 void SetForm(std::unique_ptr<CPDF_Font::FormIface> pForm);
43
44 private:
45 std::unique_ptr<CPDF_Font::FormIface> m_pForm;
46 RetainPtr<CFX_DIBitmap> m_pBitmap;
47 bool m_bColored = false;
48 int m_Width = 0;
49 CFX_Matrix m_ImageMatrix;
50 FX_RECT m_BBox;
51};
52
53#endif // CORE_FPDFAPI_FONT_CPDF_TYPE3CHAR_H_
FX_RECT ToRoundedFxRect() const
CFX_FloatRect(const FX_RECT &rect)
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
void Scale(float fScale)
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
float GetXUnit() const
virtual CFX_FloatRect CalcBoundingBox() const =0
const CFX_Matrix & matrix() const
static float TextUnitToGlyphUnit(float fTextUnit)
void Transform(CPDF_Font::FormIface *pForm, const CFX_Matrix &matrix)
void InitializeFromStreamData(bool bColored, pdfium::span< const float > pData)
RetainPtr< CFX_DIBitmap > GetBitmap()
static void TextUnitRectToGlyphUnitRect(CFX_FloatRect *pRect)
const FX_RECT & bbox() const
const CPDF_Font::FormIface * form() const
bool LoadBitmapFromSoleImageOfForm()
bool colored() const
void SetForm(std::unique_ptr< CPDF_Font::FormIface > pForm)
int width() const
FX_RECT & operator=(const FX_RECT &that)=default
int32_t bottom
int32_t right
int32_t top
int32_t left