[gdk-pixbuf] ico: Fix area-updated coordinates
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] ico: Fix area-updated coordinates
- Date: Thu, 29 Dec 2016 16:16:55 +0000 (UTC)
commit ebcd488cc433be8bc00ccb8e820597de4388108e
Author: Bastien Nocera <hadess hadess net>
Date: Thu Dec 29 16:21:37 2016 +0100
ico: Fix area-updated coordinates
When the icon is constructed bottom to top, the y coordinates were
incorrectly computed.
https://bugzilla.gnome.org/show_bug.cgi?id=581484
gdk-pixbuf/io-ico.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index 9448619..9815dcf 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -881,9 +881,15 @@ static void OneLine(struct ico_progressive_state *context)
if (context->updated_func != NULL) {
+ int y;
+
+ y = context->Lines % context->Header.height;
+ if (context->Header.Negative == 0 &&
+ context->Lines < context->Header.height)
+ y = context->Header.height - y;
(*context->updated_func) (context->pixbuf,
0,
- context->Lines % context->Header.height,
+ y,
context->Header.width,
1,
context->user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]