diff options
author | nyamatongwe <devnull@localhost> | 2007-05-11 05:00:42 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2007-05-11 05:00:42 +0000 |
commit | 17dd3f3912a55aa2c2b940cd641e1601f59f1fde (patch) | |
tree | 4463e5ec23e3afd7ffc614e1eae24cdbdc3777a0 | |
parent | b3530f6e2a16c0f8e7c9ab8632f84208706209ea (diff) | |
download | scintilla-mirror-17dd3f3912a55aa2c2b940cd641e1601f59f1fde.tar.gz |
Only perform alpha blending on rectangles with positive widths to
avoid warnings.
Tracing on GTK+ goes to standard error so is not buffered.
-rw-r--r-- | gtk/PlatGTK.cxx | 4 | ||||
-rw-r--r-- | win32/PlatWin.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index e361b3e17..a38137684 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1053,7 +1053,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int , ColourAllocated , int , Co #else void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int flags) { - if (gc && drawable) { + if (gc && drawable && rc.Width() > 0) { int width = rc.Width(); int height = rc.Height(); // Ensure not distorted too much by corners when small @@ -2609,7 +2609,7 @@ bool Platform::MouseButtonBounce() { } void Platform::DebugDisplay(const char *s) { - printf("%s", s); + fprintf(stderr, "%s", s); } bool Platform::IsKeyDown(int) { 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>(hdc)); int width = rc.Width(); int height = rc.Height(); |