1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/dcprint.cpp
3 // Purpose: wxPrinterDC class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
27 #if wxUSE_PRINTING_ARCHITECTURE
29 #include "wx/dcprint.h"
32 #include "wx/string.h"
34 #include "wx/window.h"
35 #include "wx/dcmemory.h"
39 #include "wx/palmos/private.h"
42 #include "wx/palmos/dib.h"
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
52 // ============================================================================
54 // ============================================================================
56 // ----------------------------------------------------------------------------
57 // wxPrinterDC construction
58 // ----------------------------------------------------------------------------
60 // This form is deprecated
61 wxPrinterDC::wxPrinterDC(const wxString
& driver_name
,
62 const wxString
& device_name
,
65 wxPrintOrientation orientation
)
69 wxPrinterDC::wxPrinterDC(const wxPrintData
& printData
)
74 wxPrinterDC::wxPrinterDC(WXHDC dc
)
78 void wxPrinterDC::Init()
82 // ----------------------------------------------------------------------------
83 // wxPrinterDC {Start/End}{Page/Doc} methods
84 // ----------------------------------------------------------------------------
86 bool wxPrinterDC::StartDoc(const wxString
& message
)
91 void wxPrinterDC::EndDoc()
95 void wxPrinterDC::StartPage()
99 void wxPrinterDC::EndPage()
103 wxRect
wxPrinterDC::GetPaperRect() const
105 // Use page rect if we can't get paper rect.
108 return wxRect(0, 0, w
, h
);
111 // Returns default device and port names
112 static bool wxGetDefaultDeviceName(wxString
& deviceName
, wxString
& portName
)
117 // Gets an HDC for the specified printer configuration
118 WXHDC WXDLLEXPORT
wxGetPrinterDC(const wxPrintData
& printDataConst
)
123 // ----------------------------------------------------------------------------
124 // wxPrinterDC bit blitting/bitmap drawing
125 // ----------------------------------------------------------------------------
127 // helper of DoDrawBitmap() and DoBlit()
129 bool DrawBitmapUsingStretchDIBits(HDC hdc
,
131 wxCoord x
, wxCoord y
)
136 void wxPrinterDC::DoDrawBitmap(const wxBitmap
& bmp
,
137 wxCoord x
, wxCoord y
,
142 bool wxPrinterDC::DoBlit(wxCoord xdest
, wxCoord ydest
,
143 wxCoord width
, wxCoord height
,
145 wxCoord
WXUNUSED(xsrc
), wxCoord
WXUNUSED(ysrc
),
146 wxRasterOperationMode
WXUNUSED(rop
), bool useMask
,
147 wxCoord
WXUNUSED(xsrcMask
), wxCoord
WXUNUSED(ysrcMask
))
153 // wxUSE_PRINTING_ARCHITECTURE