New PostScript code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-12-05 21:02:04 +00:00
parent b749747d9d
commit ed880dd448
12 changed files with 5359 additions and 17 deletions

View File

@@ -383,6 +383,7 @@ bool MyPrintout::OnPrintPage(int page)
DrawPageTwo(dc);
dc->SetDeviceOrigin(0, 0);
dc->SetUserScale(1.0, 1.0);
char buf[200];
sprintf(buf, "PAGE %d", page);
@@ -499,8 +500,8 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
float logUnitsFactor = (float)(ppiPrinterX/(scale*25.1));
float logUnits = (float)(50*logUnitsFactor);
dc->SetPen(* wxBLACK_PEN);
dc->DrawLine(50, 50, (long)(50.0 + logUnits), 50);
dc->DrawLine(50, 50, 50, (long)(50.0 + logUnits));
dc->DrawLine(50, 250, (long)(50.0 + logUnits), 250);
dc->DrawLine(50, 250, 50, (long)(250.0 + logUnits));
dc->SetFont(* wxGetApp().m_testFont);
dc->SetBackgroundMode(wxTRANSPARENT);
@@ -522,7 +523,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
float bottomMarginLogical = (float)(logUnitsFactor*(pageHeightMM - bottomMargin));
float rightMarginLogical = (float)(logUnitsFactor*(pageWidthMM - rightMargin));
dc->SetPen(wxBLACK_PEN);
dc->SetPen(wxRED_PEN);
dc->DrawLine( (long)leftMarginLogical, (long)topMarginLogical,
(long)rightMarginLogical, (long)topMarginLogical);
dc->DrawLine( (long)leftMarginLogical, (long)bottomMarginLogical,
@@ -534,12 +535,14 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
// Writes a header on a page. Margin units are in millimetres.
bool WritePageHeader(wxPrintout *printout, wxDC *dc, char *text, float mmToLogical)
{
/*
static wxFont *headerFont = (wxFont *) NULL;
if (!headerFont)
{
headerFont = wxTheFontList->FindOrCreateFont(16, wxSWISS, wxNORMAL, wxBOLD);
}
dc->SetFont(headerFont);
*/
int pageWidthMM, pageHeightMM;