Creates an image behavior that smoothly interpolates between the start and stop colors. Colors start on the left and go toward the right, based on the power specified by fallOff. The extent of the generated image is [-0.5,-0.5] to [0.5,0.5].
public static ImageBvr gradientHorizontal(
ColorBvr start,
ColorBvr stop,
NumberBvr fallOff
);
Returns the ImageBvr object.
Creates a polygon from an array of points and an array of colors. The polygon has a smooth interpolation between the colors at the vertices. This interpolation is in RGB space. The image is transparent and unpickable outside the polygon. The polygon must be convex and fanned, with at least 3 vertices. The tessellation into triangles occurs by fanning around the first vertex. If, for example, the first triangle is from vertices [0, 1, 2], the second is from [0, 2, 3], and so on. The tessellation determines how the color interpolation is done. The bounding box is the box surrounding the points of the polygon.
public static ImageBvr gradientPolygon(
Point2Bvr[] pts,
ColorBvr[] colors
);
Returns the ImageBvr object.
Creates an image behavior with a square color wash. The image is a unit-sized square, centered at the origin, reaching from [-0.5, -0.5] to [0.5, 0.5]. The image contains the specified colors in the specified corners. The gradient fills are determined by bilinearly interpolating between these specified colors. (This means that, rather than being simply a four-cornered polygon, it is a polygon with four corners plus a point in the middle that is the average of the four colors.) The image is transparent and unpickable outside of this region. The interpolation is in RGB space. The bounding box is a box from (-0.5, -0.5) to (0.5, 0.5).
public static ImageBvr gradientSquare(
ColorBvr lowerLeft,
ColorBvr upperLeft,
ColorBvr upperRight,
ColorBvr lowerRight
);
Returns the ImageBvr object.
Creates backward diagonal (lines that slant from right to left) hatch marks. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines. By default, hatch marks are black and appear on a transparent background.
public static ImageBvr hatchBackwardDiagonal(
ColorBvr color NumberBvr size
);
Returns the ImageBvr object.
Creates cross-hatched markings. This method can be thought of as a combination of the hatchVertical and the hatchHorizontal methods. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines. By default, hatch marks are black and appear on a transparent background.
public static ImageBvr hatchCross(
ColorBvr color,
NumberBvr size
);
Returns the ImageBvr object.
Creates diagonally criss-crossed hatch marks. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines. By default, hatch marks are black and appear on a transparent background.
public static ImageBvr hatchDiagonalCross(
ColorBvr color,
NumberBvr size
);
Returns the ImageBvr object.
Creates forward diagonal (lines that slant from left to right) hatch marks. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines.
public static ImageBvr hatchForwardDiagonal(
ColorBvr color,
NumberBvr size
);
Returns the ImageBvr object.
Creates horizontal hatch lines. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines. By default, hatch marks are black and appear on a transparent background.
public static ImageBvr hatchHorizontal(
ColorBvr color,
NumberBvr size
);
Returns the ImageBvr object.
Creates vertical hatch lines. All hatches fit in a box, of dimension size, that is infinitely tiled. For perpendicular hatches, the size of the box is twice the distance between the hatch lines. By default, hatch marks are black and appear on a transparent background.
public static ImageBvr hatchVertical(
ColorBvr color,
NumberBvr size
);
Returns the ImageBvr object.
Creates an image behavior by synchronously importing the given bitmap. The pixels of the bitmap are mapped to points in the image such that the center of the bitmap is placed at (0,0). The extent of the points affected depends on the width and height of the bitmap in pixels and the resolution of the bitmap in pixels per meter. The bounding box of an imported image is calculated as follows: If the pixel dimensions are WxH, and given that:
halfWidthMeters = Statics.pixel * W/2; halfHeightMeters = Statics.pixel * H/2;
then the bounding box will be (-halfWidthMeters, -halfHeightMeters) to (halfWidthMeters, halfHeightMeters) with the resultant image centered at the origin.
Synchronous loads are blocking calls, which means that ticking will not continue on any model until all synchronous downloads are completed. These downloads should be small and listed before asynchronous downloads. Use asynchronous downloads for more complex images and sounds. See below for a description of the asynchronous import method.
public static importImage(
URL url
);
Returns the ImageBvr object.
The file formats that can be imported are .PNG, .JPG, .BMP, and .GIF.
Creates an image behavior by asynchronously importing the given bitmap. The pixels of the bitmap are mapped to points in the image such that the center of the bitmap is placed at (0,0). The extent of the points affected depends on the width and height of the bitmap in pixels and the resolution of the bitmap in pixels per meter. The bounding box of an imported image is calculated as follows: If the pixel dimensions are WxH, and given that:
halfWidthMeters = Statics.pixel * W/2; halfHeightMeters = Statics.pixel * H/2;
then the bounding box will be (-halfWidthMeters, -halfHeightMeters) to (halfWidthMeters, halfHeightMeters) with the resultant image centered at the origin.
Asynchronous downloads should be listed after synchronous ones and used for more complex sounds and images. For a description of the synchronous import method, see above.
public static ImageBvr importImage(
URL url,
ImageBvr imgStandIn,
DXMEvent[] ev,
NumberBvr[] progress,
NumberBvr[] size
);
Returns the ImageBvr object.
The file formats that can be imported are .PNG, .JPG, .BMP, and .GIF.
Allows a particular color in the synchronously imported image, specified by an RGB value, to be treated as transparent.
public static ImageBvr importImageColorKey(
URL url,
ColorBvr red,
ColorBvr green,
ColorBvr blue
);
Returns the ImageBvr object.
The file formats that can be imported are .PNG, .JPG, .BMP, and .GIF.
Allows a particular color in the asynchronously imported image, specified by an RGB value, to be treated as transparent.
public static ImageBvr importImage(
URL url,
ImageBvr imgStandIn,
DXMEvent[] ev,
NumberBvr[] progress,
NumberBvr[] size,
ColorBvr red,
ColorBvr green,
ColorBvr blue
);
Returns the ImageBvr object.
The file formats that can be imported are .PNG, .JPG, .BMP, and .GIF.
Downloads a movie synchronously. Synchronous loads are blocking calls, which means that ticking will not continue on any model until all synchronous downloads are completed. These downloads should be small and listed before asynchronous downloads. Use asynchronous downloads for more complex images and sounds. See below for a description of the asynchronous import method.
The image portion of a movie has the same bounding box and placement as a static image such as a PNG or JPEG. For more information, seeimportImage.
public static NumberBvr importMovie(
URL url,
ImageBvr[] img,
SoundBvr[] snd
);
Returns the NumberBvr object that is the length of the movie in seconds.
Imports a movie asynchronously. Asynchronous downloads should be listed after synchronous ones and used for more complex sounds and images. For a description of the synchronous import method, see above.
The image portion of a movie has the same bounding box and placement as a static image such as a PNG or GIF. For more information, seeimportImage.
public static NumberBvr importMovie(
URL url,
ImageBvr[] img,
SoundBvr[] snd,
ImageBvr imgStandIn,
SoundBvr sndStandIn,
DXMEvent[] ev,
NumberBvr[] progress,
NumberBvr[] size
);
Returns the NumberBvr object that is the length of the movie in seconds.
Creates an image behavior by laying the image behavior i1 over the image behavior i2. The new image consists of all fully opaque points of i1, all points of i2 that are under fully transparent points in i1, and all partially opaque points of i1 modified such that the new point is a combination of the i1 point and the i2 point under it. The bounding box of a set of overlaid images is simply the union of the bounding boxes of the images themselves.
public static ImageBvr overlay(
ImageBvr i1,
ImageBvr i2
);
Returns the ImageBvr object.
Creates an image behavior by layering the ImageBvr objects. The bounding box of a set of overlaid images is simply the union of the bounding boxes of the images themselves.
public static ImageBvr overlayArray(
ImageBvr[] im
);
Returns the ImageBvr object.
Creates an image behavior that is a regular polygon with a radial fill. The image contains the specified colors at the origin and the exterior points, respectively. The gradient fill is determined by the fallOff argument and occurs in RGB space. Outside of the filled-in region, the image is transparent and unpickable. The bounding box is the box surrounding the points of the polygon.
public static ImageBvr radialGradientPolygon(
ColorBvr inner,
ColorBvr outer,
Point2Bvr[] points,
NumberBvr fallOff
);
Returns the ImageBvr object.
Creates an image behavior that is a regular, gradient polygon with the specified number of sides (there must be at least 3) and a radial fill. The image contains the specified colors at the origin and the exterior points, respectively. The gradient fill is determined by the fallOff argument and occurs in RGB space. Outside of the filled-in region, the image is transparent and unpickable. The bounding box is the box surrounding the points of the polygon.
public static ImageBvr radialGradientRegularPoly(
ColorBvr inner,
ColorBvr outer,
NumberBvr edges,
NumberBvr fallOff
);
Returns the ImageBvr object.
Creates an image behavior with a square radial fill. The image is a unit-sized square, centered at the origin, reaching from [-0.5, -0.5] to [0.5, 0.5]. The image contains the specified colors in the center and at the corners, respectively. The gradient fill is determined by the fallOff argument. The interpolation occurs in RGB space. Outside of the fill, the image is transparent and unpickable. The bounding box is a box from [-0.5, -0.5] to [0.5, 0.5].
public static ImageBvr radialGradientSquare(
ColorBvr inner,
ColorBvr outer,
NumberBvr fallOff
);
Returns the ImageBvr object.
Creates an image behavior and applies the given color behavior to all points in the image. The bounding box of a solid-color image is the infinite bounding box.
public static ImageBvr solidColorImage(
ColorBvr col
);
Returns the ImageBvr object.
Constructs an ImageBvr object from a StringBvr object and a FontStyleBvr object.
public static ImageBvr stringImage(
StringBvr string,
FontStyleBvr font
);
Returns the ImageBvr object.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.