Android Open Source - physics Circle






From Project

Back to project page physics.

License

The source code is released under:

GNU General Public License

If you think the Android project physics listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nuaavee.physics.circle;
/*w  ww  . j av a 2  s . c o m*/
import android.graphics.Canvas;
import android.graphics.Paint;
import com.nuaavee.physics.model.Coordinate;
import com.nuaavee.physics.model.PhysicalObject;

/**
 * @author nuaavee
 */
public class Circle extends PhysicalObject {

  private final float radius;
  private final Paint paint;

  public Circle(float radius, Coordinate position, int color) {
    super(position);
    this.radius = radius;
    paint = new Paint();
    paint.setColor(color);
    paint.setStyle(Paint.Style.FILL);
  }

  @Override
  public void draw(Canvas canvas) {
    canvas.drawCircle(getPosition().getX(), getPosition().getY(), radius, paint);
  }
}




Java Source Code List

com.nuaavee.physics.app.AstroboyMasterConsole.java
com.nuaavee.physics.app.FightForcesOfEvilActivity.java
com.nuaavee.physics.app.MainActivity.java
com.nuaavee.physics.app.MainView.java
com.nuaavee.physics.app.controller.AstroboyRemoteControl.java
com.nuaavee.physics.app.controller.Astroboy.java
com.nuaavee.physics.circle.CircleModule.java
com.nuaavee.physics.circle.Circle.java
com.nuaavee.physics.core.CoreModule.java
com.nuaavee.physics.core.EventProcessor.java
com.nuaavee.physics.core.InjectorHelper.java
com.nuaavee.physics.core.Shell.java
com.nuaavee.physics.core.action.ActionEventFactory.java
com.nuaavee.physics.core.impl.EventProcessorImpl.java
com.nuaavee.physics.core.impl.ShellImpl.java
com.nuaavee.physics.core.layer.LayerManager.java
com.nuaavee.physics.core.layer.impl.LayerManagerImpl.java
com.nuaavee.physics.model.Coordinate.java
com.nuaavee.physics.model.ModelModule.java
com.nuaavee.physics.model.PhysicalObject.java
com.nuaavee.physics.model.action.ActionEventType.java
com.nuaavee.physics.model.action.ActionEvent.java
com.nuaavee.physics.model.action.Actionable.java
com.nuaavee.physics.model.action.listener.AbstractActionListener.java
com.nuaavee.physics.model.action.listener.ActionListener.java
com.nuaavee.physics.model.action.listener.BackgroundActionListener.java
com.nuaavee.physics.model.action.listener.ChildrenActionListener.java
com.nuaavee.physics.model.action.listener.PhysicalObjectActionListener.java
com.nuaavee.physics.model.layer.BackgroundLayer.java
com.nuaavee.physics.model.layer.DaynamicLayer.java
com.nuaavee.physics.model.layer.Layer.java