Android Open Source - android_game_engine Drawable Element






From Project

Back to project page android_game_engine.

License

The source code is released under:

GNU General Public License

If you think the Android project android_game_engine 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 org.es.engine.graphics.drawable;
//  w  w w  . j  a v  a  2 s.  c om
import android.graphics.Canvas;

import org.es.engine.graphics.utils.DrawingParam;

/**
 * Interface for every elements to draw on screen.
 *
 * @author Cyril Leroux
 *         Created on 24/09/13.
 */
public interface DrawableElement {

    void onUpdateSurfaceSize(int surfaceWidth, int surfaceHeight);

    void draw(Canvas canvas, DrawingParam param);

    /** Get the abscissa of the drawable in the canvas. */
    float getPosX();

    /** Get the ordinate of the drawable in the canvas. */
    float getPosY();

    /** Set the position of the drawable in the canvas. */
    void setPosition(float x, float y);

    /** Offset the position by adding dx and dy to its coordinates. */
    void offsetPosition(float dx, float dy);

    /** Set the width of the drawable in the canvas. */
    float getWidth();

    /** Set the height of the drawable in the canvas. */
    float getHeight();
}




Java Source Code List

com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.GameHelperUtils.java
com.google.example.games.basegameutils.GameHelper.java
com.google.example.games.basegameutils.ScreenUtils.java
org.es.engine.audio.Sound.java
org.es.engine.game_mechanic.DrawingThread.java
org.es.engine.game_mechanic.DrawingView.java
org.es.engine.graphics.animation.AnimationCallback.java
org.es.engine.graphics.animation.Animation.java
org.es.engine.graphics.animation.BitmapAnimation.java
org.es.engine.graphics.animation.SpriteSheetAnimation.java
org.es.engine.graphics.drawable.DrawableElement.java
org.es.engine.graphics.sprite.GenericSprite.java
org.es.engine.graphics.sprite.SpriteSheet.java
org.es.engine.graphics.sprite.Sprite.java
org.es.engine.graphics.utils.DrawTextUtils.java
org.es.engine.graphics.utils.DrawingParam.java
org.es.engine.hud.Button.java
org.es.engine.hud.Control.java
org.es.engine.hud.HUD.java
org.es.engine.hud.Text.java
org.es.engine.hud.ToggleButton.java
org.es.engine.toolbox.pathfinding.Node.java
org.es.engine.toolbox.pathfinding.ShortestPath.java