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_textrenderer.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_TEXTRENDERER_H_
8#define CORE_FPDFAPI_RENDER_CPDF_TEXTRENDERER_H_
9
10#include <stdint.h>
11
12#include "core/fxcrt/bytestring.h"
13#include "core/fxcrt/fx_coordinates.h"
14#include "core/fxge/dib/fx_dib.h"
15#include "third_party/base/containers/span.h"
16
19class CFX_Path;
21class CPDF_Font;
23
25 public:
26 static void DrawTextString(CFX_RenderDevice* pDevice,
27 float origin_x,
28 float origin_y,
29 CPDF_Font* pFont,
30 float font_size,
31 const CFX_Matrix& matrix,
32 const ByteString& str,
33 FX_ARGB fill_argb,
34 const CPDF_RenderOptions& options);
35
36 static bool DrawTextPath(CFX_RenderDevice* pDevice,
37 pdfium::span<const uint32_t> char_codes,
38 pdfium::span<const float> char_pos,
39 CPDF_Font* pFont,
40 float font_size,
41 const CFX_Matrix& mtText2User,
42 const CFX_Matrix* pUser2Device,
43 const CFX_GraphStateData* pGraphState,
44 FX_ARGB fill_argb,
45 FX_ARGB stroke_argb,
46 CFX_Path* pClippingPath,
47 const CFX_FillRenderOptions& fill_options);
48
49 static bool DrawNormalText(CFX_RenderDevice* pDevice,
50 pdfium::span<const uint32_t> char_codes,
51 pdfium::span<const float> char_pos,
52 CPDF_Font* pFont,
53 float font_size,
54 const CFX_Matrix& mtText2Device,
55 FX_ARGB fill_argb,
56 const CPDF_RenderOptions& options);
57
61};
62
63#endif // CORE_FPDFAPI_RENDER_CPDF_TEXTRENDERER_H_
bool Attach(RetainPtr< CFX_DIBitmap > pBitmap)
CFX_Matrix(const CFX_Matrix &other)=default
bool FillRect(const FX_RECT &rect, uint32_t color)
int GetHeight() const
Layer(const Layer &that)
Layer(CPDF_PageObjectHolder *pHolder, const CFX_Matrix &matrix)
void AppendLayer(CPDF_PageObjectHolder *pObjectHolder, const CFX_Matrix &mtObject2Device)
CPDF_RenderContext(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pPageResources, CPDF_PageImageCache *pPageCache)
void GetBackgroundToDevice(CFX_RenderDevice *device, const CPDF_PageObject *object, const CPDF_RenderOptions *options, const CFX_Matrix &matrix)
void GetBackgroundToBitmap(RetainPtr< CFX_DIBitmap > bitmap, const CPDF_PageObject *object, const CFX_Matrix &matrix)
void Render(CFX_RenderDevice *pDevice, const CPDF_PageObject *pStopObj, const CPDF_RenderOptions *pOptions, const CFX_Matrix *pLastMatrix)
static bool DrawTextPath(CFX_RenderDevice *pDevice, pdfium::span< const uint32_t > char_codes, pdfium::span< const float > char_pos, CPDF_Font *pFont, float font_size, const CFX_Matrix &mtText2User, const CFX_Matrix *pUser2Device, const CFX_GraphStateData *pGraphState, FX_ARGB fill_argb, FX_ARGB stroke_argb, CFX_Path *pClippingPath, const CFX_FillRenderOptions &fill_options)
CPDF_TextRenderer(const CPDF_TextRenderer &)=delete
static void DrawTextString(CFX_RenderDevice *pDevice, float origin_x, float origin_y, CPDF_Font *pFont, float font_size, const CFX_Matrix &matrix, const ByteString &str, FX_ARGB fill_argb, const CPDF_RenderOptions &options)
static bool DrawNormalText(CFX_RenderDevice *pDevice, pdfium::span< const uint32_t > char_codes, pdfium::span< const float > char_pos, CPDF_Font *pFont, float font_size, const CFX_Matrix &mtText2Device, FX_ARGB fill_argb, const CPDF_RenderOptions &options)
CPDF_TextRenderer()=delete
CPDF_TextRenderer & operator=(const CPDF_TextRenderer &)=delete
constexpr FX_RECT(int l, int t, int r, int b)