From 1b4ffdfbe95f4dc72eb4d0d822e2171fd2195205 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 3 Jul 2017 19:49:13 -0300 Subject: [PATCH] Fix glitch rendering background with colors w/alpha = 0 --- src/render/render.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/render/render.cpp b/src/render/render.cpp index 316e4e589..7d08b0dd4 100644 --- a/src/render/render.cpp +++ b/src/render/render.cpp @@ -855,6 +855,18 @@ void Render::renderBackground( gfx::Rect dstBounds = area.dstBounds(); + // Fix background color (make them opaque) + switch (image->pixelFormat()) { + case IMAGE_RGB: + m_bgColor1 |= doc::rgba_a_mask; + m_bgColor2 |= doc::rgba_a_mask; + break; + case IMAGE_GRAYSCALE: + m_bgColor1 |= doc::graya_a_mask; + m_bgColor2 |= doc::graya_a_mask; + break; + } + // Draw checked background (tile by tile) int u_start = u; for (y=y_start-tile_h; yheight()+tile_h; y+=tile_h) {