com.arsdigita.toolbox.rebop
Class ImageUtils

java.lang.Object
  extended bycom.arsdigita.toolbox.rebop.ImageUtils

public class ImageUtils
extends Object


Field Summary
static String versionId
           
 
Constructor Summary
ImageUtils()
           
 
Method Summary
static void alphaComposite(int x, int y, int spWidth, int spHeight, int bgWidth, int bgHeight, int[] spritePixels, int[] backgroundPixels, int[] compositePixels, int pct, boolean useAlpha, boolean updateBackground)
           
static void alphaDraw(Graphics g, Component comp, int x, int y, int[] backgroundPixels, int bgWidth, int bgHeight, int spriteW, int spriteH, Image spriteImage, Image alphaImage, int pct)
           
static Image createTiledImage(Image tile, Image output, int w, int h, ImageObserver c)
           
static Image createTiledImage(Image tile, int w, int h, Component c)
           
static void drawTiledImage(Graphics g, int startX, int startY, Rectangle sourceRect, Image sourceImage, int width, int height, ImageObserver obs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

createTiledImage

public static Image createTiledImage(Image tile,
                                     int w,
                                     int h,
                                     Component c)

createTiledImage

public static Image createTiledImage(Image tile,
                                     Image output,
                                     int w,
                                     int h,
                                     ImageObserver c)

drawTiledImage

public static void drawTiledImage(Graphics g,
                                  int startX,
                                  int startY,
                                  Rectangle sourceRect,
                                  Image sourceImage,
                                  int width,
                                  int height,
                                  ImageObserver obs)

alphaDraw

public static void alphaDraw(Graphics g,
                             Component comp,
                             int x,
                             int y,
                             int[] backgroundPixels,
                             int bgWidth,
                             int bgHeight,
                             int spriteW,
                             int spriteH,
                             Image spriteImage,
                             Image alphaImage,
                             int pct)

alphaComposite

public static void alphaComposite(int x,
                                  int y,
                                  int spWidth,
                                  int spHeight,
                                  int bgWidth,
                                  int bgHeight,
                                  int[] spritePixels,
                                  int[] backgroundPixels,
                                  int[] compositePixels,
                                  int pct,
                                  boolean useAlpha,
                                  boolean updateBackground)
Parameters:
x - top-left x-coordinate in background image that sprite overlaps
y - top-left y-coordinate in background image that sprite overlaps
spWidth - width of sprite in pixels
spHeight - height of sprite in pixels
bgWidth - width of background image in pixels
bgHeight - height of background image in pixels
spritePixels - pixels representing the sprite, including an 8-bit Alpha channel
backgroundPixels - pixels representing the background over which the sprite will be composited
compositePixels - pixels that will receive the composite value
pct - degree of intensity for the blend, from 0 to 255
useAlpha - if false, percentage blend only, ignoring alpha channel in sprite Alpha-composites a sprite over a background image


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC