|
|
|
|
|
|
|
|
|
This determines the operation to be carried out on a shape. The
possible values are:
- "draw" (outline)
- "paint" (fills with current paint color)
- "both" (the default)
For example the following draws an outline of a rectangle, then
paints another rect within it and finally paints and outlines
another rectangle within that.
[VBScript]
mycanvas.DrawShape "rect", "Rect=20,20,180,180
Operation=draw"
mycanvas.DrawShape "rect", "Rect=40,40,160,160 Operation=paint"
mycanvas.DrawShape "rect", "Rect=60,60,140,140
Operation=both"
|
|
|
|
|
|
|
|
|
|
This consists of a list of points in a comma delimited list
(e.g. "10,12,14,16,18,20"). Each pair of values indicates another
point in the series. The points parameter is needed to allow shapes
like polygons and lines to be specified and for drawing curved text
on a path.
For example the following draws a rectangle.
[VBScript]
mycanvas.DrawShape "line",
"Points=20,20,80,20,80,80,20,80,20,20"
You can use floating point coordinates for precision
alignment.
[VBScript]
mycanvas.DrawText "Text on a path!",
"Points=20.1,20.6,80.5,80.2,20.6,20.9"
|
|
|
|
|
|
|
|
|
|
This is used to alter the spacing between characters when you
draw text on a line. The kerning is measured in thousandths of an
m-space. If the kerning is positive the distance is added between
each character to space the line out. If the kerning is negative
the space is subtracted to condense the line. An m-space is
typically the width of the widest character in the font.
For example the following draws a spaced out string of text.
[VBScript]
myPoints = "Points=20.1,20.6,80.5,80.2,20.6,20.9 "
mycanvas.DrawText "Wide Text", myPoints & "Kerning=900"
|
|
|
|
|
|
|
|
|
|
The offset is used for fine control over the vertical
positioning of text when drawing text on a line. The VAlign
parameter is used for basic alignment and then the offset is used
to shift the text up or down by a percentage of the font
height.
For example the following shifts the text down by 90% of its
height.
[VBScript]
myPoints = "Points=20.1,20.6,80.5,80.2,20.6,20.9 "
mycanvas.DrawText "Wide Text", myPoints & "Offset=-90"
|
|
|
|
|
|
|
|
|
|
This contains the width and height of the ovals used at the
corners of a round rectangle. The default is 16 for both.
For example the following draws a round rectangle with fairly
sharp corners.
[VBScript]
mycanvas.DrawShape "roundrect", "Rect=20,20,80,80
CornerSize=6,6"
|
|
|
|
|
|
|
|
|
|
OpenGL allows high quality anti-aliased, textured shapes to be
drawn. It only works on Canvases with a depth of 32. However if you
do not have a video card that supports OpenGL it can be very slow.
Additionally some 3D cards only offer partial support which means
that some operations may be slow.
By default OpenGL is disabled but by setting this parameter to
true you can enable it.
For example the following draws one oval without OpenGL and the
second using it.
[VBScript]
mycanvas.DrawShape "oval", "Rect=20,20,80,80"
mycanvas.DrawShape "oval", "Rect=120,120,180,180
OpenGL=true"
|
|
|
|
|
|
|
|
|
|
ImageGlue supports UTF-2 Unicode text to allow you to draw
Korean, Japanese and Chinese characters as well as Western ones.
However some environments may not support UTF-2 and may rely on
code pages. You can tell ImageGlue to interpret text in the context
of a particular code page using this parameter.
For example the following draws some text specified in the
Japanese Shift-JIS code page.
[VBScript]
mycanvas.DrawText "ƒjƒ…[ƒX", "codepage=932"
|
|
|
|