X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a148cfb64451d6553cf66d1075b654e54e908210..55e18dbe2faca047b2008734782d52a6eb140115:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 2c78950e71..f4df4fc183 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -1479,11 +1479,8 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord int size = m_font.GetPointSize(); - long by = y + (long)floor( double(size) * 2.0 / 3.0 ); // approximate baseline - - // FIXME only correct for 90 degrees fprintf(m_pstream, "%d %d moveto\n", - LogicalToDeviceX((wxCoord)(x + size)), LogicalToDeviceY((wxCoord)by) ); + LogicalToDeviceX(x), LogicalToDeviceY(y)); char buffer[100]; sprintf(buffer, "%.8f rotate\n", angle); @@ -1884,6 +1881,8 @@ void wxPostScriptDC::EndDoc () wxString command; command += m_printData.GetPrinterCommand(); command += wxT(" "); + command += m_printData.GetPrinterOptions(); + command += wxT(" "); command += m_printData.GetFilename(); wxExecute( command, TRUE ); @@ -1991,6 +1990,8 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, { if (x) (*x) = 0; if (y) (*y) = 0; + if (descent) (*descent) = 0; + if (externalLeading) (*externalLeading) = 0; return; } @@ -2285,13 +2286,15 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, / the correct way would be to map the character names / like 'adieresis' to corresp. positions of ISOEnc and read / these values from AFM files, too. Maybe later ... */ - lastWidths[196] = lastWidths['A']; // Ä - lastWidths[228] = lastWidths['a']; // ä - lastWidths[214] = lastWidths['O']; // Ö - lastWidths[246] = lastWidths['o']; // ö - lastWidths[220] = lastWidths['U']; // Ü - lastWidths[252] = lastWidths['u']; // ü - lastWidths[223] = lastWidths[251]; // ß + + // NB: casts to int are needed to suppress gcc 3.3 warnings + lastWidths[196] = lastWidths[(int)'A']; // Ä + lastWidths[228] = lastWidths[(int)'a']; // ä + lastWidths[214] = lastWidths[(int)'O']; // Ö + lastWidths[246] = lastWidths[(int)'o']; // ö + lastWidths[220] = lastWidths[(int)'U']; // Ü + lastWidths[252] = lastWidths[(int)'u']; // ü + lastWidths[223] = lastWidths[(int)251]; // ß /* JC: calculate UnderlineThickness/UnderlinePosition */