jbcl.util Package
java.lang.Object +----com.borland.jbcl.util.ImageTexture
Properties Methods
Implements Serializable
ImageTexture
is a utility component that copies the pixels of a source image onto a larger destination surface, repeating the source image over and over to give the appearance of a texture to the destination surface. The component calculates the relative position of the origin between the source image and the destination surface and blits the Image. This allows the methods to be called multiple times passing overlapping or non-contiguous rectangles, and the images will always line up to form a seamless texture.
public static void texture(Image src, int sw, int sh, Graphics dest, int x, int y, int w, int h)This method tiles the source image specified onto the target surface with tiles of the specified size, repeating the image to fill in the specified rectangle.
Values less or equal to zero for the tile size result in that dimension of the image to remain unscaled (100%). This method uses the (0,0) origin to line up all the image blits so that overlapping or noncontiguous calls to this method produces a seamless texture.
Parameters:
src
sw
sh
dest
Graphics
context.
x
y
w
h
public static void texture(Image src, int sw, int sh, Graphics dest, int ox, int oy, int x, int y, int w, int h)All the
texture()
methods call this one method.
texture()
tiles the source image onto the target surface with tiles of the specified size, repeating the image over and over to fill in the specified rectangle. Values less or equal to zero for the tile size result in that dimension of the image to remain unscaled (100%). This method uses the passed (ox,oy) origin to line up all the image blits so that overlapping or noncontiguous calls to this method produces a seamless texture.
Parameters:
src
sw
sh
dest
ox
oy
x
y
w
h
public static void texture(Image src, Graphics dest, int x, int y, int w, int h)This method tiles the source image onto the target surface at 100% scale, repeating the image over and over to fill in the specified rectangle (x,y,w,h). This method uses the (0,0) origin to line up all the image blits so that overlapping or non-contiguous calls to this method produces a seamless texture.
Parameters:
src
dest
x
y
w
h
public static void texture(Image src, Graphics dest, int ox, int oy, int x, int y, int w, int h)This method tiles the source image onto the target surface at 100% scale, repeating the image over and over to fill in the specified rectangle (x,y,w,h). This method uses the passed (ox,oy) origin to line up all the image blits so that overlapping or non-contiguous calls to this method will produce a seamless texture.
Parameters:
src
dest
ox
oy
x
y
w
h