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 ()
 
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 (const RetainPtr< const CFX_DIBBase > &pBitmap, 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 absl::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 49 of file cfx_psrenderer.h.

Member Enumeration Documentation

◆ RenderingLevel

enum class CFX_PSRenderer::RenderingLevel
strong
Enumerator
kLevel2 
kLevel3 
kLevel3Type42 

Definition at line 51 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 221 of file cfx_psrenderer.cpp.

References CFX_PSRenderer().

Referenced by CFX_PSRenderer(), and TEST().

+ 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 227 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 504 of file cfx_psrenderer.cpp.

References CFX_Matrix::a, CFX_Matrix::b, CFX_Matrix::c, CFX_Matrix::d, CFX_Matrix::e, CFX_Matrix::f, fxcrt::ByteString::IsEmpty(), k1bppRgb, k8bppRgb, kRgb, kRgb32, and fxcrt::ByteString::operator=().

Referenced by SetDIBits(), StretchDIBits(), and TEST().

+ 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 802 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 931 of file cfx_psrenderer.cpp.

◆ GenerateType42SfntDataForTesting()

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

Definition at line 924 of file cfx_psrenderer.cpp.

◆ GetClipBox()

FX_RECT CFX_PSRenderer::GetClipBox ( )
inline

Definition at line 73 of file cfx_psrenderer.h.

◆ Init()

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

Definition at line 231 of file cfx_psrenderer.cpp.

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

Referenced by TEST().

+ Here is the caller graph for this function:

◆ RestoreState()

void CFX_PSRenderer::RestoreState ( bool bKeepSaved)

Definition at line 296 of file cfx_psrenderer.cpp.

◆ SaveState()

void CFX_PSRenderer::SaveState ( )

Definition at line 290 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 354 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 375 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 ( const RetainPtr< const CFX_DIBBase > & pBitmap,
uint32_t color,
int dest_left,
int dest_top )

Definition at line 481 of file cfx_psrenderer.cpp.

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

+ 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 491 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: