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:
@@ -2594,6 +2594,15 @@ void wxPrintPaperDatabase::CreateDatabase()
|
||||
AddPaperType(_("A3 297 x 420 mm"), 297, 420, 842, 1191);
|
||||
AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 612, 791);
|
||||
AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 612, 1009);
|
||||
|
||||
/*
|
||||
This is for 100 ppi
|
||||
|
||||
AddPaperType(_("A4 210 x 297 mm"), 210, 297, 210*4, 297*4 );
|
||||
AddPaperType(_("A3 297 x 420 mm"), 297, 420, 297*4, 420*4 );
|
||||
AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 216*4, 279*4 );
|
||||
AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 216*4, 356*4 );
|
||||
*/
|
||||
}
|
||||
|
||||
void wxPrintPaperDatabase::ClearDatabase()
|
||||
|
@@ -708,7 +708,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc)
|
||||
/*
|
||||
dc.DrawRectangle((int)(x-1 + shadowOffset), (int)(y-1 + shadowOffset), (int)(actualWidth+2), (int)(actualHeight+2));
|
||||
*/
|
||||
dc.DrawRectangle((int)(x + shadowOffset), (int)(y + actualHeight), (int)(actualWidth), shadowOffset);
|
||||
dc.DrawRectangle((int)(x + shadowOffset), (int)(y + actualHeight+1), (int)(actualWidth), shadowOffset);
|
||||
dc.DrawRectangle((int)(x + actualWidth), (int)(y + shadowOffset), shadowOffset, (int)(actualHeight));
|
||||
|
||||
// Draw blank page allowing for 1-pixel border AROUND the actual page
|
||||
@@ -722,7 +722,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxWindow *canvas, wxDC& dc)
|
||||
printf( "x: %d y: %d w: %d h: %d.\n", (int)r.x, (int)r.y, (int)r.width, (int)r.height );
|
||||
*/
|
||||
|
||||
dc.DrawRectangle((int)(x-1), (int)(y-1), (int)(actualWidth+2), (int)(actualHeight+2));
|
||||
dc.DrawRectangle((int)(x-2), (int)(y-1), (int)(actualWidth+3), (int)(actualHeight+2));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -124,11 +124,17 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
|
||||
int logPPIPrinterX = 0;
|
||||
int logPPIPrinterY = 0;
|
||||
|
||||
// Correct values for X/PostScript?
|
||||
logPPIScreenX = 100;
|
||||
logPPIScreenY = 100;
|
||||
|
||||
/*
|
||||
// Correct values for X/PostScript?
|
||||
logPPIPrinterX = 100;
|
||||
logPPIPrinterY = 100;
|
||||
*/
|
||||
|
||||
logPPIPrinterX = 72;
|
||||
logPPIPrinterY = 72;
|
||||
|
||||
printout->SetPPIScreen(logPPIScreenX, logPPIScreenY);
|
||||
printout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY);
|
||||
@@ -238,7 +244,8 @@ void wxPostScriptPrintPreview::DetermineScaling(void)
|
||||
if (paper)
|
||||
{
|
||||
m_previewPrintout->SetPPIScreen(100, 100);
|
||||
m_previewPrintout->SetPPIPrinter(100, 100);
|
||||
// m_previewPrintout->SetPPIPrinter(100, 100);
|
||||
m_previewPrintout->SetPPIPrinter(72, 72);
|
||||
|
||||
// If in landscape mode, we need to swap the width and height.
|
||||
if ( m_printData.GetOrientation() == wxLANDSCAPE )
|
||||
|
@@ -35,7 +35,6 @@ LIB_CPP_SRC=\
|
||||
common/module.cpp \
|
||||
common/object.cpp \
|
||||
common/odbc.cpp \
|
||||
common/postscrp.cpp \
|
||||
common/prntbase.cpp \
|
||||
common/resource.cpp \
|
||||
common/serbase.cpp \
|
||||
@@ -83,6 +82,7 @@ LIB_CPP_SRC=\
|
||||
gtk/dc.cpp \
|
||||
gtk/dcclient.cpp \
|
||||
gtk/dcmemory.cpp \
|
||||
gtk/dcps.cpp \
|
||||
gtk/dcscreen.cpp \
|
||||
gtk/dnd.cpp \
|
||||
gtk/dialog.cpp \
|
||||
|
@@ -143,10 +143,10 @@ void wxWindowDC::DrawLine( long x1, long y1, long x2, long y2 )
|
||||
{
|
||||
gdk_draw_line( m_window, m_penGC,
|
||||
XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) );
|
||||
|
||||
CalcBoundingBox(x1, y1);
|
||||
CalcBoundingBox(x2, y2);
|
||||
}
|
||||
|
||||
CalcBoundingBox(x1, y1);
|
||||
CalcBoundingBox(x2, y2);
|
||||
}
|
||||
|
||||
void wxWindowDC::CrossHair( long x, long y )
|
||||
@@ -487,7 +487,7 @@ void wxWindowDC::DrawEllipse( long x, long y, long width, long height )
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 );
|
||||
|
||||
CalcBoundingBox( x, y );
|
||||
CalcBoundingBox( x - width, y - height );
|
||||
CalcBoundingBox( x + width, y + height );
|
||||
}
|
||||
|
||||
|
2309
src/gtk/dcps.cpp
Normal file
2309
src/gtk/dcps.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -143,10 +143,10 @@ void wxWindowDC::DrawLine( long x1, long y1, long x2, long y2 )
|
||||
{
|
||||
gdk_draw_line( m_window, m_penGC,
|
||||
XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) );
|
||||
|
||||
CalcBoundingBox(x1, y1);
|
||||
CalcBoundingBox(x2, y2);
|
||||
}
|
||||
|
||||
CalcBoundingBox(x1, y1);
|
||||
CalcBoundingBox(x2, y2);
|
||||
}
|
||||
|
||||
void wxWindowDC::CrossHair( long x, long y )
|
||||
@@ -487,7 +487,7 @@ void wxWindowDC::DrawEllipse( long x, long y, long width, long height )
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 );
|
||||
|
||||
CalcBoundingBox( x, y );
|
||||
CalcBoundingBox( x - width, y - height );
|
||||
CalcBoundingBox( x + width, y + height );
|
||||
}
|
||||
|
||||
|
2309
src/gtk1/dcps.cpp
Normal file
2309
src/gtk1/dcps.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user