Optimize selecting font in generated PostScript code
Emit code to select PostScript font only if it is needed (not at every call to SetFont(), but only if font has been really changed prior to a text drawing operation).
This commit is contained in:
@@ -139,6 +139,8 @@ protected:
|
||||
|
||||
// Common part of DoDrawText() and DoDrawRotatedText()
|
||||
void DrawAnyText(const wxWX2MBbuf& textbuf, wxCoord testDescent, double lineHeight);
|
||||
// Actually set PostScript font
|
||||
void SetPSFont();
|
||||
|
||||
FILE* m_pstream; // PostScript output stream
|
||||
unsigned char m_currentRed;
|
||||
@@ -151,6 +153,7 @@ protected:
|
||||
wxPrintData m_printData;
|
||||
double m_pageHeight;
|
||||
wxArrayString m_definedPSFonts;
|
||||
bool m_isFontChanged;
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxPostScriptDCImpl);
|
||||
|
Reference in New Issue
Block a user