mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
introduce another clip rect for the cache
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -158,7 +158,8 @@ public class MainFrame extends JFrame implements ISwingUI {
|
||||
if (presenter.allowFileAction()) {
|
||||
ConfigurationManager.getInstance().writeValue(IPlugInPort.ABNORMAL_EXIT_KEY, false);
|
||||
dispose();
|
||||
presenter.dispose();
|
||||
presenter.dispose();
|
||||
LOG.info("Closing the app");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ public class TemplateDialog extends JDialog {
|
||||
super.paint(g);
|
||||
// Graphics2D g2d = (Graphics2D) g;
|
||||
// AffineTransform transform = g2d.getTransform();
|
||||
presenter.draw((Graphics2D) g, EnumSet.of(DrawOption.ZOOM, DrawOption.ANTIALIASING), null, null);
|
||||
presenter.draw((Graphics2D) g, EnumSet.of(DrawOption.ZOOM, DrawOption.ANTIALIASING), null, null, null);
|
||||
// g2d.setTransform(transform);
|
||||
// Rectangle rect = canvasPanel.getBounds();
|
||||
// BorderFactory.createEtchedBorder().paintBorder(canvasPanel,
|
||||
|
||||
@@ -270,7 +270,7 @@ public class CanvasPanel extends JComponent implements Autoscroll {
|
||||
drawOptions.add(DrawOption.ENABLE_CACHING);
|
||||
}
|
||||
|
||||
plugInPort.draw(g2d, drawOptions, null, null);
|
||||
plugInPort.draw(g2d, drawOptions, null, null, visibleRect);
|
||||
|
||||
if (useHardwareAcceleration) {
|
||||
VolatileImage volatileImage = (VolatileImage) bufferImage;
|
||||
|
||||
@@ -319,7 +319,7 @@ public class UploadDialog extends ButtonDialog {
|
||||
}
|
||||
|
||||
// g2d.scale(zoomRatio, zoomRatio);
|
||||
UploadDialog.this.plugInPort.draw(g2d, EnumSet.of(DrawOption.ANTIALIASING), null, zoomRatio);
|
||||
UploadDialog.this.plugInPort.draw(g2d, EnumSet.of(DrawOption.ANTIALIASING), null, zoomRatio, null);
|
||||
}
|
||||
|
||||
public String getKeywords() {
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ProjectDrawingProvider implements IDrawingProvider {
|
||||
if (includeExtraSpace) {
|
||||
drawOptions.add(DrawOption.EXTRA_SPACE);
|
||||
}
|
||||
plugInPort.draw((Graphics2D) g, drawOptions, null, zoomFactor);
|
||||
plugInPort.draw((Graphics2D) g, drawOptions, null, zoomFactor, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ProjectPreview extends JPanel implements PropertyChangeListener, IF
|
||||
|
||||
// g2d.translate(x, y);
|
||||
// g2d.scale(zoomRatio, zoomRatio);
|
||||
presenter.draw(g2d, EnumSet.noneOf(DrawOption.class), null, zoomRatio);
|
||||
presenter.draw(g2d, EnumSet.noneOf(DrawOption.class), null, zoomRatio, null);
|
||||
|
||||
g2d.setColor(Color.black);
|
||||
g2d.drawRect(0, 0, d.width - (int) (1 / zoomRatio), d.height - (int) (1 / zoomRatio));
|
||||
|
||||
@@ -60,7 +60,7 @@ public class TraceMaskDrawingProvider implements IDrawingProvider {
|
||||
|
||||
@Override
|
||||
public void draw(int page, Graphics g, double zoomFactor) {
|
||||
plugInPort.draw((Graphics2D) g, EnumSet.of(DrawOption.ANTIALIASING), new PCBLayerFiler(getUsedLayers()[page]), zoomFactor);
|
||||
plugInPort.draw((Graphics2D) g, EnumSet.of(DrawOption.ANTIALIASING), new PCBLayerFiler(getUsedLayers()[page]), zoomFactor, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user