public final class Drawable extends Object
Modifier and Type | Method and Description |
---|---|
static Image |
loadImage(ImageBuffer surface)
Load an image from a java image (sharing the same surface).
|
static Image |
loadImage(Media media)
Load an image from a file.
|
static Sprite |
loadSprite(ImageBuffer surface)
Load a sprite from a buffered image (sharing the same surface).
|
static Sprite |
loadSprite(Media media)
Load a sprite from a file.
|
static SpriteAnimated |
loadSpriteAnimated(ImageBuffer surface,
int horizontalFrames,
int verticalFrames)
Load an animated sprite, giving horizontal and vertical frames (sharing the same surface).
|
static SpriteAnimated |
loadSpriteAnimated(Media media,
int horizontalFrames,
int verticalFrames)
Load an animated sprite from a file, giving horizontal and vertical frames.
|
static SpriteFont |
loadSpriteFont(Media media,
Media data,
int letterWidth,
int letterHeight)
Load a font based on an image.
|
static SpriteParallaxed |
loadSpriteParallaxed(Media media,
int linesNumber,
int startWidth,
int startHeight)
Load a parallaxed sprite, for parallax effect.
|
static SpriteTiled |
loadSpriteTiled(ImageBuffer surface,
int tileWidth,
int tileHeight)
Load a tiled sprite using an image reference, giving tile dimension (sharing the same surface).
|
static SpriteTiled |
loadSpriteTiled(Media media,
int tileWidth,
int tileHeight)
Load a tiled sprite from a file, giving tile dimension.
|
public static Image loadImage(Media media)
media
- The image media.public static Image loadImage(ImageBuffer surface)
surface
- The surface reference.public static Sprite loadSprite(Media media)
media
- The sprite media.public static Sprite loadSprite(ImageBuffer surface)
surface
- The surface reference.public static SpriteAnimated loadSpriteAnimated(Media media, int horizontalFrames, int verticalFrames)
media
- The sprite media.horizontalFrames
- The number of horizontal frames.verticalFrames
- The number of vertical frames.public static SpriteAnimated loadSpriteAnimated(ImageBuffer surface, int horizontalFrames, int verticalFrames)
surface
- The surface reference.horizontalFrames
- The number of horizontal frames.verticalFrames
- The number of vertical frames.public static SpriteTiled loadSpriteTiled(Media media, int tileWidth, int tileHeight)
media
- The sprite media.tileWidth
- The tile width.tileHeight
- The tile height.public static SpriteTiled loadSpriteTiled(ImageBuffer surface, int tileWidth, int tileHeight)
surface
- The surface reference.tileWidth
- The tile width.tileHeight
- The tile height.public static SpriteParallaxed loadSpriteParallaxed(Media media, int linesNumber, int startWidth, int startHeight)
media
- The sprite media.linesNumber
- The number of parallax lines.startWidth
- The starting width percent (100 is default, 50 is twice smaller, 200 is twice larger).startHeight
- The starting height percent (100 is default, 50 is twice smaller, 200 is twice larger).public static SpriteFont loadSpriteFont(Media media, Media data, int letterWidth, int letterHeight)
media
- The font sprite media.data
- The font data media.letterWidth
- The font image letter width.letterHeight
- The font image letter height.Copyright © 2014 Byron 3D Games Studio. All rights reserved.