From 17dd3f3912a55aa2c2b940cd641e1601f59f1fde Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 11 May 2007 05:00:42 +0000 Subject: Only perform alpha blending on rectangles with positive widths to avoid warnings. Tracing on GTK+ goes to standard error so is not buffered. --- win32/PlatWin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 5389ae57b..f9a9fa1c5 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -581,7 +581,7 @@ static void AllFour(DWORD *pixels, int width, int height, int x, int y, DWORD va void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int /* flags*/ ) { - if (AlphaBlendFn) { + if (AlphaBlendFn && rc.Width() > 0) { HDC hMemDC = ::CreateCompatibleDC(reinterpret_cast(hdc)); int width = rc.Width(); int height = rc.Height(); -- cgit v1.2.3