Revision: 2353
http://sourceforge.net/p/swingme/code/2353
Author: yuranet
Date: 2017-12-18 20:50:43 +0000 (Mon, 18 Dec 2017)
Log Message:
-----------
fixed scaling of image for hi dpi windows
Modified Paths:
--------------
me4se/src/org/me4se/scm/ScmWrapper.java
Modified: me4se/src/org/me4se/scm/ScmWrapper.java
===================================================================
--- me4se/src/org/me4se/scm/ScmWrapper.java 2017-11-28 23:44:00 UTC (rev 2352)
+++ me4se/src/org/me4se/scm/ScmWrapper.java 2017-12-18 20:50:43 UTC (rev 2353)
@@ -265,10 +265,14 @@
// YURA for some crazy reason that makes no sense, this is a LOT faster on JavaSE Windows then what is above!
// even though really it is doing the sxact same thing!
g.getClipBounds(clip);
- if (!g.drawImage(offScreenCache, clip.x, clip.y, clip.x+clip.width, clip.y+clip.height,
- (int) (clip.x/scale), (int) (clip.y/scale), (int) ((clip.x+clip.width)/scale), (int) ((clip.y+clip.height)/scale), this)) {
+
+ Graphics2D g2 = ((Graphics2D)g);
+ g2.scale(scale, scale);
+ int x1 = (int) (clip.x/scale),y1 = (int) (clip.y/scale),x2 = (int) ((clip.x+clip.width)/scale),y2 = (int) ((clip.y+clip.height)/scale);
+ if (!g.drawImage(offScreenCache, x1, y1, x2, y2, x1, y1, x2, y2, this)) {
System.out.println("DRAWIMAGE WAS RETURNING FALSE!!!");
}
+ g2.scale(1 / scale, 1 / scale);
// g.drawImage(offScreen, 0, 0, this);
}
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|