Creates a DAImage object 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 power.
The extent of the generated image is [-0.5,-0.5] to [0.5,0.5]. These dimensions are always in meters, even if the PixelLibrary is selected. To convert from pixels to meters, use the Pixel conversion factor.
lib.GradientHorizontalAnim(
start,
stop,
power
)
Returns the DAImage object.
Same as GradientHorizontalAnim except that power is a non-animated number.
lib.GradientHorizontal(
start,
stop,
power
)
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.
lib.GradientPolygon(
pts,
colors
)
Returns the DAImage object.
Creates a DAImage object 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).
lib.GradientSquare(
lowerLeft,
upperLeft,
upperRight,
lowerRight
)
Returns the DAImage 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.
lib.HatchBackwardDiagonalAnim(
color,
size
)
Returns the DAImage object.
Same as HatchBackwardDiagonal except that size is a non-animated number.
lib.HatchBackwardDiagonal(
color,
size
)
Creates cross-hatched markings. This function can be thought of as a combination of the HatchVerticalAnim and the HatchHorizontalAnim functions. 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.
lib.HatchCrossAnim(
color,
size
)
Returns the DAImage object.
Same as HatchCrossAnim except that size is a non-animated number (a double).
lib.HatchCross(
color,
size
)
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.
lib.HatchDiagonalCrossAnim(
color,
size
)
Returns the DAImage object.
Same as HatchDiagonalCrossAnim except that size is a non-animated number (a double).
lib.HatchDiagonalCross(
color,
size
)
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.
lib.HatchForwardDiagonalAnim(
color,
size
)
Returns the DAImage object.
Same as HatchForwardDiagonalAnim except that size is a non-animated number (a double).
lib.HatchForwardDiagonal(
color,
size
)
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.
lib.HatchHorizontalAnim(
color,
size
)
Returns the DAImage object.
Same as HatchHorizontalAnim except that size is a non-animated number (a double).
lib.HatchHorizontal(
color,
size
)
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.
lib.HatchVerticalAnim(
color,
size
)
Returns the DAImage object.
Same as HatchVerticalAnim except that size is a non-animated number (a double).
lib.HatchVertical(
color,
size
)
Creates a DAImage 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 = lib.mul(lib.DANumber(W/2), lib.Pixel) halfHeightMeters = lib.mul(lib.DANumber(H/2), lib.Pixel)
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 function, ImportImageAsync.
lib.ImportImage(
url
)
Returns the DAImage object.
The file formats that can be imported are .PNG, .JPG, .BMP, and .GIF.
Asynchronously imports 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 = lib.mul(lib.DANumber(W/2), lib.Pixel) halfHeightMeters = lib.mul(lib.DANumber(H/2), lib.Pixel)
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 function, see ImportImage.
lib.ImportImageAsync(
url,
imgStandIn
)
Returns the DAImportationResult object, which has the following relevant properties:
Allows a particular color in the asynchronously imported image, specified by an RGB value, to be treated as transparent.
lib.ImportImageAsyncColorKey(
url,
imgStandIn,
red,
green,
blue
)
Returns the DAImportationResult object.
Allows a particular color in the synchronously imported image, specified by an RGB value, to be treated as transparent.
lib.ImportImageColorKey(
url,
red,
green,
blue
)
Returns the DAImage object.
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 ImportMovieAsync for a description of the asynchronous import function.
The image portion of a movie has the same bounding box and placement as a static image such as a GIF or PNG. For more information, see ImportImage.
lib.ImportMovie(
url
)
Returns the DAImportationResult object, which has the following relevant properties:
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 function, see ImportMovie.
The image portion of a movie has the same bounding box and placement as a static image such as a GIF or PNG. For more information, see ImportImage.
lib.ImportMovieAsync(
url,
imgStandIn,
sndStandIn
)
Returns the DAImportationResult object, which has the following relevant properties:
Creates a DAImage object by laying the image 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.
lib.Overlay(
i1,
i2
)
Returns the DAImage object.
Creates a DAImage object by layering the DAImage objects. The bounding box of a set of overlaid images is simply the union of the bounding boxes of the images themselves.
lib.OverlayArray(
im
)
Returns the DAImage object.
Creates a DAImage object 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 power 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.
lib.RadialGradientPolygonAnim(
inner,
outer,
points,
power
)
Returns the DAImage object.
Same as RadialGradientPolygonAnim except that power must be an animated number.
lib.RadialGradientPolygon(
inner,
outer,
points,
power
)
Creates a DAImage object that is a regular, gradient polygon with the specified number of sides (there must be at least 3) and a radial fill. It has a unit width and height, centered at the origin, with an extent from (-0.5, -0.5) to (0.5, 0.5). (These dimensions are always in meters, even if the PixelLibrary is selected. To convert from pixels to meters, use the Pixel conversion factor.) The image contains the specified colors at the origin and the exterior points, respectively. The gradient fill is determined by the power 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.
Creates a DAImage object 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 power.
lib.RadialGradientRegularPolyAnim(
inner,
outer,
edges,
power
)
Returns the DAImage object.
Same as RadialGradientRegularPolyAnim except that power is a non-animated number (a double).
lib.RadialGradientRegularPoly(
inner,
outer,
edges,
power
)
Creates a DAImage object 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]. (These dimensions are always in meters, even if the PixelLibrary is selected. To convert from pixels to meters, use the Pixel conversion factor.) The image contains the specified colors in the center and at the corners, respectively. The gradient fill is determined by the power 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].
Creates a DAImage object 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 power.
lib.RadialGradientSquareAnim(
inner,
outer,
power
)
Returns the DAImage object.
Same as RadialGradientSquareAnim except that power is a non-animated number (a double).
lib.RadialGradientSquare(
inner,
outer,
power
)
Creates a DAImage object 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.
lib.SolidColorImage(
col
)
Returns the DAImage object.
Constructs a DAImage object from a DAString object and a DAFontStyle object. Because both parameters are (potentially) animated, they can vary over time.
lib.StringImageAnim(
string,
font
)
Returns the DAImage object.
Same as StringImageAnim except that string is a string.
lib.StringImage(
string,
font
)
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.