mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 14:43:33 +02:00
Umbenennung eines Parameters
This commit is contained in:
@@ -95,16 +95,16 @@ public class Attractor extends Mover {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw( Graphics2D graphics, AffineTransform pVerzerrung ) {
|
||||
public void draw( Graphics2D graphics, AffineTransform transform ) {
|
||||
double m = 2.0*mass;
|
||||
|
||||
AffineTransform at = graphics.getTransform();
|
||||
graphics.transform(pVerzerrung);
|
||||
graphics.transform(transform);
|
||||
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.setTransform(at);
|
||||
|
||||
super.draw(graphics, pVerzerrung);
|
||||
super.draw(graphics, transform);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -168,17 +168,17 @@ public class Mover extends Circle implements Updatable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw( Graphics2D graphics, AffineTransform pVerzerrung ) {
|
||||
public void draw( Graphics2D graphics, AffineTransform transform ) {
|
||||
if( SHOW_VELOCITY ) {
|
||||
Vector v = velocity.copy().scale(10);
|
||||
Arrow ar = new Arrow(v);
|
||||
|
||||
AffineTransform af = new AffineTransform(pVerzerrung);
|
||||
AffineTransform af = new AffineTransform(transform);
|
||||
af.translate(radius, radius);
|
||||
ar.draw(graphics, af);
|
||||
}
|
||||
|
||||
super.draw(graphics, pVerzerrung);
|
||||
super.draw(graphics, transform);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user