Drawing, Script – IDEC High Performance Series User Manual

Page 1015

Advertising
background image

WindO/I-NV2 User’s Manual

20-51

5 Script Coding Examples

20

Script

Drawing

Script

Operation description
Draws a line connecting the start coordinates X=20, Y=20 and the end coordinates X=60, Y=60 on the screen where
the script is running. The line has a line width of 3 (3 pixels), line type of 1 (solid line), and line color of 20 (red).

Script

Operation description
Draws a line connecting the start coordinates X=0, Y=0 and the end coordinates X=150, Y=100 on the screen where
the script is running. The line width, line type, and line color have been omitted, so the line's line width is 1 (1 pixel),
the line type is 1 (solid line), and the line color is 255 (white).

Script

Operation description
Draws a rectangle with the start coordinates (the coordinates of the rectangle's upper-left corner) X=20, Y=20 and
the end coordinates (the coordinates of the rectangle's lower-right corner) X=100, Y=60 on the screen where the
script is running. The rectangle's line width is 1 (1 pixel), line type is 2 (dotted line), foreground color is 24 (green),
background color is 22 (yellow), pattern is 13 (tint), rounding type is 2 (curve), and rounding radius is 5 (5 pixels).

Script

Operation description
Draws a rectangle with the start coordinates (the coordinates of the rectangle's upper-left corner) X=0, Y=0 and the end
coordinates (the coordinates of the rectangle's lower-right corner) X=150, Y=100 on the screen where the script is
running. The line width, line type, foreground color, background color, pattern, rounding type, and rounding radius are
omitted, so the rectangle's line width is 1 (1 pixel), line type is 1 (solid line), foreground color and background color is
255 (white), pattern is 0 (none), rounding type is 0 (none), and rounding radius is 0 (0 pixels).

Script

Operation description
Draws a circle with the center coordinate X=100, Y=100, the X-axis radius 60 pixels, and the Y-axis radius 60 pixels.
The circle's line width is 1 (1 pixel), line type is 2 (dotted line), foreground color is 26 (light blue), background color is
0 (black), and pattern is 4 (foreground 50%).

Script

Operation description
Draws an ellipse with the center coordinate X=100, Y=100, the X-axis radius 80 pixels, and the Y-axis radius 40 pixels.
The line width, line type, foreground color, background color, and pattern are omitted, so the ellipse's line width is 1 (1
pixel), line type is 1 (solid line), foreground color and background color is 255 (white), and pattern is 0 (none).

Example 5.7.30 Draw a line

LINE(20, 20, 60, 60, 3, 1, 20);

Example 5.7.31 Draw a line (omitting arguments)

LINE(0, 0, 150, 100);

Example 5.7.32 Draw a rectangle

RECTANGLE(20, 20, 100, 60, 1, 2, 24, 22, 13, 2, 5);

Example 5.7.33 Draw a rectangle (omitting arguments)

RECTANGLE(0, 0, 150, 100);

Example 5.7.34 Draw a circle or ellipse

CIRCLE(100, 100, 60, 60, 1, 2, 26, 0, 4);

Example 5.7.35 Draw a circle or ellipse (omitting arguments)

CIRCLE(100, 100, 80, 40);

Advertising
This manual is related to the following products: