*m_pstream << "showpage\n";
}
-bool wxPostScriptDC::Blit( long WXUNUSED(xdest), long WXUNUSED(ydest),
- long WXUNUSED(fwidth), long WXUNUSED(fheight),
- wxDC *WXUNUSED(source),
- long WXUNUSED(xsrc), long WXUNUSED(ysrc),
- int WXUNUSED(rop), bool WXUNUSED(useMask) )
+bool wxPostScriptDC::Blit( long xdest, long ydest,
+ long fwidth, long fheight,
+ wxDC *source,
+ long xsrc, long ysrc,
+ int rop, bool WXUNUSED(useMask) )
{
wxCHECK_MSG( m_ok && m_pstream, FALSE, "invalid postscript dc" );
- wxFAIL_MSG( "wxPostScriptDC::Blit no yet implemented." );
+ wxCHECK_MSG( source, FALSE, "invalid source dc" );
+
+ /* blit into a bitmap */
+
+ wxBitmap bitmap( fwidth, fheight );
+ wxMemoryDC memDC;
+ memDC.SelectObject(bitmap);
+ memDC.Blit(0, 0, fwidth, fheight, source, xsrc, ysrc, rop); /* TODO: Blit transparently? */
+ memDC.SelectObject(wxNullBitmap);
+
+ /* draw bitmap. scaling and positioning is done there */
+
+ DrawBitmap( bitmap, xdest, ydest );
return TRUE;
}
-long wxPostScriptDC::GetCharHeight ()
+long wxPostScriptDC::GetCharHeight()
{
if (m_font.Ok())
return m_font.GetPointSize();
return 12;
}
-void wxPostScriptDC::GetTextExtent (const wxString& string, long *x, long *y,
- long *descent, long *externalLeading, wxFont *theFont,
- bool WXUNUSED(use16))
+void wxPostScriptDC::GetTextExtent( const wxString& string, long *x, long *y,
+ long *descent, long *externalLeading, wxFont *theFont,
+ bool WXUNUSED(use16) )
{
wxFont *fontToUse = theFont;
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "HelvBoO";
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "HelvBo";
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "Helv0";
- else if ((Style != wxITALIC) && (Weight != wxBOLD)) name = "Helv";
+ else name = "Helv";
}
break;
}