mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix cache for proto board and breadboard
This commit is contained in:
@@ -27,6 +27,7 @@ import java.awt.Composite;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
|
||||
import org.diylc.awt.StringUtils;
|
||||
import org.diylc.common.HorizontalAlignment;
|
||||
@@ -376,6 +377,12 @@ public class Breadboard extends AbstractComponent<Void> {
|
||||
@Override
|
||||
public String getControlPointNodeName(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle2D getCachingBounds() {
|
||||
Point finalSecondPoint = getControlPoint(1);
|
||||
return new Rectangle2D.Double(point.x, point.y, finalSecondPoint.x - point.x + 1, finalSecondPoint.y - point.y + 1);
|
||||
}
|
||||
|
||||
public enum BreadboardSize {
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Point;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
|
||||
import org.diylc.awt.StringUtils;
|
||||
import org.diylc.common.HorizontalAlignment;
|
||||
@@ -694,5 +695,11 @@ public class ProtoBoard extends AbstractComponent<Void> {
|
||||
@Override
|
||||
public String getControlPointNodeName(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle2D getCachingBounds() {
|
||||
Point finalSecondPoint = getControlPoint(1);
|
||||
return new Rectangle2D.Double(point.x, point.y, finalSecondPoint.x - point.x + 1, finalSecondPoint.y - point.y + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user