summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index b065cb0b5d..04d595bbee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -1065,8 +1065,7 @@ void drawImageAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHei
}
long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
if (pixbuf == 0) return;
- long /*int*/ colormap = OS.gdk_colormap_get_system();
- gdk_pixbuf_get_from_window (pixbuf, srcImage.pixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
+ gdk_pixbuf_get_from_window (pixbuf, srcImage.pixmap, srcX, srcY, 0, 0, srcWidth, srcHeight);
int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
byte[] line = new byte[stride];
@@ -1102,11 +1101,10 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig
if (srcWidth != destWidth || srcHeight != destHeight) {
long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, srcWidth, srcHeight);
if (pixbuf != 0) {
- long /*int*/ colormap = OS.gdk_colormap_get_system();
- gdk_pixbuf_get_from_window (pixbuf, colorPixmap, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
+ gdk_pixbuf_get_from_window (pixbuf, colorPixmap, srcX, srcY, 0, 0, srcWidth, srcHeight);
long /*int*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
if (maskPixbuf != 0) {
- gdk_pixbuf_get_from_window (maskPixbuf, maskPixmap, 0, srcX, srcY, 0, 0, srcWidth, srcHeight);
+ gdk_pixbuf_get_from_window (maskPixbuf, maskPixmap, srcX, srcY, 0, 0, srcWidth, srcHeight);
int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
byte[] line = new byte[stride];
@@ -1257,8 +1255,7 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH
long /*int*/ scale(long /*int*/ src, int srcX, int srcY, int srcWidth, int srcHeight, int destWidth, int destHeight) {
long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, srcWidth, srcHeight);
if (pixbuf == 0) return 0;
- long /*int*/ colormap = OS.gdk_colormap_get_system();
- gdk_pixbuf_get_from_window (pixbuf, src, colormap, srcX, srcY, 0, 0, srcWidth, srcHeight);
+ gdk_pixbuf_get_from_window (pixbuf, src, srcX, srcY, 0, 0, srcWidth, srcHeight);
long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, destWidth, destHeight, OS.GDK_INTERP_BILINEAR);
OS.g_object_unref(pixbuf);
return scaledPixbuf;
@@ -4374,10 +4371,11 @@ void cairo_region_get_rectangles (long /*int*/ region, long /*int*/[] rectangles
}
}
-long /*int*/ gdk_pixbuf_get_from_window(long /*int*/ dest, long /*int*/ src, long /*int*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
+long /*int*/ gdk_pixbuf_get_from_window(long /*int*/ dest, long /*int*/ src, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
return OS.gdk_pixbuf_get_from_window (dest, src_x, src_y, width, height);
} else {
+ long /*int*/ cmap = OS.gdk_colormap_get_system();
return OS.gdk_pixbuf_get_from_drawable (dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
}
}