merged in the fix for printing \% on PS DC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1226,10 +1226,6 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y )
|
|||||||
wxCoord by = y + size - text_descent; // baseline
|
wxCoord by = y + size - text_descent; // baseline
|
||||||
fprintf( m_pstream, "%d %d moveto\n", XLOG2DEV(x), YLOG2DEV(by) );
|
fprintf( m_pstream, "%d %d moveto\n", XLOG2DEV(x), YLOG2DEV(by) );
|
||||||
|
|
||||||
/* I don't know how to write char to a stream, so I use a mini string */
|
|
||||||
char tmpbuf[2];
|
|
||||||
tmpbuf[1] = 0;
|
|
||||||
|
|
||||||
fprintf( m_pstream, "(" );
|
fprintf( m_pstream, "(" );
|
||||||
const wxWX2MBbuf textbuf = text.mb_str();
|
const wxWX2MBbuf textbuf = text.mb_str();
|
||||||
int len = strlen(textbuf);
|
int len = strlen(textbuf);
|
||||||
@@ -1241,8 +1237,7 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y )
|
|||||||
{
|
{
|
||||||
/* Cope with special characters */
|
/* Cope with special characters */
|
||||||
fprintf( m_pstream, "\\" );
|
fprintf( m_pstream, "\\" );
|
||||||
tmpbuf[0] = (char) c;
|
fputc(c, m_pstream);
|
||||||
fprintf( m_pstream, tmpbuf );
|
|
||||||
}
|
}
|
||||||
else if ( c >= 128 )
|
else if ( c >= 128 )
|
||||||
{
|
{
|
||||||
@@ -1251,8 +1246,7 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmpbuf[0] = (char) c;
|
fputc(c, m_pstream);
|
||||||
fprintf( m_pstream, tmpbuf );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1349,10 +1343,6 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
|
|||||||
if (buffer[i] == ',') buffer[i] = '.';
|
if (buffer[i] == ',') buffer[i] = '.';
|
||||||
fprintf(m_pstream, buffer);
|
fprintf(m_pstream, buffer);
|
||||||
|
|
||||||
/* I don't know how to write char to a stream, so I use a mini string */
|
|
||||||
char tmpbuf[2];
|
|
||||||
tmpbuf[1] = 0;
|
|
||||||
|
|
||||||
fprintf( m_pstream, "(" );
|
fprintf( m_pstream, "(" );
|
||||||
const wxWX2MBbuf textbuf = text.mb_str();
|
const wxWX2MBbuf textbuf = text.mb_str();
|
||||||
int len = strlen(textbuf);
|
int len = strlen(textbuf);
|
||||||
@@ -1363,8 +1353,7 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
|
|||||||
{
|
{
|
||||||
/* Cope with special characters */
|
/* Cope with special characters */
|
||||||
fprintf( m_pstream, "\\" );
|
fprintf( m_pstream, "\\" );
|
||||||
tmpbuf[0] = (char) c;
|
fputc(c, m_pstream);
|
||||||
fprintf( m_pstream, tmpbuf );
|
|
||||||
}
|
}
|
||||||
else if ( c >= 128 )
|
else if ( c >= 128 )
|
||||||
{
|
{
|
||||||
@@ -1373,8 +1362,7 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmpbuf[0] = (char) c;
|
fputc(c, m_pstream);
|
||||||
fprintf( m_pstream, tmpbuf );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user