|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.gui.background.Background
com.threerings.opengl.gui.background.ImageBackground
public class ImageBackground
Supports image backgrounds in a variety of ways. Specifically:
+----------+----------------+----------+ | unscaled | <- scaled -> | unscaled | +----------+----------------+----------+ | ^ | ^ | ^ | | scaled | <- scaled -> | scaled | | v | v | v | +----------+----------------+----------+ | unscaled | <- scaled -> | unscaled | +----------+----------------+----------+
| Field Summary | |
|---|---|
protected int |
_anchor
|
protected Insets |
_frame
|
protected Image |
_image
|
protected int |
_mode
|
static int |
ANCHOR_LL
|
static int |
ANCHOR_LR
|
static int |
ANCHOR_UL
|
static int |
ANCHOR_UR
|
protected static int |
ASPECT
|
static int |
ASPECT_INNER
|
static int |
ASPECT_OUTER
|
protected static int |
CENTER
|
static int |
CENTER_X
|
static int |
CENTER_XY
|
static int |
CENTER_Y
|
protected static int |
FRAME
|
static int |
FRAME_X
|
static int |
FRAME_XY
|
static int |
FRAME_Y
|
protected static int |
SCALE
|
static int |
SCALE_X
|
static int |
SCALE_XY
|
static int |
SCALE_Y
|
protected static int |
TILE
|
static int |
TILE_X
|
static int |
TILE_XY
|
static int |
TILE_Y
|
| Constructor Summary | |
|---|---|
ImageBackground(int mode,
Image image)
Creates an image background in the specified mode using the supplied image. |
|
ImageBackground(int mode,
Image image,
Insets frame)
Creates an image background in the specified mode using the supplied image and the special frame. |
|
ImageBackground(int mode,
Image image,
Insets frame,
int anchor)
Creates an image background in the specified mode using the supplied image and the special frame. |
|
| Method Summary | |
|---|---|
int |
getMinimumHeight()
Returns the minimum height allowed by this background. |
int |
getMinimumWidth()
Returns the minimum width allowed by this background. |
void |
render(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
Renders this background. |
protected void |
renderAspectScaled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
protected void |
renderCentered(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
protected void |
renderFramed(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
protected void |
renderRow(Renderer renderer,
int x,
int y,
int width,
int iheight,
int sy,
float alpha)
|
protected void |
renderScaled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
protected void |
renderTiled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CENTER_XY
public static final int CENTER_X
public static final int CENTER_Y
public static final int SCALE_XY
public static final int SCALE_X
public static final int SCALE_Y
public static final int TILE_XY
public static final int TILE_X
public static final int TILE_Y
public static final int FRAME_XY
public static final int FRAME_X
public static final int FRAME_Y
public static final int ASPECT_INNER
public static final int ASPECT_OUTER
public static final int ANCHOR_LL
public static final int ANCHOR_LR
public static final int ANCHOR_UR
public static final int ANCHOR_UL
protected int _mode
protected int _anchor
protected Image _image
protected Insets _frame
protected static final int CENTER
protected static final int SCALE
protected static final int TILE
protected static final int FRAME
protected static final int ASPECT
| Constructor Detail |
|---|
public ImageBackground(int mode,
Image image)
public ImageBackground(int mode,
Image image,
Insets frame)
public ImageBackground(int mode,
Image image,
Insets frame,
int anchor)
| Method Detail |
|---|
public int getMinimumWidth()
Background
getMinimumWidth in class Backgroundpublic int getMinimumHeight()
getMinimumHeight in class Background
public void render(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
Background
render in class Background
protected void renderCentered(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
protected void renderScaled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
protected void renderTiled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
protected void renderRow(Renderer renderer,
int x,
int y,
int width,
int iheight,
int sy,
float alpha)
protected void renderFramed(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
protected void renderAspectScaled(Renderer renderer,
int x,
int y,
int width,
int height,
float alpha)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||