Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2020-11-11 09:26:24 +0000
committerSravan Kumar Lakkimsetti2020-11-13 11:13:14 +0000
commitda64c04309c040b9e2f58c7843f308e426fa91eb (patch)
tree67d6c803753650295249b76bed6d3a558d0ed187
parent7fdaade9d084185968ddcc89ffb33a4d88cae3e1 (diff)
downloadeclipse.platform.swt-da64c04309c040b9e2f58c7843f308e426fa91eb.tar.gz
eclipse.platform.swt-da64c04309c040b9e2f58c7843f308e426fa91eb.tar.xz
eclipse.platform.swt-da64c04309c040b9e2f58c7843f308e426fa91eb.zip
Bug 565899 - [HIDPI][MAC][RETINA] Gutter with linenumbers on scrambled
in (Java) editor - corrected getrepresetation_100 method itself. rather than error checking the in internal_new_gc - This contains the fix. Refactoring part will be added as separate commit Change-Id: I8dac337ae14ed60f077294ea9350d69a6087a95c
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index b3ca057ae7..b1027024be 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
@@ -1144,11 +1144,11 @@ NSBitmapImageRep getRepresentation_100 () {
}
}
}
- NSBitmapImageRep newRep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
- newRep = newRep.initWithData(handle.TIFFRepresentation());
- newRep.setSize(size);
+ NSBitmapImageRep newRep = createImageRep(size);
+ for (int i = 0; i < count; i++) {
+ handle.removeRepresentation(new NSImageRep(handle.representations().objectAtIndex(0)));
+ }
handle.addRepresentation(newRep);
- newRep.release();
return newRep;
}
@@ -1599,14 +1599,6 @@ public long internal_new_GC (GCData data) {
try {
int scaleFactor = DPIUtil.getDeviceZoom() / 100;
NSBitmapImageRep imageRep = getRepresentation();
- NSSize imgSize = handle.size();
- NSSize targetSize = new NSSize();
- targetSize.height = imgSize.height * scaleFactor;
- targetSize.width = imgSize.width * scaleFactor;
-
- if (!((imageRep.pixelsHigh() == targetSize.height) && (imageRep.pixelsWide() == targetSize.width))) {
- imageRep = createImageRep(targetSize);
- }
NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep);
if (context == null) {

Back to the top