Android Open Source - Canvas-Test Drawable






From Project

Back to project page Canvas-Test.

License

The source code is released under:

Apache License

If you think the Android project Canvas-Test 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 foobar.canvastest.drawing;
/*from   w  ww.j a v a  2s.  co  m*/
import android.graphics.Canvas;

/**
 * An interface for things that can be drawn on a canvas.
 * An implementation might be as simple as a shape or text field,
 * or may be a large complex scene possibly filled with other 
 * Drawable objects.
 * 
 * This is a pattern I found useful in OpenGL drawing and may also
 * be helpful in a 2D canvas context.
 */
public interface Drawable {
  public void draw(Canvas canvas);
}




Java Source Code List

foobar.canvastest.MainCanvasActivity.java
foobar.canvastest.MySurfaceView.java
foobar.canvastest.drawing.Drawable.java
foobar.canvastest.drawing.scenes.ExampleScene.java