Render optimization (#1087)

* Caching and culling improvements

* doc

* Update canvas-rendering-cache-and-culling.md

* caching for wires

* cache invalidation improvements

* caching improvements

* twisted wire performance update

* Improved grid rendering on screen and when exporting; PDF export of the grid is now vector-based and does not get blurry on zooming in

* area append improvement

* bug fix for subtracting trace cuts

* Twisted wire stroke render improvement

* various performance improvements

* lazy area merging

* regression update

* Update update.xml

* code cleanup

* Twisted wire border thickness fix
This commit is contained in:
Bane Stojkovic
2026-10-14 21:15:40 +02:00
committed by GitHub
parent 251b945e6d
commit a8d8a9b409
41 changed files with 2210 additions and 379 deletions
@@ -306,7 +306,11 @@ public class CanvasPanel extends JComponent implements Autoscroll {
Rectangle visibleRect = getVisibleRect();
if (bufferImage == null) {
// the buffer is redrawn in full on every paint, so only a change in size, which includes the
// HiDPI scale, calls for a new one; scrolling does not
if (bufferImage == null
|| bufferImage.getWidth() != (int) Math.round(visibleRect.width * scaleFactor)
|| bufferImage.getHeight() != (int) Math.round(visibleRect.height * scaleFactor)) {
createBufferImage(visibleRect, scaleFactor);
}
Graphics2D bufferG2d = (Graphics2D) bufferImage.getGraphics();
@@ -118,7 +118,6 @@ public class CanvasPlugin implements IPlugIn{
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
getCanvasPanel().invalidateCache();
getCanvasPanel().revalidate();
}
});
@@ -127,7 +126,6 @@ public class CanvasPlugin implements IPlugIn{
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
getCanvasPanel().invalidateCache();
getCanvasPanel().revalidate();
}
});