mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-10-12 01:45:18 +02:00
Viele weitere Beispielprojekt für verschiedene Anwendungen
This commit is contained in:
29
examples/zm_formen/Leinwand.java
Normal file
29
examples/zm_formen/Leinwand.java
Normal file
@@ -0,0 +1,29 @@
|
||||
import schule.ngb.zm.Drawable;
|
||||
import schule.ngb.zm.DrawableLayer;
|
||||
import schule.ngb.zm.Zeichenmaschine;
|
||||
|
||||
public class Leinwand {
|
||||
|
||||
private final Zeichenmaschine zm;
|
||||
|
||||
private final DrawableLayer zeichenflaeche;
|
||||
|
||||
public Leinwand() {
|
||||
zm = new Zeichenmaschine(800, 800, "ZM: Shapes", false);
|
||||
zeichenflaeche = new DrawableLayer();
|
||||
zm.addLayer(zeichenflaeche);
|
||||
}
|
||||
|
||||
public void anzeigen( Drawable pForm ) {
|
||||
zeichenflaeche.add(pForm);
|
||||
}
|
||||
|
||||
public void beenden() {
|
||||
zm.exit();
|
||||
}
|
||||
|
||||
public void zeichnen() {
|
||||
zm.redraw();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user