diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-11-07 18:33:46 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-11-07 18:33:46 +0000 |
| commit | ade23a14a5b64bd2ddcf183abedd6b678efbc7da (patch) | |
| tree | e184e5b62a9536fb9356509a0787659249997ceb /src/sp-cursor.cpp | |
| parent | Fix some bugs pointed by vlada (diff) | |
| parent | 1639832 Blend and blur unspected results (diff) | |
| download | inkscape-ade23a14a5b64bd2ddcf183abedd6b678efbc7da.tar.gz inkscape-ade23a14a5b64bd2ddcf183abedd6b678efbc7da.zip | |
Update to trunk
(bzr r15142.1.36)
Diffstat (limited to 'src/sp-cursor.cpp')
| -rw-r--r-- | src/sp-cursor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp index 16659d1cf..4b9f1cc2d 100644 --- a/src/sp-cursor.cpp +++ b/src/sp-cursor.cpp @@ -108,6 +108,13 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(char const *const *xpm, GdkColor const& bla } } +#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<guchar*>(pixmap_buffer), GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), free_cursor_data, NULL); } |
