Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-07 Thread Mattia Rizzolo
Control: tag -1 pending

On Mon, Nov 07, 2016 at 12:46:25PM -0500, Steven Gawroriski wrote:
> > I'll see about uploading an updated debian package with this too.
> 
> That would be cool.

Committed:
https://anonscm.debian.org/git/pkg-multimedia/inkscape.git/commit/?id=0be84125610e178c2e68fbc03f13ed88128a9d32


I'd like to also include anohter thing before uploading, but it'll come.

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-07 Thread Steven Gawroriski
On Mon, 7 Nov 2016 16:28:13 +
Mattia Rizzolo  wrote:

> ouch, that must be awful!

It seems to be fine now. Last Saturday (November 5th) downloading the
source package completed rather quickly (10 seconds perhaps?).

> Great!
> I also noticed that they committed the patch already in both trunk and
> 0.92.x (that, who knows, they might even release some day)
> 
> I'll see about uploading an updated debian package with this too.

That would be cool.

Thanks.



Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-07 Thread Mattia Rizzolo
control: tag -1 fixed-upstream
control: severity -1 minor

On Sun, Nov 06, 2016 at 01:53:35PM -0500, Steven Gawroriski wrote:
> Since today my internet connection is unusually and abysmally slow,
> checking out of the Inkscape repository was essentially moving at
> dial-up speeds.

ouch, that must be awful!

> So instead I have submitted a bug report with the attached patch, along
> with a reference to this bug.
> 
>  * https://bugs.launchpad.net/inkscape/+bug/1639611

Great!
I also noticed that they committed the patch already in both trunk and
0.92.x (that, who knows, they might even release some day)

I'll see about uploading an updated debian package with this too.
-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-06 Thread Steven Gawroriski
On Sun, 6 Nov 2016 15:00:39 +
Mattia Rizzolo  wrote:

> Thanks for doing it.
> 
> Thanks for the patch!

Thanks.

> Though, I'd like to ask you to foward this patch upstream.  It's
> enough to open a MR against
> https://code.launchpad.net/~inkscape.dev/inkscape/trunk for it.
> 
> Could you do it?
> 

Since today my internet connection is unusually and abysmally slow,
checking out of the Inkscape repository was essentially moving at
dial-up speeds.

So instead I have submitted a bug report with the attached patch, along
with a reference to this bug.

 * https://bugs.launchpad.net/inkscape/+bug/1639611

> ↑↑↑ be aware of these 4 trailing whitespaces, some people don't like
> them.

I removed the trailing whitespace from the patch before uploading it to
their bug tracker. The spaces were made by auto-indent.



Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-06 Thread Mattia Rizzolo
control: tag -1 upstream patch

On Sat, Nov 05, 2016 at 07:06:04PM -0400, Steven Gawroriski wrote:
> Taking a look at this myself.

Thanks for doing it.

> I wrote the attached patch which essentially byte swaps the value
> before this function returns. The cursors are drawn correctly and
> Inkscape can now be used much more easily.

Thanks for the patch!

> If a contributor agreement
> is required then I would accept giving away my copyright for the code
> contained in this patch.

No CLA or stuff is needed, no.

Though, I'd like to ask you to foward this patch upstream.  It's enough to
open a MR against
https://code.launchpad.net/~inkscape.dev/inkscape/trunk for it.

Could you do it?

> Description: Swap before return sp_cursor_pixbuf_from_xpm on big endian.
>  This byte swaps before the return in sp_cursor_pixbuf_from_xpm on big
>  endian systems so that the cursor is made visible on these systems.
> Author: Steven Gawroriski 
> 
> ---
> 
> Origin: other
> Bug-Debian: https://bugs.debian.org/841853
> 
> --- inkscape-0.91.orig/src/sp-cursor.cpp
> +++ inkscape-0.91/src/sp-cursor.cpp
> @@ -106,6 +106,14 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gch
>  pixmap_buffer[y * width + x] = (it == colorMap.end()) ? 0u : 
> it->second;
>  }
>  }
> +

↑↑↑ be aware of these 4 trailing whitespaces, some people don't like
them.

> +#if G_BYTE_ORDER == G_BIG_ENDIAN
> +for (int i = 0, n = width * height; i < n; i++)
> +{
> +guint32 v = pixmap_buffer[i];
> +pixmap_buffer[i] = ((v & 0xFF) << 24) | (((v >> 8) & 0xFF) << 16) | 
> (((v >> 16) & 0xFF) << 8) | ((v >> 24) & 0xFF);
> +}
> +#endif
>  
>  return 
> gdk_pixbuf_new_from_data(reinterpret_cast(pixmap_buffer), 
> GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), 
> free_cursor_data, NULL);
>  }

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-11-05 Thread Steven Gawroriski
Taking a look at this myself. The issue is related to cursors and is
either an issue in:

 * Inkscape
 * GDK
 * XRender

Since the star cursor in Inkscape shows the color to be drawn,
including alpha. Using the color `FFDD8833` (which is kind of a tan
color) appears on the star cursor itself as a sky blue. The actual
color being shown on the cursor is `#3388DD` (or ARGB #FF3388DD).
Changing in Inkscape the `FF` (which should be red, but is alpha) makes
the blue in the cursor a bit transparent.

I am definitely certain that the issue is in Inkscape only. Other
programs such as GIMP and anything else do not have any cursor issues
at all from what I can tell. If GDK or XRender were at fault, likely
more than just a single program would be broken.

The only place in the Inkscape code which loads cursors is
`sp_cursor_pixbuf_from_xpm`. The `RGBA` struct has a static cast to a
`guint32` which bitshifts in values accordingly. However part of the
function `sp_cursor_pixbuf_from_xpm` contains the following:

guint32 *pixmap_buffer = new guint32[width * height];

However, before returning this buffer is `reinterpret_cast`ed such as
the following:

return
gdk_pixbuf_new_from_data(reinterpret_cast(pixmap_buffer),
GDK_COLORSPACE_RGB, TRUE, 8, width, height, width *
sizeof(guint32), free_cursor_data, NULL);

Looking at the documentation for `gdk_pixbuf_new_from_data`, the data
for this call is just specified as _Image data in 8-bit/sample packed
format_.

I wrote the attached patch which essentially byte swaps the value
before this function returns. The cursors are drawn correctly and
Inkscape can now be used much more easily. If a contributor agreement
is required then I would accept giving away my copyright for the code
contained in this patch.

Description: Swap before return sp_cursor_pixbuf_from_xpm on big endian.
 This byte swaps before the return in sp_cursor_pixbuf_from_xpm on big
 endian systems so that the cursor is made visible on these systems.
Author: Steven Gawroriski 

---

Origin: other
Bug-Debian: https://bugs.debian.org/841853

--- inkscape-0.91.orig/src/sp-cursor.cpp
+++ inkscape-0.91/src/sp-cursor.cpp
@@ -106,6 +106,14 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gch
 pixmap_buffer[y * width + x] = (it == colorMap.end()) ? 0u : it->second;
 }
 }
+
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+for (int i = 0, n = width * height; i < n; i++)
+{
+guint32 v = pixmap_buffer[i];
+pixmap_buffer[i] = ((v & 0xFF) << 24) | (((v >> 8) & 0xFF) << 16) | (((v >> 16) & 0xFF) << 8) | ((v >> 24) & 0xFF);
+}
+#endif
 
 return gdk_pixbuf_new_from_data(reinterpret_cast(pixmap_buffer), GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), free_cursor_data, NULL);
 }


Bug#841853: inkscape: Mouse cursor is a white outline on PowerPC

2016-10-23 Thread Steven Gawroriski
Package: inkscape
Version: 0.91-11
Severity: important

Dear Maintainer,

On PowerPC, cursors in Inkscape are just a white outline. On other
systems there should be black in the center or at least in some
situations a black outline around the white outline. The parts that
should be black are invisible.

This makes Inkscape very difficult to use because on very bright
colors, the mouse cursor is near-impossible or impossible to see.

Since this system is big endian, it is likely that the channels are
being read incorrectly (FF00 or similar becomes 00FF).



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)
Foreign Architectures: i386

Kernel: Linux 4.8.3.161021.1
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages inkscape depends on:
ii  libaspell150.60.7~20110707-3+b1
ii  libatk1.0-02.22.0-1
ii  libatkmm-1.6-1v5   2.24.2-2
ii  libc6  2.24-3
ii  libcairo2  1.14.6-1+b1
ii  libcairomm-1.0-1v5 1.12.0-1+b1
ii  libcdr-0.1-1   0.1.3-3
ii  libexif12  0.6.21-2
ii  libfontconfig1 2.11.0-6.7
ii  libfreetype6   2.6.3-3+b1
ii  libgc1c2   1:7.4.2-8
ii  libgcc11:6.2.0-6
ii  libgdk-pixbuf2.0-0 2.36.0-1
ii  libglib2.0-0   2.50.1-1
ii  libglibmm-2.4-1v5  2.50.0-1
ii  libgomp1   6.2.0-6
ii  libgsl22.2.1+dfsg-1
ii  libgtk2.0-02.24.31-1
ii  libgtkmm-2.4-1v5   1:2.24.5-1
ii  libgtkspell0   2.0.16-1.1
ii  libjpeg62-turbo1:1.5.0-1
ii  liblcms2-2 2.7-1
ii  libmagick++-6.q16-5v5  8:6.8.9.9-7.2+b1
ii  libmagickcore-6.q16-2  8:6.8.9.9-7.2+b1
ii  libmagickwand-6.q16-2  8:6.8.9.9-7.2+b1
ii  libpango-1.0-0 1.40.3-2
ii  libpangocairo-1.0-01.40.3-2
ii  libpangoft2-1.0-0  1.40.3-2
ii  libpangomm-1.4-1v5 2.40.1-3
ii  libpng16-161.6.25-2
ii  libpoppler-glib8   0.44.0-3
ii  libpoppler61   0.44.0-3
ii  libpopt0   1.16-10
ii  librevenge-0.0-0   0.0.4-6
ii  libsigc++-2.0-0v5  2.10.0-1
ii  libstdc++6 6.2.0-6
ii  libvisio-0.1-1 0.1.5-4
ii  libwpg-0.3-3   0.3.1-3
ii  libx11-6   2:1.6.3-1
ii  libxml22.9.4+dfsg1-2
ii  libxslt1.1 1.1.29-1
pn  python:any 
ii  zlib1g 1:1.2.8.dfsg-2+b1

Versions of packages inkscape recommends:
ii  aspell0.60.7~20110707-3+b1
ii  fig2dev [transfig]1:3.2.6-3
ii  imagemagick   8:6.8.9.9-7.2+b1
ii  libimage-magick-perl  8:6.8.9.9-7.2
pn  libwmf-bin
ii  python-lxml   3.6.4-1
ii  python-numpy  1:1.11.2-1
ii  transfig  1:3.2.6-3

Versions of packages inkscape suggests:
pn  dia | dia-gnome  
pn  libsvg-perl  
pn  libxml-xql-perl  
pn  pstoedit 
ii  python-uniconvertor  1.1.5-3
ii  ruby 1:2.3.0+4

-- no debconf information