System Shapes

Arc

Shape Arc(Number radius, Number from, Number to)

This will draw an arc of a circle. The angles go clockwise in degrees from the vertical ( 12 o'clock ).

radius - this is the radius of the circle from which the arc is taken.

from - this is the angle at which the arc starts.

to - this is the angle at which the arc ends after continuing clockwise.

Circle

Shape Circle(Number radius, EFillMode fill = Hollow)

This will draw a circle.

radius - this is the radius of the circle in pixels.

fill - this is the fill mode for the circle - see EFillMode for details.

Clear

Shape Clear(Colour colour)

This will clear the whole canvas to the specified colour.

colour - this is the colour to use. The current pen colour is ignored.

Dot

Shape Dot()

This will draw a single dot at the current origin using the current pen.

DrawImage

Shape DrawImage(Image image, EOverwrite overwrite = Direct)

This will draw a complete image onto the canvas. The location of the image will be determined by the current Origin value.

image - This is an image that has already been read in from a file or extracted from a canvas.

overwrite - This is the overwrite mode for pixels with an opacity of less that 100%.

Ellipse

Shape Ellipse(Number width, Number height, Number angle = 0, EFillMode fill = Hollow)

This will draw and ellipse. The width and height may be specified as well as the angle which the whole shape can be rotate.

width - this is the width in pixels of the ellipse before being rotated.

height - this is the height in pixels of the ellipse before being rotated.

angle - this is the angle in degrees through which the shape should be rotated clockwise.

fill - this is the style of filling - see EFillMode for details.

Frame

Shape Frame(Number count = 1)

This will not actually draw anything on the canvas. It will commit the current image to a video file - provided the output is set to a video file type. This routine is only available in the professional version.

count - this is the number of frames to generate with the image.

Line

Shape Line(Point from, Point to)

This will draw a straight line from one point to the another. The coordinates of both points are relative to the current origin.

from - this is the point at which the line starts.

to - this is the point at which the line ends.

LineTo

Shape LineTo(Point to)

This will draw a straight line from the current origin to another point.

to - this is the point at which the line ends. The coordinate is relative to the current origin.

Pixel

Shape Pixel(Colour colour)

This will set one pixel to the colour in the parameter ( as opposed to the current pen colour ). If the canvas is a pattern then the pixel is marked as 'pen'. The coordinate of the target pixel is the current origin.

colour - the colour to set the pixel.

Polygon

Shape Polygon(Const Ref PointArray points, GRFillMode fill = Hollow)

This will draw a series of lines stating it the first point, visiting each of the other points in turn and ending back at the first point.

points - This as an array of points, using the system defined PointArray type.

fill - this is the style of filling - see EFillMode for details.

Polyline

Shape Polyline(Const Ref PointArray points)

This will draw a series of lines stating it the first point, visiting each of the intermediate points in turn and ending on the final point.

points - This as an array of points, using the system defined PointArray type.

Rectangle

Shape Rectangle(Number width, Number height, GRFillMode fill = Hollow)

This will draw a simple rectangle.

width - This as the width of the rectangle. If the width is negative then the rectangle will be draw to the left of the origin.

height - This as the height of the rectangle. If the height is negative then the rectangle will be draw to above the origin.

fill - this is the style of filling - see EFillMode for details.

Sector

Shape Sector(Number radius, Number from, Number to, GRFillMode fill = Hollow)

This will draw a wedge shaped sector of a circle. The angles go clockwise in degrees from the vertical ( 12 o'clock ).

radius - this is the radius of the circle from which the wedge is taken.

from - this is the angle at which the sector starts.

to - this is the angle at which the sector ends after continuing clockwise.

fill - this is the style of filling - see EFillMode for details.

SetSize

Shape SetSize(Number width, Number height)

This will reset the size of the current canvas. If a dimension is reduced some of the image will be lost. If a dimension is increased the extra will be fill with the last Clear() colour.

width - this is new width in pixels for the canvas.

height - this is new height in pixels for the canvas.

Note: when resizing a video the dimensions will be rounded up to the nearest multiple of 4.

TextBlock

Shape TextBlock(Text text, Number width = 0, EHorizAlign halign = Left, EVertAlign valign = Top)

This will draw a block of text, limited to the stated width. If the text is too long for the stated width the lines will wrap. The text is rendered using the current graphics context font.

text - this is the text to write.

width - this is the width of the block. If the values is zero then there will be no line wrapping.

halign - this controls the horizontal alignment of the text - see EHorizAlign for details.

valign - this controls the vertical alignment of the text - see EVertAlign for details.

TextColumn

Shape TextColumn(Text text, Number angle = 0, EHorizAlign halign = Centre, EVertAlign valign = Centre)

This will write a column of text, each character beneath the previous and aligned to the origin before being rotated.

text - this is the text to write.

angle - this is the angle in degrees clockwise relative to the vertical through which the text should be rotated.

halign - this controls the horizontal alignment of the text before rotation - see EHorizAlign for details.

valign - this controls the vertical alignment of the text before rotation - see EVertAlign for details.

TextRotate

Shape TextRotate(Text text, Number angle = 0, EHorizAlign halign = Left, EVertAlign valign = Top )

This will draw a single line of text rotated at an angle. The text will be aligned relative to the origin before being rotated.

text - this is the text to write.

angle - this is the angle in degrees clockwise reltive to the horizontal through which the text should be rotated.

halign - this controls the horizontal alignment of the text before rotation - see EHorizAlign for details.

valign - this controls the vertical alignment of the text before rotation - see EVertAlign for details.