Back to project page Look.
The source code is released under:
====================== LOOK! LICENSING TERMS ====================== look! is licensed under the BSD 3-Clause (also known as "BSD New" or "BSD Simplified"), as follows: Copyright (c) 2010-2012, Look...
If you think the Android project Look listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** *----------------------------------------------------------------------------- * Copyright (c) 2012, Look! Development Team * All rights reserved./* w w w.ja v a 2 s. c o m*/ * * Distributed under the terms of the BSD Simplified License. * * The full license is in the LICENSE file, distributed with this software. *----------------------------------------------------------------------------- */ package es.ucm.look.ar.ar2D.drawables; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import es.ucm.look.ar.ar2D.Drawable2D; /** * A 2D drawable circle, centered at ( 0, 0 ) * * @author ??ngel Serrano * */ public class Circle2D implements Drawable2D { private boolean drawCircle; private float radius; private Paint p; public Circle2D(float radius ){ this( radius, false, Color.BLACK ); } public Circle2D(float radius, boolean drawCircle, int color ) { this.radius = radius; this.drawCircle = drawCircle; p = new Paint(); p.setColor(color); } @Override public void draw(Canvas c) { if (drawCircle) { c.drawCircle(0, 0, radius, p); } } @Override public void update(long elapsed) { } @Override public void drawTouchableArea(Canvas c, Paint p) { c.drawCircle(0, 0, radius, p); } }