First update patch for GTK+ print

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-09-13 12:23:39 +00:00
parent 05787cec0d
commit da249bc359
3 changed files with 50 additions and 109 deletions

View File

@@ -874,49 +874,6 @@ public:
bool useMask = false)
{ m_pimpl->DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
virtual void DrawScaledBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, wxCoord w, wxCoord h, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != w || bmp.GetHeight() != h)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( w, h, quality );
wxBitmap scaledBmp(tmpImg);
m_pimpl->DoDrawBitmap(scaledBmp, x, y, useMask);
}
else
m_pimpl->DoDrawBitmap(bmp, x, y, useMask);
}
virtual void DrawScaledBitmap(const wxBitmap &bmp, const wxPoint& pt, const wxSize& sz, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != sz.x || bmp.GetHeight() != sz.y)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( sz.x, sz.y, quality );
wxBitmap scaledBmp(tmpImg);
m_pimpl->DoDrawBitmap(scaledBmp, pt.x, pt.y, useMask);
}
else
m_pimpl->DoDrawBitmap(bmp, pt.x, pt.y, useMask);
}
virtual void DrawScaledBitmap(const wxBitmap &bmp, const wxRect& rect, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != rect.width || bmp.GetHeight() != rect.height)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( rect.width, rect.height, quality );
wxBitmap scaledBmp(tmpImg);
m_pimpl->DoDrawBitmap(scaledBmp, rect.x, rect.y, useMask);
}
else
m_pimpl->DoDrawBitmap(bmp, rect.x, rect.y, useMask);
}
void DrawText(const wxString& text, wxCoord x, wxCoord y)
{ m_pimpl->DoDrawText(text, x, y); }
void DrawText(const wxString& text, const wxPoint& pt)
@@ -1233,49 +1190,6 @@ public:
bool useMask = false)
{ DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
virtual void DrawScaledBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, wxCoord w, wxCoord h, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != w || bmp.GetHeight() != h)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( w, h, quality );
wxBitmap scaledBmp(tmpImg);
DoDrawBitmap(scaledBmp, x, y, useMask);
}
else
DoDrawBitmap(bmp, x, y, useMask);
}
virtual void DrawScaledBitmap(const wxBitmap &bmp, const wxPoint& pt, const wxSize& sz, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != sz.x || bmp.GetHeight() != sz.y)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( sz.x, sz.y, quality );
wxBitmap scaledBmp(tmpImg);
DoDrawBitmap(scaledBmp, pt.x, pt.y, useMask);
}
else
DoDrawBitmap(bmp, pt.x, pt.y, useMask);
}
virtual void DrawScaledBitmap(const wxBitmap &bmp, const wxRect& rect, bool useMask = false, int quality = wxIMAGE_QUALITY_NORMAL)
{
if (bmp.GetWidth() != rect.width || bmp.GetHeight() != rect.height)
{
if (quality != wxIMAGE_QUALITY_HIGH)
quality = wxIMAGE_QUALITY_NORMAL;
wxImage tmpImg = bmp.ConvertToImage();
tmpImg.Rescale( rect.width, rect.height, quality );
wxBitmap scaledBmp(tmpImg);
DoDrawBitmap(scaledBmp, rect.x, rect.y, useMask);
}
else
DoDrawBitmap(bmp, rect.x, rect.y, useMask);
}
void DrawText(const wxString& text, wxCoord x, wxCoord y)
{ DoDrawText(text, x, y); }
void DrawText(const wxString& text, const wxPoint& pt)