X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12ca55868c4f5f95a7b7ca66f6c869dbddfebd7d..89e1de6441845de971433531a7286d5bea06c3f5:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index e041e64cb6..6319a9c73a 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -32,7 +32,7 @@ #include "wx/prntbase.h" #include "wx/generic/prntdlgg.h" #include "wx/paper.h" -#include "wx/filefn.h" +#include "wx/filename.h" #include "wx/stdpaths.h" #ifdef __WXMSW__ @@ -190,7 +190,7 @@ static const char *wxPostScriptHeaderColourImage = "\ } ifelse % end of 'false' case\n\ "; -static char wxPostScriptHeaderReencodeISO1[] = +static const char wxPostScriptHeaderReencodeISO1[] = "\n/reencodeISO {\n" "dup dup findfont dup length dict begin\n" "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n" @@ -214,7 +214,7 @@ static char wxPostScriptHeaderReencodeISO1[] = "/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n" "/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n"; -static char wxPostScriptHeaderReencodeISO2[] = +static const char wxPostScriptHeaderReencodeISO2[] = "/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n" "/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n" "/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n" @@ -313,7 +313,7 @@ wxPostScriptDCImpl::wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& d void wxPostScriptDCImpl::Init() { - m_pstream = (FILE*) NULL; + m_pstream = NULL; m_currentRed = 0; m_currentGreen = 0; @@ -333,7 +333,7 @@ wxPostScriptDCImpl::~wxPostScriptDCImpl () if (m_pstream) { fclose( m_pstream ); - m_pstream = (FILE*) NULL; + m_pstream = NULL; } } @@ -342,7 +342,7 @@ bool wxPostScriptDCImpl::IsOk() const return m_ok; } -wxRect wxPostScriptDCImpl::GetPaperRect() +wxRect wxPostScriptDCImpl::GetPaperRect() const { int w = 0; int h = 0; @@ -350,7 +350,7 @@ wxRect wxPostScriptDCImpl::GetPaperRect() return wxRect(0,0,w,h); } -int wxPostScriptDCImpl::GetResolution() +int wxPostScriptDCImpl::GetResolution() const { return DPI; } @@ -406,7 +406,7 @@ void wxPostScriptDCImpl::Clear() // wxFAIL_MSG( wxT("wxPostScriptDCImpl::Clear not implemented.") ); } -bool wxPostScriptDCImpl::DoFloodFill (wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour &WXUNUSED(col), int WXUNUSED(style)) +bool wxPostScriptDCImpl::DoFloodFill (wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour &WXUNUSED(col), wxFloodFillStyle WXUNUSED(style)) { wxFAIL_MSG( wxT("wxPostScriptDCImpl::FloodFill not implemented.") ); return false; @@ -598,7 +598,7 @@ void wxPostScriptDCImpl::DoDrawPoint (wxCoord x, wxCoord y) CalcBoundingBox( x, y ); } -void wxPostScriptDCImpl::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle) +void wxPostScriptDCImpl::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) { wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); @@ -668,7 +668,7 @@ void wxPostScriptDCImpl::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset } } -void wxPostScriptDCImpl::DoDrawPolyPolygon (int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle) +void wxPostScriptDCImpl::DoDrawPolyPolygon (int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) { wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); @@ -962,7 +962,7 @@ void wxPostScriptDCImpl::DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ) } /* this has to be char, not wxChar */ -static char hexArray[] = "0123456789ABCDEF"; +static const char hexArray[] = "0123456789ABCDEF"; void wxPostScriptDCImpl::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool WXUNUSED(useMask) ) { @@ -1226,7 +1226,6 @@ void wxPostScriptDCImpl::SetPen( const wxPen& pen ) double bluePS = (double)(blue) / 255.0; double greenPS = (double)(green) / 255.0; - wxString buffer; buffer.Printf( "%f %f %f setrgbcolor\n", redPS, greenPS, bluePS ); buffer.Replace( ",", "." ); PsPrint( buffer ); @@ -1508,7 +1507,7 @@ void wxPostScriptDCImpl::SetBackground (const wxBrush& brush) m_backgroundBrush = brush; } -void wxPostScriptDCImpl::SetLogicalFunction (int WXUNUSED(function)) +void wxPostScriptDCImpl::SetLogicalFunction(wxRasterOperationMode WXUNUSED(function)) { wxFAIL_MSG( wxT("wxPostScriptDCImpl::SetLogicalFunction not implemented.") ); } @@ -1709,7 +1708,7 @@ bool wxPostScriptDCImpl::StartDoc( const wxString& WXUNUSED(message) ) { if (m_printData.GetFilename() == wxEmptyString) { - wxString filename = wxGetTempFileName( wxT("ps") ); + wxString filename = wxFileName::CreateTempFileName( wxT("ps") ); m_printData.SetFilename(filename); } @@ -1799,7 +1798,7 @@ void wxPostScriptDCImpl::EndDoc () if ( m_pstream ) { fclose( m_pstream ); - m_pstream = (FILE *) NULL; + m_pstream = NULL; } #if 0 @@ -1936,7 +1935,8 @@ bool wxPostScriptDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord fwidth, wxCoord fheight, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop, bool WXUNUSED(useMask), wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask) ) + wxRasterOperationMode rop, + bool WXUNUSED(useMask), wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask) ) { wxCHECK_MSG( m_ok, false, wxT("invalid postscript dc") );