summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2006-01-18 22:50:59 +0000
committerSilenio Quarti <silenio>2006-01-18 22:50:59 +0000
commit9bb31684321f267f5ae1957b1758fe2bcf2a11f8 (patch)
tree692bdc4ffa050dcde3355eedffa0c8b397b90cab /bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
parentfa01e290bf435dfab0446b77a2b069698d8013d4 (diff)
downloadeclipse.platform.swt-9bb31684321f267f5ae1957b1758fe2bcf2a11f8.tar.gz
eclipse.platform.swt-9bb31684321f267f5ae1957b1758fe2bcf2a11f8.tar.xz
eclipse.platform.swt-9bb31684321f267f5ae1957b1758fe2bcf2a11f8.zip
121506 - GC.drawImage() selects wrong source region
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
index b4e368b1a0..78e97a1651 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
@@ -733,6 +733,8 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH
int[] transform = new int[]{(int)(((float)srcWidth / destWidth) * 65536), 0, 0, 0, (int)(((float)srcHeight / destHeight) * 65536), 0, 0, 0, 65536};
OS.XRenderSetPictureTransform(xDisplay, srcPict, transform);
if (maskPict != 0) OS.XRenderSetPictureTransform(xDisplay, maskPict, transform);
+ srcX *= destWidth / (float)srcWidth;
+ srcY *= destHeight / (float)srcHeight;
}
int clipping = data.clipRgn;
if (data.damageRgn != 0) {