mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-10-12 01:45:18 +02:00
Umbenennung eines Parameters
This commit is contained in:
@@ -95,16 +95,16 @@ public class Attractor extends Mover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw( Graphics2D graphics, AffineTransform pVerzerrung ) {
|
public void draw( Graphics2D graphics, AffineTransform transform ) {
|
||||||
double m = 2.0*mass;
|
double m = 2.0*mass;
|
||||||
|
|
||||||
AffineTransform at = graphics.getTransform();
|
AffineTransform at = graphics.getTransform();
|
||||||
graphics.transform(pVerzerrung);
|
graphics.transform(transform);
|
||||||
graphics.setColor(new java.awt.Color(255,193,64,66));
|
graphics.setColor(new java.awt.Color(255,193,64,66));
|
||||||
graphics.fillOval((int)(-.5*m), (int)(-.5*m), (int)(2*getRadius()+m), (int)(2*getRadius()+m));
|
graphics.fillOval((int)(-.5*m), (int)(-.5*m), (int)(2*getRadius()+m), (int)(2*getRadius()+m));
|
||||||
graphics.setTransform(at);
|
graphics.setTransform(at);
|
||||||
|
|
||||||
super.draw(graphics, pVerzerrung);
|
super.draw(graphics, transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,17 +168,17 @@ public class Mover extends Circle implements Updatable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw( Graphics2D graphics, AffineTransform pVerzerrung ) {
|
public void draw( Graphics2D graphics, AffineTransform transform ) {
|
||||||
if( SHOW_VELOCITY ) {
|
if( SHOW_VELOCITY ) {
|
||||||
Vector v = velocity.copy().scale(10);
|
Vector v = velocity.copy().scale(10);
|
||||||
Arrow ar = new Arrow(v);
|
Arrow ar = new Arrow(v);
|
||||||
|
|
||||||
AffineTransform af = new AffineTransform(pVerzerrung);
|
AffineTransform af = new AffineTransform(transform);
|
||||||
af.translate(radius, radius);
|
af.translate(radius, radius);
|
||||||
ar.draw(graphics, af);
|
ar.draw(graphics, af);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.draw(graphics, pVerzerrung);
|
super.draw(graphics, transform);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user