• Keine Ergebnisse gefunden

Alphatext Attributes

Im Dokument 4110 SERIES HOST PROGRAMMERS (Seite 58-63)

6-4

• Stroke precision graphtext is generated (and stored in a segment) as a series of MOVEs and DRAWs.

• Multiple p~edefined stroke graphtext fonts are available.

• You can define your own stroke graphtext fonts.

CONCEPTS AND DEFINITIONS

Alphatext

In Alpha mode, with the dialog area disabled, the terminal interprets each printable ASCII character it receives as an implicit command to draw that character in the graphics area. This type of text display is called alphatext.

NOTE

Alphatext is similar to the text display used in the Tektronix 4010 Series terminals. 4110 series termi-nals interpret alphatext similar to the way that 4010 Series terminals interpret text.

Alphatext Attributes

Keyboard Option Attribute. Terminals with Option 4E have an APL font as well as the standard ASCII font (APL is not available on the 4115). You should select the font with the command SET-ALPHATEXT-FONT before using alphatext on these terminals. (Other Option 4 keyboards automatically select the font to match the keyboard; the Katakana key-board is controlled by SI/SO.)

DVST Alphatext Attributes. DVST alphatext attributes in-clude character size, character spacing, and line spacing.

You can set these attributes with the commands: SET-ALPHATEXT-SIZE, SET-4010-SET-ALPHATEXT-SIZE, and SET -ALPHATEXT -SIZE-GROU P.

Raster Alphatext Attributes. Raster display alphatext attributes include the text foreground index, the text back-ground index, and the graphics area writing mode. The graphics area writing mode determines whether characters either overstrike or replace the pixels under them. You can set these attributes with the commands: SET-TEXT-INDEX, SET-BACKGROUND-INDICES, and SET-GRAPHICS-AREA-WRITING-MODE.

4110 SERIES HOST

(

(

Graphtext

When alphatext is not suitable for your display, or you have the dialog area enabled, you can use graph text. To display graphtext, send the GRAPHIC-TEXT command followed by your text as the string parameter. (String precision

graphtext looks like alphatext, but is sent with the explicit GRAPHIC-TEXT command.)

Graphtext Precision

Graphtext has an attribute called precision which controls the type of graphtext. With the command

SET-GRAPHTEXT-PRECISION, you choose either string preci-sion (alphatext-like) or stroke precipreci-sion (generated by MOVEs and DRAWs) graphtext.

String Precision Graphtext

String precision graphtext uses the same attributes as alphatext. You cannot scale, slant, or rotate string precision graphtext.

Stroke Precision Graphtext

Stroke precision graphtext is generated one vector at a time. Stroke precision graphtext has the following attributes:

• Font - select with SET-GRAPHTEXT-FONT

• Text index - select with SET-TEXT-INDEX

• Size - select with SET-GRAPHTEXT-SIZE

• Slant - select with SET-GRAPHTEXT-SLANT

• Rotation - select with SET-GRAPHTEXT-ROTATION Graphtext Fonts. You can choose one of several predefined or user defined fonts. You will find a discussion on how to define graphtext fonts later in this section.

Graphtext Size, Slant and Rotation. When the terminal draws graphtext it first scales the text, then slants it and finally rotates it.

4110 SERIES HOST

GRAPHICS PRIMITIVES

DEFINING A GRAPHTEXT FONT

You can define your own fonts for stroke precision graphtext. The process of defining a font consists of initial-ization, opening a character definition, defining the charac-ter, closing the character definition, opening another character definition and so forth until the font is complete.

You need not define all the characters in a graphtext font;

those that you do not explicitly define use the default font.

To define a font with only one special symbol, you need to define only that symbol.

Initialization

You should first delete the font number that you intend to define. (The terminal gives a level 1 error for deleting a nonexistent font, but gives a level 2 error if you attempt to open a definition for a font that already exists.) To delete a font, use the command

DELETE-GRAPHTEXT-CHARACTER for character number -1 of that font.

To initialize the terminal for defining an graphtext font, you must then issue two commands: SET-GRAPHTEXT-FONT-GRID, and SET-PIVOT-POINT.

SET -GRAPHTEXT -FONT-GRID. This command opens the graphtext font definition, and sets up the graph text font grid.

The graph text font grid is a rectangle extending above and to the right of the pivot point. The graphtext font grid defines the character cell the terminal uses when drawing graphtext. You can use the graphtext font grid as a reference when you define your characters, but you need not draw the character within it.

SET-PIVOT-POINT. This command sets the origin (lower left corner of the graphtext font grid) for the graphtext character. The terminal saves all coordinates used when you define your graphtext characters as offsets from the pivot point. The pivot point is discussed further in Section 7, Segments.

6-5

GRAPHICS PRIMITIVES

Graphtext Character Definition

Open each character definition with the command BEGIN-GRAPHTEXT-CHARACTER. Use a sequence of MOVEs and DRAWs to draw the character. You can extend vectors beyond the bounds of the cell, such as descenders on lower case characters.

When your character is complete, give the command END-GRAPHTEXT-CHARACTER to close the character defini-tion.

To delete either a single character or an entire graphtext font, use the DELETE-GRAPHTEXT-CHARACTER com-mand.

HINTS

Eliminating Character Definition Display

When you are defining a character, it appears on the screen as you are defining it. If you want to eliminate this display, two methods are:

1. Define the character or font inside an invisible segment.

a. Set the segment visibility for segment -2 to invisible.

b. Open a segment definition.

c. Define the character or font.

d. Close the segment definition.

e. Delete the segment.

2. Position the cell and definition vectors outside the visible area. By keeping the y-coordinates of the pivot point and all definition vectors greater than 3200, the definition will remain off the screen.

Saving a Graphtext Font on Disk

If you want to save a graphtext font on disk:

1. Define an EOF string.

2. Send the command COPY HO: TO font-filename.

3. Define the font normally.

4. Send the EOF string.

5. Reset the EOF string to the empty string.

Once the disk file with the font has been created, you can load the font from the disk by issuing the LOAD command from your program.

6-6

PANELS

PREVIEW

• A panel is a graphics primitive.

• Panels are available on raster display terminals only.

• A panel is a closed figure bounded by one or more panel boundaries.

• You can fill panels with a solid color or pattern.

• You can key patterns to the panel, view, or screen.

• Panels can replace or overstrike other graphics on the screen.

• You can use the predefined patterns or define your own.

• The 4115 can draw and fill rectangles, a special type of panel, very quickly.

CONCEPTS AND DEFINITIONS Panels

(

A Panel is the set of pixels on a surface which lies inside a ( closed Panel Boundary. A panel definition is a series of

MOVEs and DRAWs which form a panel boundary. You de- . fine a panel by first opening the panel definition, then draw-ing the panel boundary, and finally closdraw-ing the panel definition. As soon as you close the panel definition, the terminal fills the panel with a solid color or pattern selected by the SET-PANEL-FILLING-MODE command.

The 4115 can also define and fill rectangles, a special case of panels. You specify rectangles by giving an array of pairs of xy coordinates as the parameters of the DRAW-RECTAN-GLE command. Each pair of coordinates defines a rectangu-lar panel.

4110 SERIES HOST

(

Panel Boundary

A Panel Boundary is the closed set of lines defined after the terminal receives the BEGIN-PANEL-BOUNDARY com-mand and before it receives the END-PANEL comcom-mand.

You need not completely close the panel boundary because the terminal closes the remaining gap when you close the panel definition. You must choose to draw or not draw the panel boundary when you issue the BEGIN-PANEL-BOUNDARY command.

GRAPHICS PRIMITIVES

A point or pixel on the picture plane is defined as inside a panel if an imaginary line drawn from that point to any point outside the terminal space crosses an odd number of panel boundaries. If the line crosses an even number of panel boundaries or no panel boundaries, the point is outside the panel. You can use multiple boundaries to define a panel, and you can create panels in any shape.

Figure 6-2 illustrates several panels with the inside of each panel filled with a pattern.

Figure 6-2. Inside of Panels Filled With a Pattern.

4110 SERIES HOST 6-7

GRAPHICS PRIMITIVES

Rectangle Boundaries

When you define rectangles on the 4115 with the DRAW-RECTANGLE command, the terminal supplies the vectors that define the panel boundary of a rectangle. Each pair of coordinates closes the previous rectangle definition and opens a new one. Overlapping rectangles appear as one on top of the other.

When you define a rectangle inside a panel definition, the DRAW-RECTANGLE command closes the current panel boundary before beginning the first rectangle boundary, but does not close the last rectangle boundary. As a result, overlapping rectangles have a different appearance when drawn outside a panel definition than when drawn inside a panel definition. Figure 6-3 shows rectangles drawn outside and inside a panel definition.

Panel Attributes

The panel attributes are:

• Overstrike/replace - set by SET-PANEL-FILLlNG-MODE

• Boundary cover - set by SET-PANEL-FILLING-MODE

• Pattern keying - set by SET-PANEL-FILLING-MODE

• Panel boundary visibility - set by BEGIN-PANEL-BOUNDARY

• Rectangle boundary visibility - set by SET-DRAW-BOUNDARY-MODE

• Panel fill-pattern - set by SELECT-FILL-PATTERN

I L

j I

I I

I I

I I

Figure 6-3. Rectangles Drawn Inside and Outside a Panel Definition.

6-8 4110 SERIES HOST

Section 7 SEGMENTS

INTRODUCTION

One of the most powerful features of the TEKTRONIX 4110 Series graphics terminals is the ability to define and use segments. This section explains what a segment is, some uses for segments, and how to define a segment. In this section you will find the following discussions:

Im Dokument 4110 SERIES HOST PROGRAMMERS (Seite 58-63)