mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
fixed ghost painting
This commit is contained in:
-2
@@ -1,6 +1,5 @@
|
||||
package org.diylc.plugins.canvas;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
@@ -60,7 +59,6 @@ class CanvasPanel extends JComponent implements Autoscroll {
|
||||
public CanvasPanel(IPlugInPort plugInPort) {
|
||||
super();
|
||||
this.plugInPort = plugInPort;
|
||||
setBackground(Color.white);
|
||||
setFocusable(true);
|
||||
initializeListeners();
|
||||
initializeDnD();
|
||||
|
||||
+3
-2
@@ -45,8 +45,8 @@ public class ProjectPainter {
|
||||
// determine which components are invalidated when they are not in the map.
|
||||
private Map<IDIYComponent<?>, ComponentState> lastDrawnStateMap;
|
||||
|
||||
public boolean antiAliasing = ConfigurationManager.getInstance().readBoolean(
|
||||
ANTIALIASING_KEY, true);
|
||||
public boolean antiAliasing = ConfigurationManager.getInstance().readBoolean(ANTIALIASING_KEY,
|
||||
true);
|
||||
|
||||
public ProjectPainter() {
|
||||
super();
|
||||
@@ -74,6 +74,7 @@ public class ProjectPainter {
|
||||
|
||||
g2dWrapper.setColor(Constants.CANVAS_COLOR);
|
||||
g2dWrapper.fillRect(0, 0, d.width, d.height);
|
||||
g2d.setClip(new Rectangle(new Point(0, 0), d));
|
||||
|
||||
if (drawOptions.contains(DrawOption.GRID)) {
|
||||
double zoomStep = project.getGridSpacing().convertToPixels() * zoomLevel;
|
||||
|
||||
Reference in New Issue
Block a user