wxPdfDocument 1.2.0
Public Member Functions | Protected Member Functions | List of all members
wxPdfCffDecoder Class Reference

Class representing CFF decoder for charstrings of type 1 and 2. (For internal use only) More...

#include <pdfcffdecoder.h>

Public Member Functions

 wxPdfCffDecoder ()
 Default constructor.
 
 wxPdfCffDecoder (wxPdfCffIndexArray *globalSubrIndex, wxPdfSortedArrayInt *hGlobalSubrsUsed, wxArrayInt *lGlobalSubrsUsed)
 Constructor.
 
virtual ~wxPdfCffDecoder ()
 Default destructor.
 
bool GetCharWidthAndComposite (wxPdfCffIndexElement &charstring, int &width, bool &isComposite, int &bchar, int &achar)
 Get character width and composites.
 
int CalcBias (int nSubrs)
 Calculate the bias.
 
void ReadASubr (wxInputStream *stream, int begin, int end, int globalBias, int localBias, wxPdfSortedArrayInt &hSubrsUsed, wxArrayInt &lSubrsUsed, wxPdfCffIndexArray &localSubIndex)
 Read a subroutine from an input stream.
 

Protected Member Functions

unsigned char ReadByte (wxInputStream *stream)
 Read a byte from an input stream.
 
short ReadShort (wxInputStream *stream)
 Read a short integer from an input stream.
 
int ReadInt (wxInputStream *stream)
 Read an integer from an input stream.
 
void HandleStack ()
 Handle the stack based on the last operator on stack.
 
int StackOpp ()
 Get the type of the last operator on stack.
 
void EmptyStack ()
 Empty the stack.
 
void PopStack ()
 Pop an entry from the stack.
 
void PushStack ()
 Push an entry on the stack.
 
void ReadCommand (wxInputStream *stream)
 Read a command from the input stream.
 
int CalcHints (wxInputStream *stream, int begin, int end, int globalBias, int localBias, wxPdfCffIndexArray &localSubIndex)
 Calculate the hints.
 

Detailed Description

Class representing CFF decoder for charstrings of type 1 and 2. (For internal use only)

Constructor & Destructor Documentation

◆ wxPdfCffDecoder() [1/2]

wxPdfCffDecoder::wxPdfCffDecoder ( )

Default constructor.

◆ wxPdfCffDecoder() [2/2]

wxPdfCffDecoder::wxPdfCffDecoder ( wxPdfCffIndexArray * globalSubrIndex,
wxPdfSortedArrayInt * hGlobalSubrsUsed,
wxArrayInt * lGlobalSubrsUsed )

Constructor.

Parameters
globalSubrIndexthe global subroutine index
hGlobalSubrsUsedsorted list of used global subroutines
lGlobalSubrsUsedunordered list of used global subroutines

◆ ~wxPdfCffDecoder()

virtual wxPdfCffDecoder::~wxPdfCffDecoder ( )
virtual

Default destructor.

Member Function Documentation

◆ CalcBias()

int wxPdfCffDecoder::CalcBias ( int nSubrs)

Calculate the bias.

Parameters
nSubrsthe number of subroutines
Returns
the bias

◆ CalcHints()

int wxPdfCffDecoder::CalcHints ( wxInputStream * stream,
int begin,
int end,
int globalBias,
int localBias,
wxPdfCffIndexArray & localSubIndex )
protected

Calculate the hints.

◆ EmptyStack()

void wxPdfCffDecoder::EmptyStack ( )
protected

Empty the stack.

◆ GetCharWidthAndComposite()

bool wxPdfCffDecoder::GetCharWidthAndComposite ( wxPdfCffIndexElement & charstring,
int & width,
bool & isComposite,
int & bchar,
int & achar )

Get character width and composites.

From a charstring entry the character width and - if appropriate - the composites are extracted.

Parameters
[in]charstringthe charstring entry
[out]widththe character width
[out]isCompositeflag whether the charstring describes a composite
[out]bcharthe base character of the composite
[out]acharthe accent character of the composite

◆ HandleStack()

void wxPdfCffDecoder::HandleStack ( )
protected

Handle the stack based on the last operator on stack.

◆ PopStack()

void wxPdfCffDecoder::PopStack ( )
protected

Pop an entry from the stack.

◆ PushStack()

void wxPdfCffDecoder::PushStack ( )
protected

Push an entry on the stack.

◆ ReadASubr()

void wxPdfCffDecoder::ReadASubr ( wxInputStream * stream,
int begin,
int end,
int globalBias,
int localBias,
wxPdfSortedArrayInt & hSubrsUsed,
wxArrayInt & lSubrsUsed,
wxPdfCffIndexArray & localSubIndex )

Read a subroutine from an input stream.

Parameters
streamthe input stream
beginstart position of the subroutine in the input stream
endend position of the subroutine in the input stream
globalBiasvalue of the global bias
localBiasvalue of the local bias
hSubrsUsedsorted list of used subroutines
lSubrsUsedunordered list of used subroutines
localSubIndexthe local subroutine index

◆ ReadByte()

unsigned char wxPdfCffDecoder::ReadByte ( wxInputStream * stream)
protected

Read a byte from an input stream.

◆ ReadCommand()

void wxPdfCffDecoder::ReadCommand ( wxInputStream * stream)
protected

Read a command from the input stream.

◆ ReadInt()

int wxPdfCffDecoder::ReadInt ( wxInputStream * stream)
protected

Read an integer from an input stream.

◆ ReadShort()

short wxPdfCffDecoder::ReadShort ( wxInputStream * stream)
protected

Read a short integer from an input stream.

◆ StackOpp()

int wxPdfCffDecoder::StackOpp ( )
protected

Get the type of the last operator on stack.


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