Läuft muss nurnoch aufgeräumt werden

This commit is contained in:
2023-12-19 12:05:37 +01:00
parent dc1f783e00
commit 0e71917727
3 changed files with 14 additions and 63 deletions
+11 -2
View File
@@ -58,13 +58,22 @@ public class GrafikView extends JComponent implements Printable
* Zeichnet den aktuellen Pfad (solange die maus gedrückt gehalten wird)
* @param p -> Der aktuelle punkt als x-y-Koordinate
*/
public void drawFigur()
{
Graphics2D g2 = (Graphics2D)this.getGraphics(); // gefährlich!
drawPath(model.getFiguren().getLast().getPunkte(),g2);
g2.dispose(); //SEEEEHHHHRRRR WICHTIG!!!!!!!
}
public void drawPoint()
{
Graphics2D g2 = (Graphics2D)this.getGraphics(); // gefährlich!
drawPath(model.getPunkte(),g2);
g2.dispose(); //SEEEEHHHHRRRR WICHTIG!!!!!!!
g2.dispose(); //SEEEEHHHHRRRR WICHTIG!!!!!!!
}
@@ -87,7 +96,7 @@ public class GrafikView extends JComponent implements Printable
});
}
public void drawPath(List<Point> path, Graphics2D g2){
public void drawPath(List<Point> path, Graphics2D g2){
from = path.getFirst();
to = null;