"Outline Mode" produces rendering issues when "Cache Boost" feature is

enabled
This commit is contained in:
bancika
2020-05-12 17:01:12 +02:00
parent 113cb69ae4
commit aec5348b83
2 changed files with 30 additions and 4 deletions
@@ -166,7 +166,7 @@ public class DrawingCache {
// only honor the cache if the component hasn't changed in the meantime // only honor the cache if the component hasn't changed in the meantime
if (value == null || !value.getComponent().equalsTo(component) if (value == null || !value.getComponent().equalsTo(component)
|| value.getState() != componentState || value.getZoom() != zoom) { || value.getState() != componentState || value.getZoom() != zoom || value.getOutlineMode() != outlineMode) {
// figure out size and placement of buffer image // figure out size and placement of buffer image
Rectangle2D rect = component.getCachingBounds(); Rectangle2D rect = component.getCachingBounds();
int width = (int)Math.round(rect.getWidth() * zoom); int width = (int)Math.round(rect.getWidth() * zoom);
@@ -236,7 +236,7 @@ public class DrawingCache {
// add to the cache // add to the cache
value = new CacheValue(component, image, wrapper.getCurrentArea(), wrapper.getContinuityPositiveAreas(), value = new CacheValue(component, image, wrapper.getCurrentArea(), wrapper.getContinuityPositiveAreas(),
wrapper.getContinuityNegativeAreas(), componentState, zoom, dx, dy, rect); wrapper.getContinuityNegativeAreas(), componentState, outlineMode, zoom, dx, dy, rect);
imageCache.put(component, value); imageCache.put(component, value);
} }
@@ -250,6 +250,7 @@ public class DrawingCache {
Map<String, Area> continuityPositiveAreas; Map<String, Area> continuityPositiveAreas;
Map<String, Area> continuityNegativeAreas; Map<String, Area> continuityNegativeAreas;
ComponentState state; ComponentState state;
boolean outlineMode;
double zoom; double zoom;
int dx; int dx;
int dy; int dy;
@@ -257,7 +258,7 @@ public class DrawingCache {
public CacheValue(IDIYComponent<?> component, BufferedImage image, Area currentArea, public CacheValue(IDIYComponent<?> component, BufferedImage image, Area currentArea,
Map<String, Area> continuityPositiveAreas, Map<String, Area> continuityNegativeAreas, Map<String, Area> continuityPositiveAreas, Map<String, Area> continuityNegativeAreas,
ComponentState state, double zoom, int dx, int dy, Rectangle2D cacheBounds) { ComponentState state, boolean outlineMode, double zoom, int dx, int dy, Rectangle2D cacheBounds) {
super(); super();
this.cacheBounds = cacheBounds; this.cacheBounds = cacheBounds;
// take a copy of the component, so we can check if it changed in the meantime // take a copy of the component, so we can check if it changed in the meantime
@@ -270,6 +271,7 @@ public class DrawingCache {
this.continuityPositiveAreas = continuityPositiveAreas; this.continuityPositiveAreas = continuityPositiveAreas;
this.continuityNegativeAreas = continuityNegativeAreas; this.continuityNegativeAreas = continuityNegativeAreas;
this.state = state; this.state = state;
this.outlineMode = outlineMode;
this.zoom = zoom; this.zoom = zoom;
this.dx = dx; this.dx = dx;
this.dy = dy; this.dy = dy;
@@ -299,6 +301,10 @@ public class DrawingCache {
return state; return state;
} }
public boolean getOutlineMode() {
return outlineMode;
}
public double getZoom() { public double getZoom() {
return zoom; return zoom;
} }
@@ -3083,7 +3083,7 @@
<minor>7</minor> <minor>7</minor>
<build>0</build> <build>0</build>
</versionNumber> </versionNumber>
<releaseDate>2020-05-03 00:00:00.000 CET</releaseDate> <releaseDate>2020-05-11 00:00:00.000 CET</releaseDate>
<name></name> <name></name>
<changes> <changes>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
@@ -3116,6 +3116,26 @@
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
</changes> </changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url> <url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>4</major>
<minor>8</minor>
<build>0</build>
</versionNumber>
<releaseDate>2020-05-11 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Improved Dutch translation</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>"Outline Mode" produces rendering issues when "Cache Boost" feature is enabled</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version> </org.diylc.appframework.update.Version>
</a> </a>
</java.util.Arrays_-ArrayList> </java.util.Arrays_-ArrayList>