ImageSweep

(Engine-Level Function)

Description: Reads an existing image handle and returns another one containing an image created from that handle by tiling the image a given number of times along an arc-shaped path.
Returns: Image handle or Invalid on failure
Usage: Script or steady state.
Function Groups: Graphics
Related to: Crop | GUIBitmap | GUIButton | ImageArray | MakeBitmap | ModifyBitmap
Format: ImageSweep(Handle, Count,  Radius,  StartAngle,  EndAngle[, CropLeft, CropTop, CropWidth, CropHeight])
Parameters:  
Handle   
Required. The image handle to copy and modify.
Count   
Required. Any numeric expression for the number of tiles to draw.
Radius   
Required. Any numeric expression for the natural radius of the short axis of the ellipse, used to determine scaling.
StartAngle   
Required. Any numeric expression for the angle at which the first tile is to be drawn. The range -180 to 180. The start point is the vertical axis. Angles are positive, counter-clockwise..
EndAngle   
Required. Any numeric expression for the angle at which the last tile is to be drawn. Range -180 to 180, start point is the vertical axis, angles are positive counter-clockwise..
CropLeft
Optional. Left coordinate of the cropping region.
This and the following three parameters must all be specified if any are specified. Together, they apply a clipping rectangle that will be applied to the tiled image after tiling occurs.
CropTop
Optional. Top coordinate of the cropping region.
CropWidth
Optional. Width of the cropping region.
CropHeight
Optional. Height of the cropping region.
Comments:

The result is a radial array of tiles. Drawing angles intersect the center of the tiles. The path is based upon the size and shape of an ellipse traced out using the bounding box of the drawing transform. Scaling is based upon a comparison of the described radius and the final size of the transform on the screen. In the case of an ellipse the radius is assumed to be the smallest elliptical radius. Returns Invalid upon failure

The cropping parameters work in contrast to the Clip function, which applies a clipping region to the image before tiling occurs.

Example:

[ { Variable declarations ...}
  Image;
  Swept;
  MidX = 200;
  MidY = 200;
  Radius = 20;
]
Init [
  If 1 Main;
  [
    Image = MakeBitmap("C:\VTScada\VTS\Bitmaps\Arrows\Half rounded.wmf.png");
  ]
]
Main [
  Swept = ImageSweep(Image,3,100, 0, 120);
    GUIBitmap(0, 1, 1, 0,
            1 - (MidX - Radius),
            MidY + Radius,
            MidX + Radius,
            1 - (MidY - Radius), 1,
            0, 0, 0, 0,
            0, 0, 0,
            Swept);
  Return(Self);
]