diff options
Diffstat (limited to 'dev-games/aseprite/files/aseprite-1.2.12-draw.patch')
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.2.12-draw.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-games/aseprite/files/aseprite-1.2.12-draw.patch b/dev-games/aseprite/files/aseprite-1.2.12-draw.patch new file mode 100644 index 0000000..44b4bef --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.12-draw.patch @@ -0,0 +1,37 @@ +v1.2.12.1 patch + +From 86ffa37fdd2b3267f5ccbdc29b592b208f15052d Mon Sep 17 00:00:00 2001 +From: David Capello <david@igarastudio.com> +Date: Tue, 11 Jun 2019 10:42:41 -0300 +Subject: [PATCH] Fix rendering bug with new engine and zoom out (canvas is not + updated correctly) + +--- + src/app/ui/editor/editor.cpp | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp +index dc8715315..0bdaf4b3b 100644 +--- a/src/app/ui/editor/editor.cpp ++++ b/src/app/ui/editor/editor.cpp +@@ -668,6 +668,20 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& sprite + } + + if (tmp->nativeHandle()) { ++ if (newEngine) { ++ // Without doing something on the "tmp" surface before (like ++ // just drawing a pixel), we get a strange behavior where ++ // pixels are not updated correctly on the editor (e.g. when ++ // zoom < 100%). I didn't have enough time to investigate this ++ // issue yet, but this is a partial fix/hack. ++ // ++ // TODO review why do we need to do this, it looks like some ++ // internal state of a SkCanvas or SkBitmap thing is ++ // updated after this, because convert_image_to_surface() ++ // will overwrite these pixels anyway. ++ tmp->drawRect(gfx::rgba(0, 0, 0, 255), gfx::Rect(0, 0, 1, 1)); ++ } ++ + convert_image_to_surface(rendered.get(), m_sprite->palette(m_frame), + tmp, 0, 0, 0, 0, rc2.w, rc2.h); + |