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
CFX_PSRenderer Class Reference

#include <cfx_psrenderer.h>

Collaboration diagram for CFX_PSRenderer:

Classes

struct  Glyph

Public Types

enum class  RenderingLevel { kLevel2 , kLevel3 , kLevel3Type42 }

Public Member Functions

 CFX_PSRenderer (CFX_PSFontTracker *font_tracker, const EncoderIface *encoder_iface)
 ~CFX_PSRenderer ()
void Init (const RetainPtr< IFX_RetainableWriteStream > &stream, RenderingLevel level, int width, int height)
void SaveState ()
void RestoreState (bool bKeepSaved)
void SetClip_PathFill (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_FillRenderOptions &fill_options)
void SetClip_PathStroke (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState)
FX_RECT GetClipBox () const
bool DrawPath (const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options)
bool SetDIBits (RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top)
bool StretchDIBits (RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FXDIB_ResampleOptions &options)
bool DrawDIBits (RetainPtr< const CFX_DIBBase > bitmap, uint32_t color, const CFX_Matrix &matrix, const FXDIB_ResampleOptions &options)
bool DrawText (int nChars, const TextCharPos *pCharPos, CFX_Font *pFont, const CFX_Matrix &mtObject2Device, float font_size, uint32_t color)

Static Public Member Functions

static std::optional< ByteStringGenerateType42SfntDataForTesting (const ByteString &psname, pdfium::span< const uint8_t > font_data)
static ByteString GenerateType42FontDictionaryForTesting (const ByteString &psname, const FX_RECT &bbox, size_t num_glyphs, size_t glyphs_per_descendant_font)

Detailed Description

Definition at line 48 of file cfx_psrenderer.h.

Member Enumeration Documentation

◆ RenderingLevel

enum class CFX_PSRenderer::RenderingLevel
strong
Enumerator
kLevel2 
kLevel3 
kLevel3Type42 

Definition at line 50 of file cfx_psrenderer.h.

Constructor & Destructor Documentation

◆ CFX_PSRenderer()

CFX_PSRenderer::CFX_PSRenderer ( CFX_PSFontTracker * font_tracker,
const EncoderIface * encoder_iface )

Definition at line 223 of file cfx_psrenderer.cpp.

References CFX_PSRenderer().

Referenced by CFX_PSRenderer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CFX_PSRenderer()

CFX_PSRenderer::~CFX_PSRenderer ( )

Definition at line 229 of file cfx_psrenderer.cpp.

Member Function Documentation

◆ DrawDIBits()

bool CFX_PSRenderer::DrawDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
uint32_t color,
const CFX_Matrix & matrix,
const FXDIB_ResampleOptions & options )

Definition at line 506 of file cfx_psrenderer.cpp.

References CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, FXSYS_memcpy(), k1bppMask, k1bppRgb, k8bppMask, k8bppRgb, kBgr, kBgra, kBgrx, kInvalid, and fxcrt::ByteString::operator=().

Referenced by SetDIBits(), and StretchDIBits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawPath()

bool CFX_PSRenderer::DrawPath ( const CFX_Path & path,
const CFX_Matrix * pObject2Device,
const CFX_GraphStateData * pGraphState,
uint32_t fill_color,
uint32_t stroke_color,
const CFX_FillRenderOptions & fill_options )

◆ DrawText()

bool CFX_PSRenderer::DrawText ( int nChars,
const TextCharPos * pCharPos,
CFX_Font * pFont,
const CFX_Matrix & mtObject2Device,
float font_size,
uint32_t color )

Definition at line 821 of file cfx_psrenderer.cpp.

References CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, CFX_Matrix::GetXUnit(), and CFX_Matrix::GetYUnit().

Here is the call graph for this function:

◆ GenerateType42FontDictionaryForTesting()

ByteString CFX_PSRenderer::GenerateType42FontDictionaryForTesting ( const ByteString & psname,
const FX_RECT & bbox,
size_t num_glyphs,
size_t glyphs_per_descendant_font )
static

Definition at line 949 of file cfx_psrenderer.cpp.

◆ GenerateType42SfntDataForTesting()

std::optional< ByteString > CFX_PSRenderer::GenerateType42SfntDataForTesting ( const ByteString & psname,
pdfium::span< const uint8_t > font_data )
static

Definition at line 942 of file cfx_psrenderer.cpp.

◆ GetClipBox()

FX_RECT CFX_PSRenderer::GetClipBox ( ) const
inline

Definition at line 72 of file cfx_psrenderer.h.

◆ Init()

void CFX_PSRenderer::Init ( const RetainPtr< IFX_RetainableWriteStream > & stream,
RenderingLevel level,
int width,
int height )

Definition at line 233 of file cfx_psrenderer.cpp.

References FX_RECT::bottom, FX_RECT::left, FX_RECT::right, and FX_RECT::top.

◆ RestoreState()

void CFX_PSRenderer::RestoreState ( bool bKeepSaved)

Definition at line 298 of file cfx_psrenderer.cpp.

◆ SaveState()

void CFX_PSRenderer::SaveState ( )

Definition at line 292 of file cfx_psrenderer.cpp.

◆ SetClip_PathFill()

void CFX_PSRenderer::SetClip_PathFill ( const CFX_Path & path,
const CFX_Matrix * pObject2Device,
const CFX_FillRenderOptions & fill_options )

Definition at line 356 of file cfx_psrenderer.cpp.

References CFX_FloatRect::bottom, FX_RECT::bottom, CFX_FillRenderOptions::fill_type, CFX_Path::GetBoundingBox(), CFX_FillRenderOptions::kWinding, CFX_FloatRect::left, FX_RECT::left, CFX_FloatRect::operator=(), CFX_FloatRect::right, FX_RECT::right, CFX_FloatRect::top, FX_RECT::top, and CFX_Matrix::TransformRect().

Here is the call graph for this function:

◆ SetClip_PathStroke()

void CFX_PSRenderer::SetClip_PathStroke ( const CFX_Path & path,
const CFX_Matrix * pObject2Device,
const CFX_GraphStateData * pGraphState )

Definition at line 377 of file cfx_psrenderer.cpp.

References CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, CFX_Path::GetBoundingBoxForStrokePath(), CFX_FloatRect::GetOuterRect(), FX_RECT::Intersect(), CFX_GraphStateData::m_LineWidth, CFX_GraphStateData::m_MiterLimit, and CFX_Matrix::TransformRect().

Here is the call graph for this function:

◆ SetDIBits()

bool CFX_PSRenderer::SetDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
uint32_t color,
int dest_left,
int dest_top )

Definition at line 483 of file cfx_psrenderer.cpp.

References FXDIB_ResampleOptions::FXDIB_ResampleOptions(), DrawDIBits(), and CFX_RenderDevice::GetFlipMatrix().

Here is the call graph for this function:

◆ StretchDIBits()

bool CFX_PSRenderer::StretchDIBits ( RetainPtr< const CFX_DIBBase > bitmap,
uint32_t color,
int dest_left,
int dest_top,
int dest_width,
int dest_height,
const FXDIB_ResampleOptions & options )

Definition at line 493 of file cfx_psrenderer.cpp.

References DrawDIBits(), and CFX_RenderDevice::GetFlipMatrix().

Here is the call graph for this function:

The documentation for this class was generated from the following files: