Applied patch [ 1409971 ] wxX11: fix for DoDrawBitmap() when scaling is set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1185,7 +1185,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
int xscreen = DefaultScreen( xdisplay );
|
int xscreen = DefaultScreen( xdisplay );
|
||||||
Window xroot = RootWindow( xdisplay, xscreen );
|
Window xroot = RootWindow( xdisplay, xscreen );
|
||||||
|
|
||||||
new_pixmap = XCreatePixmap( xdisplay, xroot, w, h, 1 );
|
new_pixmap = XCreatePixmap( xdisplay, xroot, ww, hh, 1 );
|
||||||
GC gc = XCreateGC( xdisplay, new_pixmap, 0, NULL );
|
GC gc = XCreateGC( xdisplay, new_pixmap, 0, NULL );
|
||||||
|
|
||||||
int bpp = wxTheApp->GetVisualInfo(m_display)->m_visualDepth;
|
int bpp = wxTheApp->GetVisualInfo(m_display)->m_visualDepth;
|
||||||
@@ -1195,7 +1195,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) );
|
XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) );
|
||||||
|
|
||||||
XSetFillStyle( xdisplay, gc, FillSolid );
|
XSetFillStyle( xdisplay, gc, FillSolid );
|
||||||
XFillRectangle( xdisplay, new_pixmap, gc, 0, 0, w, h );
|
XFillRectangle( xdisplay, new_pixmap, gc, 0, 0, ww, hh );
|
||||||
|
|
||||||
if (bpp == 8)
|
if (bpp == 8)
|
||||||
XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) );
|
XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) );
|
||||||
@@ -1242,10 +1242,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
// drawing a mono-bitmap (XBitmap) we use the current text GC
|
// drawing a mono-bitmap (XBitmap) we use the current text GC
|
||||||
if (is_mono)
|
if (is_mono)
|
||||||
XCopyPlane( (Display*) m_display, (Pixmap) use_bitmap.GetBitmap(), (Window) m_window,
|
XCopyPlane( (Display*) m_display, (Pixmap) use_bitmap.GetBitmap(), (Window) m_window,
|
||||||
(GC) m_textGC, 0, 0, w, h, xx, yy, 1 );
|
(GC) m_textGC, 0, 0, ww, hh, xx, yy, 1 );
|
||||||
else
|
else
|
||||||
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_window,
|
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_window,
|
||||||
(GC) m_penGC, 0, 0, w, h, xx, yy );
|
(GC) m_penGC, 0, 0, ww, hh, xx, yy );
|
||||||
|
|
||||||
// remove mask again if any
|
// remove mask again if any
|
||||||
if (setClipMask)
|
if (setClipMask)
|
||||||
|
Reference in New Issue
Block a user