com.threerings.opengl.gui.background
Class ImageBackground

java.lang.Object
  extended by com.threerings.opengl.gui.background.Background
      extended by com.threerings.opengl.gui.background.ImageBackground

public class ImageBackground
extends Background

Supports image backgrounds in a variety of ways. Specifically:


Field Summary
static int ANCHOR_LL
           
static int ANCHOR_LR
           
static int ANCHOR_UL
           
static int ANCHOR_UR
           
static int ASPECT_INNER
           
static int ASPECT_OUTER
           
static int CENTER_X
           
static int CENTER_XY
           
static int CENTER_Y
           
static int FRAME_X
           
static int FRAME_XY
           
static int FRAME_Y
           
static int SCALE_X
           
static int SCALE_XY
           
static int SCALE_Y
           
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CENTER_XY

public static final int CENTER_XY
See Also:
Constant Field Values

CENTER_X

public static final int CENTER_X
See Also:
Constant Field Values

CENTER_Y

public static final int CENTER_Y
See Also:
Constant Field Values

SCALE_XY

public static final int SCALE_XY
See Also:
Constant Field Values

SCALE_X

public static final int SCALE_X
See Also:
Constant Field Values

SCALE_Y

public static final int SCALE_Y
See Also:
Constant Field Values

TILE_XY

public static final int TILE_XY
See Also:
Constant Field Values

TILE_X

public static final int TILE_X
See Also:
Constant Field Values

TILE_Y

public static final int TILE_Y
See Also:
Constant Field Values

FRAME_XY

public static final int FRAME_XY
See Also:
Constant Field Values

FRAME_X

public static final int FRAME_X
See Also:
Constant Field Values

FRAME_Y

public static final int FRAME_Y
See Also:
Constant Field Values

ASPECT_INNER

public static final int ASPECT_INNER
See Also:
Constant Field Values

ASPECT_OUTER

public static final int ASPECT_OUTER
See Also:
Constant Field Values

ANCHOR_LL

public static final int ANCHOR_LL
See Also:
Constant Field Values

ANCHOR_LR

public static final int ANCHOR_LR
See Also:
Constant Field Values

ANCHOR_UR

public static final int ANCHOR_UR
See Also:
Constant Field Values

ANCHOR_UL

public static final int ANCHOR_UL
See Also:
Constant Field Values
Constructor Detail

ImageBackground

public ImageBackground(int mode,
                       Image image)
Creates an image background in the specified mode using the supplied image.


ImageBackground

public ImageBackground(int mode,
                       Image image,
                       Insets frame)
Creates an image background in the specified mode using the supplied image and the special frame. This should only be used if one of the framing modes is being used and the supplied frame will be used instead of the default frame which divides the image in thirds.


ImageBackground

public 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. This should only be used if one of the framing modes is being used and the supplied frame will be used instead of the default frame which divides the image in thirds.

Method Detail

getMinimumWidth

public int getMinimumWidth()
Description copied from class: Background
Returns the minimum width allowed by this background.

Overrides:
getMinimumWidth in class Background

getMinimumHeight

public int getMinimumHeight()
Returns the minimum height allowed by this background.

Overrides:
getMinimumHeight in class Background

render

public void render(Renderer renderer,
                   int x,
                   int y,
                   int width,
                   int height,
                   float alpha)
Description copied from class: Background
Renders this background.

Overrides:
render in class Background


Copyright © 2011. All Rights Reserved.