Abstract:
A processor controlled character box display is provided with apparatus which permits the display of curvilinear graphics. The characters used to generate the graphics display are selected from a limited character set in read only storage (46), but by shifting the characters up or down by less than a full line index to provide additional character positions, it is possible to produce curvilinear graphics without the need for further character generation. Since the graphics display is a low resolution display, it is necessary to make a best dot selection in order to map the print bit map into the character box display.

Description:
RELATED APPLICATION 
     This application is related to the following concurrently filed application which is assigned to a common assignee and is incorporated herein by reference: 
     Application Ser. No. 06/493,677, filed May 7, 1983, by Danny B. Convis, Donald T. Crehan and Charles J. Lovell and entitled &#34;Internal Image and Bit Array for Display and Printing of Graphics&#34;. 
     FIELD OF THE INVENTION 
     This invention generally relates to word processing systems, and more particularly to the display of graphics such as pie and line charts using a non-APA (All Points Addressable) display. 
     BACKGROUND OF THE INVENTION 
     Word processing systems have evolved from relatively simple text processors which facilitated the manipulation of character strings to the sophisticated multitasking processors of today which are capable of such diverse applications as communications, calculations and data processing emulations. It is not uncommon, for example, to provide a word processing system with a calculation application to include the generation of graphics data based on calculated or input numerical data. This is because it is often easier to interpret the numerical data when it is presented as a bar, pie or line graph, for example. 
     The problem arises, however, in the presentation of the graphics data. Generally, the visual display of graphics data on a CRT display has been accomplished with an APA display. Word processing systems typically use a character box or non-APA display. The advantage of the character box display is that it requires much less memory than an APA display of even moderate resolution. The disadvantage is so far as the presentation of graphics data is concerned is the inability of the character box display to support the display of characters not defined by the character box. 
     The above referenced application Ser. No. 06/493,677 entitled &#34;Internal Image and Bit Array for Display and Printing of Graphics&#34; discloses an apparatus which provides a word processing system using a non-APA display and a letter quality printer, both character box devices, with the ability to both display and print graphics data. The invention described in that application provides an internal image and bit array apparatus to contain the data structures necessary and sufficient to both display and print the graphics data. These data structures are (1) output by the process that converts numeric data values into image data and (2) input to the display process and the print process. These are the central mechanisms that make graphics on a character box device possible. However, in order for these mechanisms to produce a display of graphics data, it is necessary to map the high resolution graphics data in the bit array into the internal image and then to use as few characters as possible selected from a limited character set in read only storage (ROS) in order to display curved lines. 
     SUMMARY OF THE INVENTION 
     It is therefore and object of the present invention to provide a character box display with the ability to display curvilinear graphics using a minimum number of characters stored in read only storage. 
     It is another object of the invention to provide a technique for mapping high resolution graphics data in a print bit array into a lower resolution internal image array for display on a non-APA display. 
     According to the invention, the objects of the invention are accomplished by shifting characters up or down by less than a full line index to thereby provide additional character positions. This makes it possible to produce curvilinear graphics without the need for additional character generation. For producing a pit chart, four graphics characters are used, each at a different position within the character box. Typically, these are dots which, when shifted up or down using superscript or subscript techniques, produce a total of eleven different dot positions. For producing line charts, two more graphics characters are used. Typically, these are open circles such as a degree symbol which may be moved up or down to produce five different symbol positions. By introducing normal brightness and high brightness to the displayed dot and open circle symbols, it is possible to display four line graphs. Using dot and open circle graphics characters, only four additional characters need to be added to the character generator ROS since at least one dot, the period, and at least one open circle, the degree symbol, already exist in ROS. As a result, the addition of the graphics display capability is achieved with a minimum of additional hardware and software since the subscript and superscript facilities are already available. 
     Since the graphics display is a low resolution display, it is necessary to make a best dot selection in order to map the print bit array into the internal image array. This is done by examining each cell of the bit array corresponding to a character box on the display to determine which of the eleven pie characters or which of the five line characters is the &#34;best dot&#34; to represent the fragment of the circle or line passing through the cell. In the case of the pie chart, eleven zones are defined, and a bit mask is defined for each of the eleven zones. Then the cell containing the fragment is logically ANDed with each of the eleven masks in a priority order. The first logical AND of the cell with a mask that produces a non-zero result indicates that the circle or line fragment in the cell is intersecting that zone. Then that one of the eleven glyphs that corresponds to that zone is placed in the internal image array as the &#34;best dot&#34; to represent the fragment. The line chart is handled similarly. There are five zones and five masks since there are five glyphs effectively for each of the four line types. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The foregoing and other objects, aspects and advantages of the invention will be better understood from the following detailed description with reference to the accompanying drawings, in which: 
     FIG. 1 is a block diagram of a word processing system in which the present invention is embodied; 
     FIG. 2 is an illustration of the pie chart characters in the display character generator ROS; 
     FIG. 3 is an illustration of the line chart characters in the display character generator ROS; 
     FIG. 4 shows the internal image data structure; 
     FIG. 5 shows the positional relationship between the internal image data structure and the bit array with the bit array being positioned over the plotting area of the internal image; 
     FIG. 6 is an illustration of the best dot zones of a pie chart; 
     FIG. 7 is an illustration of the best dot bit masks of the pie chart; 
     FIG. 8 shows how the eleven dot positions for the pie chart can be used to display a satisfactory outline of a pie chart of any other curvilinear line; 
     FIG. 9 is an illustration of the best dot zones of a line chart; and 
     FIG. 10 is an illustration of the best dot zones and bit masks of the line chart. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring now to the drawings, and more particularly to FIG. 1, there is shown a block diagram of a typical implementation of a word processor in which the present invention is embodied. The system includes a processor 2, a system memory 4, a display adaptor 6, and a printer adaptor 8. The system memory 4 contains the bit array and the internal image array which are described in more detail hereinafter. Only those connections between processor 2, system memory 4 and the display adaptor 6 are shown as needed for purposes of explanation of the invention, all other interconnections therebetween being well understood by those skilled in the art. 
     In the display adaptor 6, the timings block 10 provides various clocking signals for the word processor display function. The address clock signal on line 12 is input to refresh memory address counter 14 whose output appears on memory address bus 16. The address on bus 16 is input to the refresh memory 18. Attribute bus 20, as well as character data bus 22, are two outputs from refresh memory 18. The data on both buses 20 and 22 are latched into memory output data latches 24. Another clock signal from the timings block 10 is the data clock on line 26 which is input to data latches 24 for controlling input thereto. Eight bits on bus 28 are output from latches 24 to attribute decoder 30. Once decoded, attribute data is output on bus 32 and is input to attribute delay synchronization latches 34 under control of delay clock signals on line 36. The output of output control 40 on line 42 is the video input to the CRT display monitor (not shown). 
     The other eight bits of character data are output from memory output data latches 24 along bus 44 to the character generator ROS 46. The character generator ROS 46 also receives scan line adjustment data on bus 48 from index up or down translator 50 and input Font2 on line 68 from attribute decoder 30. The translator 50 receives the scan line count on bus 52 from the timings block 10 and is controlled by signals from attribute decoder 30 on lines 54 and 56 to index up or down in order to provide superscript and subscript functions. The character data output on bus 58 from the character generator ROS 46 is read into a parallel in, serial out shift register 60. The serial character data strings are read out of shift register 60 on line 62 to the video output control 40. The timings block 10 also provides horizontal sync and vertical sync signals on lines 64 and 66 to the display CRT. 
     In order to understand the invention, one must first understand the constraints of the character box (non-APA) display to which the apparatus according to the invention is tailored. Each character box on the display is 16 pels high and 8 pels wide. The display character generator ROS 46 contains a character font wherein each character is constrained to this character box. Each character box on the display is represented by a two byte character-attribute pair. In other words, the first byte on bus 22 defines the character address in ROS 46, and the second byte on bus 20 specifies the attribute of the displayed character. The bits of the attribute byte are defined as follows beginning with the most significant bit and continuing to the least significant bit: 
     Line End 
     *Half Index Up 
     *Half Index Down 
     Reverse Video 
     Underscore 
     Cursor 
     *Font2 (there are two fonts in the ROS of 256 symbols each) 
     *Bright 
     The attribute bits marked with an asterick (*) are used in the apparatus according to the invention. 
     There are four characters defined in the display character generator ROS 46 used to represent pie charts on the display. These are dots of 2 pels high and 2 pels wide positioned at different locations within the character box. These together with the attributes index up and index down provide a total of eleven effective dot characters as shown in FIG. 2 to outline the rim and spokes of the pie. The reason that there are not twelve effective dot characters is that the twelfth character falls outside the character box. This is illustrated in FIG. 2. 
     There are basically four characters defined in the display character generator ROS 46 used to represent line charts on the display. These together with the attributes index up, index down and bright provide a total of twenty effective characters (five for each of the four line types) used to give a dot outline representation of lines on the display. These are shown in FIG. 3. 
     The apparatus according to the invention described in the above referenced application Ser. No. 06/493,677 entitled &#34;Internal Image and Bit Array for Display and Printing of Graphics&#34; consists of two data structures in the system memory 4 that are closely linked. The first is the internal image structure. It is shown in FIG. 4 and is a three dimensional matrix. It is 28 character boxes high and 80 character boxes wide, where each box contains two bytes. These two bytes correspond to the fact that each box in the character box display requires a character-attribute byte pair. The second data structure is the bit array data structure shown in FIG. 5 and is also a three dimensional matrix. It is 24 character boxes high and 60 character boxes wide, where each character box contains 25 bytes. The 25 bytes contain the 200 dots of the 20×10 print resolution dot matrix of the corresponding character position in the internal image data structure. FIG. 5 shows the positional relationship between the two data structures, the bit array being positioned over the plotting area of the internal image. In the case of pie charts, the rim and spokes of the pie are &#34;written&#34; into the bit array by turning on bits in that array that correspond to those objects. However, the alphanumeric labels of each slice are &#34;written&#34; into the corresponding cells of the internal image. When it is necessary to display the pie chart, the bit array is scanned and a set of &#34;best dot&#34; glyphs are selected and put in the internal image so as to form a &#34;dot outline&#34; of the pie. The display viewer sees its alphanumeric labels and the dot outline of the pie together on the screen. 
     A &#34;best dot&#34; selection process is used to map the print bit map in the bit array into the internal image character box display for both pie and line charts. It should be understood that the character box display can not possibly show the chart with a resolution comparable to that of the printer. In the character box environment, there are a number of restrictions by virtue of the character box hardware. Specifically, the character box in the display is 16 pels high and 8 pels wide while in the printer, it is effectively 20 pels high and 10 pels wide. In the display, there are four characters which when indexed up and down, provide eleven possible positions within the character box to outline the rim and spokes of a pie chart, and there are four characters which when brightened and/or indexed up and down provide twenty glyphs to outline the segments of lines in a line chart. For both the pie chart and the line chart, the circle and straight line segments are drawn into a print resolution bit map that corresponds to the central plotting area of the chart. This print resolution bit map is used whe printing so that the image is printed in high resolution. The bit map is 60 character box cells wide (600 pels) and 24 character box cells high (480 pels). Each 20×10 cell of that plotting area corresponds to a character box on the display and is examined to determine which of the eleven pie characters or which of the five line characters is the &#34;best dot&#34; to represent the fragment of circle or line passing through that 20×10 area of the bit map. In the case of the pie chart, eleven zones (each 20×10 in size) are defined as shown in FIG. 6. A bit mask is defined for each of the eleven zones as shown in FIG. 7. Then the cell containing the fragment is logically ANDed with each of the eleven masks in a priority order. The central zone is first, the zones immediately above and below it are next, and so on, the priority order of the zones being given by the numbers 1 through 5 in FIG. 6. The first logical AND of the cell with a mask that produces a non-zero result indicates that the circle or line fragment in the cell is intersecting that zone. Then that one of the eleven glyphs that corresponds to that zone is placed in the internal image array in system memory 4 as the &#34;best dot&#34; to represent that fragment. The assignments correspond to a &#34;center is best&#34; policy. FIG. 8 shows how the eleven different dot positions can be used to display a satisfactory outline of a pie chart or, for that matter, any curvilinear line. 
     Line charts are handled similarly. There are five zones as shown in FIG. 9 and five masks as shown in FIG. 10 since there are five glyphs effectively for each of the four. When it is necessary to display the line chart, the bit array is scanned using these masks to select a set of &#34;best dot&#34; glyphs that are put into the internal image array in the system memory 4. The display viewer sees the line chart alphanumeric labels and axes and the dot outline of the lines together on the screen. 
     The cells and zone masks are implemented as 25  contiguous bytes (10×20=200 bits) so that they can be addressed by a simple increment of 1 in a DO LOOP. This facilitates testing of the 25 cell bytes to determine if calculation of a best dot is necessary and in the ANDing of each of the 25 bytes of a mask with each of the 25 bytes of the cell to determine if an intersection occurred during the best dot selection. 
     By using the superscript and subscript apparatus of the word processor, the present invention makes it possible to display curvilinear lines on a character box display using a minimum of additional characters added to the character generator ROS. A lower resolution but still quite acceptable display is made possible by mapping the high resolution print data in the bit array into the internal image array using a &#34;best dot&#34; selection criteria. 
     The best dot selection process was implemented using a Program Design Language (PDL). An understanding of PDL may be had by reference to an article entitled &#34;Top-down Development Using a Program Design Language&#34; by P. Van Leer, IBM Systems Journal, vol 15, no. 2, (1976) pp. 155-170. The PDL description of the best dot selection process is presented below: ##SPC1##