9.1.23 UTS60 Graphics Commands

A

move absolute

O

circle

B

move relative

P

pixel array

C

polyline absolute

PE

polygon edge style

CJ

character justification

PH

hatch style

CP

character path

PI

polygon fill style

CS

character space

PM

polygon move absolute

CP

character path

PI

polygon fill style

CS

character space

PM

polygon move absolute

CZ

character size

PN

polygon move relative

D

polyline relative

PS

stop polygon move

E

polymarker

S

marker symbol

F

polymarker

SI

marker color

G

polygon absolute

SZ

marker size

H

polygon relative

'text'

text

I

rectangle absolute

US

unshrink

J

rectangle relative

UZ

unzoom

K

sector

VA

zoom absolute

L

closed arc

VR

zoom relative

LB

background color

XS

shrink

LF

fill color

ZC

terminate view surface

LL

line color

ZD

deselect view surface

LS

line style

ZI

initialize graphics

LT

text color

ZN

new frame

M

arc

ZO

initialize view surface

NM

push animation marker

ZS

select view surface

NN

pop animation marker

ZT

terminate graphics

UTS 60 Coordinate System

Graphics coordinates are represented by Normalized Device Coordinates (NDC). NDC are device independent; that is, a drawing defined by NDC can be displayed on any size screen without changing the graphics commands.

Windows Coordinate System

When mapping the UTS 60 coordinate system to a Windows coordinate system, you can configure the window one of two ways:

  • Select the display aspect ratio to 1:1 by selecting Isotropic Mapping Mode in the Picture Preferences dialog box. The x and y extents are both 32767 and the visible portion of the y axis depends on the window size.

  • Adjust the display aspect ratio to the window size by making sure the Isotropic Mapping Mode check box is not selected. Figures will be proportionately sized to fit the window. The x axis is 32767, and the y axis is set to display the 73% visible portion on an actual UTS 60 terminal.

________________________________________

A move absolute

  • Moves the current position directly to the position specified by the x,y coordinates, expressing the new current position in the UTS 60 NDC system.
  • Syntax: A x,y
  • Operands: Unsigned integers

________________________________________

B move relative

  • Moves the current position to a position relative to its current position by the x,y coordinates.
  • Syntax: B x,y
  • Operands: Signed integers that when added to the current position equal the new current position.

________________________________________

C polyline absolute

  • Draws a succession of lines from the CPos to absolute coordinates xn,yn. Updates the CPos to each xn,yn in turn.
  • Syntax: C x1,y1[,x2,y2,...,xn,yn]
  • Operands: Unsigned integers in ordered pairs within the Normalized Device Coordinate system that run from x1,y1 to xn,yn.

________________________________________

CJ character justification

  • Sets the attribute which specifies where a text string is located with respect to the CPos. Remains in effect until the same command is repeated.
  • Syntax:CJ x,y
  • Operands: Two required operands that determine the horizontal and vertical positions
  • Default: 0,1 (left, bottom)

Operand Value

Horizontal

Vertical

0

Left

Top

1

Right

Bottom

2

Center

Center

3

Left

Bottom

CP character path

  • Sets the attribute used to determine the writing direction when creating a sequence of text characters. Remains in effect until the same command is repeated. If the selected font supports character rotation, the characters will be rotated appropriately for vertical text display.
  • Syntax: CP x,y
  • Operands: Unsigned integer
  • Default: 0 (right)

Operand Value

Horizontal

0

Right

1

Left

2

Up

3

Down

CS character space

  • Spaces the text characters an additional x virtual device coordinate units apart.
  • Syntax: CS x

________________________________________

CZ character size

  • Sets the attribute that determines the character size (and height-to-width relationship, or aspect ratio) of a character displayed using the text command. Remains in effect until the same command is repeated.
  • Syntax: CZ x,y
  • Operands: Two operands, for character width (x) and height (y), expressed as NDC. The minimum width and height is configurable.
  • Default: 400,600

________________________________________

D polyline relative

  • Draws a succession of lines from the CPos to relative coordinates xn,yn. Updates the CPos to each xn,yn in turn.
  • Syntax: D x1,y1[,x2,y2,...,xn,yn]
  • Operands: Signed integers that are ordered pairs within the Normalized Device Coordinate system. Each point is obtained by adding the x and y differences between current and succeeding points to the current point.

________________________________________

E polymarker absolute

  • Draws marker symbols defined by the current setting of the Marker Symbol attribute command at a sequence of positions expressed in the operand.
  • Syntax: E x1,y1[,x2,y2,...,xn,yn]
  • Operands: Unsigned integers that are ordered pairs within the Normalized Device Coordinate system. The marker symbol is centered at each coordinate position specified. The CPos is updated to each xn,yn.________________________________________F polymarker relativeDraws marker symbols defined by the current setting of the Marker Symbol attribute command at a sequence of positions expressed in the operand.Syntax: F x1,y1[,x2,y2,...,xn,yn]Operands: Signed integer that are ordered pairs. The marker display position is obtained by adding the operand ordered pair to the current position. The CPos is updated as each new point is determined.________________________________________G polygon absoluteDescribes a polygon using a series of x,y coordinates representing the vertices of the polygon. The polygon is drawn from the CPos to the first vertex specified by the operand x1,y1, joins all other vertices in order (to xn,yn), and returns to close the polygon. The coordinates of the vertices are expressed in the operand.Syntax: G x1,y1[,x2,y2,...,xn,yn]Operands: Unsigned integers that are the x,y pairs expressed in NDC.

________________________________________

H polygon relative

  • Describes a polygon using a series of x,y coordinates representing the vertices of the polygon. The polygon is drawn from the CPos to the first vertex specified by the operand x1,y1, joins all other vertices in order (to xn,yn), then returns to close the polygon.
  • Syntax: H x1,y1[,x2,y2,...,xn,yn]
  • Operands: Signed integers. The operands are obtained by adding the x and y differences between current and succeeding points to the current position.

________________________________________

I rectangle absolute

  • Describes a rectangle which has as its diagonal vertices the CPos and x,y specified in the operand. The boundary lines of the rectangle are parallel to the corresponding x axis and y axis.
  • Syntax: I x,y
  • Operands: Unsigned integers, that are the x,y coordinates of the vertex expressed in NDC.

________________________________________

J rectangle relative

  • Describes a rectangle which has as its diagonal vertices the CPos and x,y, specified in the operand. The boundary lines of the rectangle are parallel to the corresponding x axis and y axis.
  • Syntax: J x,y
  • Operands: Signed integers that are NDC values added to the value of the CPos.

________________________________________

K sector

  • Describes a pie-shaped figure with its center of curvature at the CPos and an arc with a radius (r) drawn counter-clockwise, starting at start angle (sa) and ending at end angle (ea) as defined in the operand. Line segments are then drawn from the center point to sa and from the center point to ea. The CPos is unchanged after this command.
  • Syntax: K r,sa,ea

Operand

Description

r

Unsigned integer that is an absolute value within the Normalized Device Coordinate system

sa

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis.

ea

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis

L closed arc

  • Describes an arc with its center at the CPos. The arc is drawn counterclockwise, starting at sa and ending at ea, with radius r. The end points of the arc are then connected by a chord, to create a closed figure.
  • Syntax: L r,sa,ea

Operand

Description

r

Unsigned integer that is an absolute value within the Normalized Device Coordinate system

sa

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis.

ea

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis

LB background color

  • Sets the index controlling the screen background color. No action is taken immediately. Commands that alter the background, such as New Frame and certain hatched polygons, use this index to draw the background color.
  • Syntax:LB x
  • Default: 0 (black)

Operand Value

Color

0

Black

1

Red

2

Green

3

Yellow

4

Blue

5

Magenta

6

Cyan

7

White

8

Gray

9

Tan

10

Aqua

11

Yellow-green

12

Violet

13

Hot Pink

14

Turquoise

15

Pink

LF fill color

  • Sets the attribute which selects the color to fill the interior of a polygon, circle, rectangle or sector. Remains in effect until the same command is repeated.
  • Syntax: LF x

Operand Value

Color

0

Black

1

Red

2

Green

3

Yellow

4

Blue

5

Magenta

6

Cyan

7

White

8

Gray

9

Tan

10

Aqua

11

Yellow-green

12

Violet

13

Hot Pink

14

Turquoise

15

Pink

LL line color

  • Sets the attribute used to select the color when creating a line. Remains in effect until the same command is repeated.
  • Syntax: LL x
  • Default: 7 (white)

Operand Value

Color

0

Black

1

Red

2

Green

3

Yellow

4

Blue

5

Magenta

6

Cyan

7

White

8

Gray

9

Tan

10

Aqua

11

Yellow-green

12

Violet

13

Hot Pink

14

Turquoise

15

Pink

LS line style

  • Specifies the style of a visible line. If Enable Edge Styles is selected in the Picture Preferences dialog box, polygon edges will be drawn in a similar style selected with this command.
  • Syntax:LS x
  • Operands: Unsigned integer from 1 through 12 as described below
  • Default: 7 (white)

Operand Value

Description

1

Solid line

2

Short dash line

3

Dotted line

4

Dash-dot line

5

Very short dash line

6

Medium dash line

7

Long dash line

8

Dash and two dots line

9

Widely-spaced dotted line

10

Medium-short dash

11

Closely-spaced fine dot

12

Medium-spaced dot

LT text color

  • Sets the attribute which selects the color used when creating the visible image of a character. Remains in effect until the same command is repeated.
  • Syntax: LT x
  • Default: 7 (white)

Operand Value

Color

0

Black

1

Red

2

Green

3

Yellow

4

Blue

5

Magenta

6

Cyan

7

White

8

Gray

9

Tan

10

Aqua

11

Yellow-green

12

Violet

13

Hot Pink

14

Turquoise

15

Pink

M arc

  • Describes an arc with its center at the CPos. The arc is drawn counter-clockwise, starting at sa and ending at ea, with radius r. The CPos is unchanged after this command.
  • Syntax: L r,sa,ea

Operand

Description

r

Unsigned integer that is an absolute value within the Normalized Device Coordinate system

sa

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis.

ea

Numbers between 32768o and 32767o, modulus 360. The angle, 0o lies parallel to the positive x axis of a Cartesian coordinate system; 90o lies parallel to the positive y axis.

NM push animation marker

  • You must use animation markers for animated (i.e. non-static) drawings which have a fixed background. The NM command is issued after the commands creating the fixed background are issued but before the commands creating the moving portion. This is an extended command that does not appear in previous implementations of UTS 60 Graphics. It is always used in conjunction with the NN command.
  • Syntax: NM
  • Operands: None

________________________________________

NN pop animation marker

  • You must use animation markers for animated (i.e. non-static) drawings which have a fixed background. The NN command is issued after the commands erasing the animated portion of a picture, when it looks as it did when the NM command was issued. It pops the refresh display list back to the last NM marker. This is an extended command that does not appear in previous implementations of UTS 60 Graphics. It is always used in conjunction with the NM command. Commands issued after the NM command are not placed in the repaint buffer until the occurrence of an NN command.
  • Syntax:NN
  • Operands: None

________________________________________

O circle

  • Describes a circle with its center at the CPos and radius r defined by the operand. The CPos is left unchanged by this command.
  • Syntax: O r
  • Operands: Unsigned integer in NDC that expresses the radius of the circle

________________________________________

PA pixel array

  • Allows the programmer to customize the Polygon Fill Style attribute (fill pattern). The pixel array consists of up to 16 operands (unsigned integers; range: 065535). Each operand is 16 bits wide.If you use the PI2 or PI3 command (Polygon Fill Style) to fill polygons, the 16 operands create a 16 x 16 pattern. Microsoft Windows supports only an 8 x 8 fill pattern. To keep GraphX for Windows compatible with other UTS 60 emulators, only every other operand and every other bit is used to produce the fill pattern.
  • Syntax:PA x1[xn...x16]
  • Operands: Each operand represents a 16-bit pattern, with the most significant set bit representing the leftmost set pixel.

________________________________________

PE polygon edge style

  • Sets the attribute that controls whether or not a polygon, sector, circle or closed arc will have a border line. The line is drawn in the color set by the LL (Line Color) command.
  • Syntax: PE x

Operand Value

Description

1

Causes the edge line to NOT be displayed

2

Causes the edge line to be displayed

PH hatch style

  • Defines the pattern used to overlay the current image interior.
  • Syntax: PH x
  • Operands: Unsigned integer from 0 through 19

Operand Value

Description

Example

0

Solid

 

1

Slanted lines

 

2

Slanted lines

 

3

Vertical lines

||||||||||||||||||||||||

4

Horizontal lines

 

5

Vertical crosshatch

 

6

Slanted crosshatch

 

7 - 12

Same as 1-6 except coarse

-----

12 - 18

Same as 1-6 except fine

-----

19

Shaded

 

PI polygon fill style

  • Sets the attribute which controls the type of fill used for a polygon, rectangle, sector and circle.
  • Syntax: PI x
  • Operands: Unsigned integers

Operand Value

Description

0

Transparent (preserves existing images)

1

Solid (fills the polygon with the current Fill Color index )

2

Pattern (the pattern defined by Set Pixel Array is overlaid on the existing image, in the current Fill Color index )

3

Pattern, new background (the pattern defined by Set Pixel Array is drawn over a new, solid background in the current Background Color.)

4

Hatch (the pattern defined by Hatch Style is drawn in the current Fill Color index over the existing image)

5

Hatch, new background (the pattern defined by Hatch Style is drawn in the current Fill Color index over a new, solid background in the current Background Color.)

PM polygon move absolute

  • Moves a polygon to a new absolute starting point. This command remains in effect until a Stop Polygon Move command is encountered.
  • Syntax: PM x,y
  • Operands: Unsigned integers that are the x,y coordinates of the new starting point expressed in NDC.

________________________________________

PN polygon move relative

  • Moves a polygon to a new starting point relative to the CPos position. This command remains in effect until a Stop Polygon Move command is encountered.
  • Syntax: PM x,y
  • Operands: Signed integers that are NDC values expressed as which are added to the value of the CPos.

________________________________________

PS stop polygon move

  • Stops the movement of polygons.
  • Syntax: PS
  • Operands: None

________________________________________

S marker symbol

  • Defines the visible image displayed in the Polymarker Absolute and Polymarker Relative commands.
  • Syntax: S x
  • Operands: Unsigned integers from 1 through 13

Operand Value

Description

Example

1

Dot

 

2

Cross

 

3

Asterisk

*

4

Circle

 

5

Large X

 

6

Small box

 

7

Medium box

8

Large box

 

9

Registered symbol

 

10

4 symmetrically opposed parabola

 

11

Right-facing arrow, point on CP

 

12

Cross-hairs

 

13

Configurable marker

ASCII character

SI marker color

  • Sets the attribute used to select the color of a marker. Remains in effect until the same command is repeated.
  • Syntax: SI x
  • Default: 7 (white)

Operand Value

Color

0

Black

1

Red

2

Green

3

Yellow

4

Blue

5

Magenta

6

Cyan

7

White

8

Gray

9

Tan

10

Aqua

11

Yellow-green

12

Violet

13

Hot Pink

14

Turquoise

15

Pink

SZ marker size

  • Sets the attribute that determines the size (and height-to-width relationship) of a marker. Remains in effect until the same command is repeated.
  • Syntax: SZ x,y
  • Operands: expressed as NDC, an operand for character width must be entered first, followed by an operand for character height
  • Default: 500,500

________________________________________

'text' text

  • A string of text (alphanumeric characters) begins and ends with apostrophes and is drawn within the Normalized Device Coordinate system. Placement and appearance of the string is determined by the CPos and the current values of the applicable attribute commands. The CPos is left unchanged by this command.
  • Syntax: Text within apostrophes
  • Operands: One operand is required for each text character. Each operand is an ASCII value ranging from hexadecimal 20 to 7E. An apostrophe can be included in the text by entering two consecutive apostrophes.

________________________________________

US unshrink

  • Cancels the Shrink command.
  • Syntax: US
  • Operands: None

________________________________________

UZ unzoom

  • Cancels the Zoom Absolute and Zoom Relative commands.
  • Syntax: UZ
  • Operands: None

________________________________________

VA zoom absolute

  • Enlarges the area defined by the CPos and the x,y coordinates to fill the entire screen. The boundary lines of the zoom area are parallel to the corresponding x axis and y axis. This command affects all subsequent commands until an Unzoom command is encountered.
  • Syntax: VA x,y
  • Operands: unsigned integers in NDC

________________________________________

VR zoom relative

  • Enlarges the area defined by the CPos and the x,y coordinates to fill the entire screen. The boundary lines of the zoom area are parallel to the corresponding x axis and y axis. This command affects all subsequent commands until an Unzoom command is encountered.
  • Syntax: VR x,yOperands: Signed integers in NDC which are added to the value of the CPos.

________________________________________

XS shrink

  • Reduces the entire screen area to the dimensions defined by the CPos and x,y coordinates. The boundary lines of the shrink area are parallel to the corresponding x axis and y axis. This command affects all subsequent commands until an Unshrink command is encountered.
  • Syntax: XS x,y
  • Operands: Unsigned integers in NDC that are the x,y coordinates of the vertex

________________________________________

ZC terminate view surface

  • Terminates access to the view surface specified in the operand. The view surface is no longer initialized and can no longer be selected.
  • Syntax: ZC x
  • Operands: Unsigned integers representing the two view surfaces: 1 (graphics screen) or 2 (print device)

________________________________________

ZD deselect view surface

  • Deselects the view surface represented by the operand. Subsequent graphics commands will not be displayed on this view surface. This command does not affect the current view surface image.
  • Syntax: ZD x
  • Operands: Unsigned integers representing the two view surfaces: 1 (graphics screen) or 2 (print device)

________________________________________

ZI initialize graphics

  • Initializes the GraphX accessory and enables it to receive and process graphics commands. All graphics commands are set to their default values. All commands that precede this command are ignored.
  • Syntax: ZI
  • Operands: None

________________________________________

ZN new frame

  • Clears all view surfaces. If the UTS Graphics screen is selected, it is set to the current color specified by the Background Color attribute command. All attribute commands from the previous frame remain in effect.
  • Syntax: ZN
  • Operands: None

________________________________________

ZO initialize view surface

  • Initializes the designated view surface and prepares it for graphical output. This command must precede the Select View Surface command in order to send the image to the printer or plotter. Both the graphics screen and print device view surfaces may be initialized at the same time.
  • Syntax: ZO x,y
  • Operands: Unsigned integers representing the two view surfaces: 1 (graphics screen) or 2 (print device)

________________________________________

ZS select view surface

  • Specifies the designated view surface on which images will appear. Before a view surface can be selected, it must be initialized with the Initialize View Surface command. A view surface must be selected before a New Frame command may be used.
  • Syntax: ZS x,y
  • Operands: Unsigned integers representing the two view surfaces: 1 (graphics screen) or 2 (print device)

________________________________________

ZT terminate graphics

  • Disables the graphics string interpreter. All graphics string commands are ignored until the next Initialize Graphics command appears in the string. All view surfaces become inactive and deselected.
  • Syntax: ZT
  • Operands: None