Chapter 21: Movie titles

Previous chapter          LLUs Home          Next chapter          Index
The Scrolled_title utility contains routines to produce movie and video titles with a minimum of effort. Titles can be fixed or scrolled. Options exist for fading in and fading out.

Table of Scrolled_title user entry points

There are six user entry points in this utility. This module organizes them by function.

Action routines

FTITLE
Generates fixed titles.

STITLE
Generates scrolled titles.

Parameter routines

SLGETI
Retrieves integer parameters.

SLGETR
Retrieves real parameters.

SLSETI
Sets integer parameters.

SLSETR
Sets real parameters.

Table of Scrolled_title parameters

You can set an arbitrary number of options through successive calls to any of the parameter-setting routines. A call to FTITLE or STITLE will then generate the desired titles.Please see the scrolled_title_params man page for more complete information on these parameters.

-------------------------------------------------------------------------------
Parameter  Fortran type  Brief description                       Default value   
-------------------------------------------------------------------------------
ALN        Integer       ALigNment frame output flag             0               
BGB        Real          BackGround color Blue component         Device default  
BGG        Real          BackGround color Green component        Device default  
BGR        Real          BackGround color Red component          Device default  
FGB        Real          ForeGround color Blue component         Device default  
FGG        Real          ForeGround color Green component        Device default  
FGR        Real          ForeGround color Bed component          Device default  
FIN        Real          Seconds to Fade IN the first title      0.              
FOU        Real          Seconds to Fade OUt the last title      0.              
GSZ        Real          Value for interline spacing (FTITLE)    40.             
ICO        Integer       Centering option (FTITLE)               1               
ICU        Integer       Unit number for reading input (FTITLE)  5               
INC        Integer       Vertical coordinate spacing                             
                         between practice frames (STITLE)        300             
LOG        Integer       Fortran LOGical unit number for WISS*   4               
LX1        Integer       Lower left X value of the viewport      0               
LX2        Integer       Upper right X value of the viewport     32767           
LY1        Integer       Lower left Y value of the viewport      0               
LY2        Integer       Upper right Y value of the viewport     32767           
MAP        Integer       Plotchar's parameter 'MA'                 100             
NXE        Integer       Ends scrolling in the X direction       512             
NXS        Integer       Starts scrolling in the X direction     512             
ORV        Real          Plotchar's parameter 'OR'                 1.E12           
PSZ        Real          Default character height (FTITLE)       21.             
SBK        Integer       Suppress BackGround color fade in/out   0               
SFG        Integer       Suppress ForeGround color fade in/out   0               
TM1        Real          Seconds of blank frames before any                      
                         title frames (FTITLE)                   1.              
TM2        Real          Seconds of blank frames between sets                    
                         of title frames (FTITLE)                0.5             
WID        Integer       Workstation IDentifier for WISS*        9               
-------------------------------------------------------------------------------
*WISS - Workstation Independent Segment Storage

Table of high-quality fonts available for titling

A number of high-quality filled fonts are available for use in the Scrolled_title utility. They are accessed by either name or number using the Plotchar parameter-setting routines PCSETC or PCSETI. The following table describes the type of fonts available and how they are accessed.

Parameter FN can be input as either an integer or a character string. The following table gives the values of FN for various high-quality fonts.

---------------------------
Integer ID  Character ID     
---------------------------
-21         helvetica        
-22         helvetica-bold   
-25         times-roman      
-26         times-bold       
-29         courier          
-30         courier-bold     
-33         greek            
-34         math-symbols     
-35         text-symbol      
-36         weather1         
-37         weather2         
---------------------------
Example: The following calls are equivalent.

      CALL PCSETI ('FN', -25)
      CALL PCSETC ('FN', 'times-roman')
The integer form of FN can be plus or minus. The character form of FN can be uppercase or lowercase, but not mixed.

By subtracting 100 from any font in this table, you can add outlines to the text which can be drawn in different colors than the filled interiors of the text. Refer to Chapter 11 "Drawing text and symbols" for details.

Generating high-quality titles

You can obtain high-quality fonts for films and videos using STITLE. The following title is an example of a Times-Roman font.

Code segment from stfont.f

1       NCARDS = 4
2       CARDS(1) = '  512  760    1  1.5Demonstration'
3       CARDS(2) = '  512  600    1  1.5Plot'
4       CARDS(3) = '  512  440    1  1.0for'
5       CARDS(4) = '  512  280    1  1.5STITLE'
6       CALL PCSETC('FN','times-roman')
7       NYST  = 512 
8       NYFIN = 512 
9       TST   = 0.0
10      TMV   = 0.0
11      TFIN  = 6.0
12      MOVIE =  1
13      CALL STITLE (CARDS,NCARDS,NYST,NYFIN,TST,TMV,TFIN,MOVIE)

Synopsis

      CALL STITLE (CARDS, NCARDS, NYST, NYFIN, TST, TMV, TFIN, MV)

Arguments

CARDS
Character array, Input---A CHARACTER*n array dimensioned for NCARDS. You must fill this array prior to calling STITLE, either by internal manipulations or by reading n-character "card images." Each element of the array CARDS contains the following:

COLUMNS 1-5
An integer, called MX, which is the X coordinate of this line of text on the scroll, or an indicator that this line of text is a continuation of the previous line. MX is the coordinate of the middle of the line if ICNTR is 1, and the coordinate of the left edge of the first character if ICNTR is 0. See columns 11 through 15 for ICNTR.

The scroll of text is 1024 units wide and any number of units high. MX = -9999 is the continuation card indicator. Multiple continuation cards may be used as long as the total number of characters in a continued line does not exceed 512. Trailing blanks are omitted from the last continuation card.

COLUMNS 6-10
An integer, called MY, which is the Y coordinate of this line of text on the scroll (MY may be outside the 1 to 1024 unit range). On a continuation line, columns 6 to 20 are ignored.

COLUMNS 11-15
The value of ICNTR, which is the centering option:

0
Start the text at MX.
1
Center the text about MX.
2
End the text at MX.

COLUMNS 16-20
The value of SIZE, which is the relative size of characters. This multiplies the Plotchar character height. The recommended range is 1. to 2.5 (Plotchar modifiers can also be used to change sizes).

COLUMNS 21-80
Text for this line, or for continuation of a line when MX = -9999. Plotchar modifiers may be used; see the Plotchar documentation.

NCARDS
Integer, Input---Dimension of the array CARDS, that is, the number of lines in CARDS.

NYST
Integer, Input---The STITLE coordinate that will be at the center of the screen when the text is first displayed.

NYFIN
Integer, Input---The STITLE coordinate that will be at the center of the screen when the text is last displayed.

TST
Real, Input---The time, in seconds, that the scroll will be stationary at NYST. One second is recommended.

TMV
Real, Input---The time, in seconds, for a title line to scroll from NYST to NYFIN. This should be the time required to read the text aloud at slow to normal speed.

TFIN
Real, Input---The time, in seconds, that the scroll will be stationary at NYFIN. One second is recommended.

MV
Integer, Input---Switch to indicate whether this is a practice run or the movie is being made:

0
Movie is being made.
1
Practice run.

Practice runs output outlined representative frames from the scroll with a legend indicating the number of seconds the frame will be shown at the start or finish, or the number of seconds into the total moving time that a particular frame represents. When the movie is being made, this practice output is suppressed.

Discussion

STITLE takes all input through its argument list, and generates graphic output.

All arguments are unchanged on output.

STITLE in effect moves a body of text up through the screen window, outputting frames required to generate a movie sequence of duration specified by the user.

At each frame, STITLE skips plotting lines of text that are completely outside the screen window. Lines of text that are partially in the window are clipped by Plotchar.

Line 1 of the stfont.f code segment states that there will be four lines of text generated. Lines 2 through 5 give the text string (X,Y) locations, the text centering option, the Plotchar size modifier, and the text strings.

Line 6 chooses Times-Roman for the title font.

Line 7 shows the STITLE coordinate that will be at the center of the screen when the text is first displayed, and line 8 shows that it will remain at this position at the end of the sequence.

Lines 9 and 10 show that the scroll hold and move times are zero. (This is a fixed title.) Line 11 shows that the fixed title will be held for 6.0 seconds. Line 12 indicates that this is just a test, and line 13 generates the titles.

Note that the output produced (a single frame with no scrolling to appear for 6.0 seconds) could equally well have been produced by FTITLE. We call STITLE in this demo to avoid reading the input lines.

Previous chapter          LLUs Home          Next chapter          Index