Android Open Source - polygons Oval






From Project

Back to project page polygons.

License

The source code is released under:

GNU General Public License

If you think the Android project polygons 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.github.polygons.figures;
/*w w  w. ja  va  2s.co m*/
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;

import com.nobcatz.android.polygons.R;

/**
 * Created by Marta on 03/11/2013.
 */
public class Oval extends Figure {

    public Oval(Context context) {
        super(context);
        this.id = 0;
    }

    public Oval(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.id = 0;
    }

    public Oval(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.id = 0;
    }

    public void drawFigure(Canvas canvas) {
        canvas.drawOval(new RectF(0, 0, canvas.getWidth(), canvas.getHeight()), this.paint);

        paint.setColor(getResources().getColor(R.color.base3));

        canvas.drawOval(new RectF(10,10, canvas.getWidth()-10, canvas.getHeight()-10), this.paint);
    }
}




Java Source Code List

com.github.polygons.FigureListActivity.java
com.github.polygons.GameActivity.java
com.github.polygons.LevelActivity.java
com.github.polygons.LostActivity.java
com.github.polygons.MainActivity.java
com.github.polygons.figures.Figure.java
com.github.polygons.figures.Oval.java
com.github.polygons.figures.Square.java
com.github.polygons.figures.Triangle.java
com.github.polygons.logic.CustomAudioManager.java
com.github.polygons.logic.FigureGenerator.java
com.github.polygons.logic.Keeper.java
com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.GameHelper.java