JPS5961881A - Graphic generator - Google Patents
- ️Mon Apr 09 1984
【発明の詳細な説明】
産業上の利用分野
本発明は、図形を含んだ文書を編集する際、既に発生さ
れた図形パターンの閉領域に、識別可能なハツチング等
の表示を行う図形発生装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a figure generation device that displays identifiable hatching or the like in a closed area of an already generated figure pattern when editing a document containing figures. It is something.
従来例の構成とその問題点 以下、従来の図形発生装置について述べる。Conventional configuration and its problems A conventional figure generator will be described below.
第1図は従来のラスク走査型の陰極線管(CRT)ディ
スプレイを用いた図形発生装置のプロンク図である。ま
ず入力部1で入力された文字コードおよび図形圧縮コー
ドはデータバッファ2へ蓄へられる。文字発生部3は、
データバッファ2の文字コードに対応する文字パターン
を文字パターンメモリ6から読み取り、フレームメモリ
6へ書きこむ。図形発生部4は、データバッファ2の図
形圧縮コードからビットパターンに変換し2てフレーム
メモリ6へ書きこむ。FIG. 1 is a diagram of a graphic generator using a conventional rask scanning type cathode ray tube (CRT) display. First, the character code and graphic compression code input at the input section 1 are stored in the data buffer 2. The character generation section 3 is
A character pattern corresponding to the character code of the data buffer 2 is read from the character pattern memory 6 and written to the frame memory 6. The graphic generator 4 converts the compressed graphic code in the data buffer 2 into a bit pattern and writes the bit pattern into the frame memory 6.
そしてフレームメモリ6の文字および図形の混在したビ
ットパターンはCRT7により表示される。The bit pattern in which characters and graphics are mixed in the frame memory 6 is displayed on the CRT 7.
上記のように構成された文字図形発生装置において、た
とえば第2図に示した様に、予め発生された図形の閉領
域(11y12+13で囲まれる領域)にハツチングを
付ける場合、直線l、と輪郭線11゜12.13 と
の交点を算出して直線を発生するという処理を閉領域全
体に等間隔で繰り返す必要がある。交点の算出は、輪郭
線が直線や円の様に単純であれば簡単であるが、複雑な
曲線になるとフレームメモリ6をビット単位で走査しな
がら検出するため、処理時間が非常にかかるという欠点
を有する。寸た、ハツチングパターンとして用いられる
ものは、斜線だけでなく、第3図に示した様な種々のパ
ターンが使用されるため、この方法では各パターンに対
して異なった処理が必要となり、プログラム容量が増大
するという欠点がある。In the character/figure generator configured as described above, when hatching is added to a closed area (area surrounded by 11y12+13) of a previously generated figure, as shown in FIG. It is necessary to repeat the process of calculating the intersection with 11°12.13 and generating a straight line at equal intervals throughout the closed region. Calculating the intersection point is easy if the contour line is simple like a straight line or a circle, but if the contour line is complex, the point of intersection is detected while scanning the frame memory 6 bit by bit, so the disadvantage is that it takes a lot of processing time. has. In addition, the hatching patterns used include not only diagonal lines but also various patterns such as those shown in Figure 3. Therefore, this method requires different processing for each pattern, and the program The disadvantage is that the capacity increases.
発明の目的
本発明は、上記欠点に鑑み、既に発生された図形の輪郭
線の形状やハツチングパターンの種類等に依存せず指定
された閉領域に高速に領域識別可能な表示を施すことの
できる図形発生装置を提供するものである。Purpose of the Invention In view of the above-mentioned drawbacks, the present invention provides a method for displaying a specified closed area so that the area can be identified at high speed without depending on the shape of the outline of a figure that has already been generated, the type of hatching pattern, etc. The present invention provides a graphic generation device that can generate graphics.
発明の構成
本発明では上記目的を達するため、図形を複数ブロック
に分割し各ブロックの文字または図形のコード化情報お
よび図形有無情報を記憶する頁メモリと、文字および図
形のパターンをブロック単位で記憶するパターンメモリ
とを設け、種々のハツチングパターン等の領域識別可能
な表示を予め前記パターンメモリに登録しておき、発生
した図形の閉領域の輪郭線を含むブロックのみ新たに領
域表示用のパターンを生成することにより、従来よりも
閉領域への領域表示処理を高速化し、領域表示用のパタ
ーンの種類に依存しないように構成したものである。Structure of the Invention In order to achieve the above object, the present invention includes a page memory that divides a figure into a plurality of blocks and stores coded information of characters or figures and figure presence/absence information of each block, and a page memory that stores patterns of characters and figures in blocks. A pattern memory is provided for displaying areas, and displays that allow area identification, such as various hatching patterns, are registered in advance in the pattern memory, and only blocks that include the outline of the closed area of the generated figure are newly updated with area display patterns. By generating , the region display processing for closed regions is made faster than in the past, and is configured to be independent of the type of region display pattern.
実施例の説明
以下、図面を参照しながら本発明の一実施例について説
明する。DESCRIPTION OF EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.
第4図は本発明の一実施例における図形発生装置のブロ
ック図である。FIG. 4 is a block diagram of a graphic generator according to an embodiment of the present invention.
同図において、11は操作者が文字や図形を入力する入
力部で、文字コードや図形圧縮コードを出力する。12
は入力部1から送出された文字コードや図形圧縮コード
を格納するデータバッファ。In the figure, reference numeral 11 denotes an input section through which an operator inputs characters and graphics, and outputs character codes and graphics compression codes. 12
is a data buffer that stores the character code and graphic compression code sent from the input section 1;
13はデータバッファ12に格納されている文字コード
に応じて文字パターンを発生する文字発生部、14はデ
ータバッファ12に格納されている図形圧縮コードに応
じて図形パターンを発生する図形発生回路である。16
は図形′め最大寸法にあたる。頁を複数個r゛・ツクに
分割している頁メモリで、各ブロックに対して1ワード
が割当てられている。16は図形発生部14により発生
した1ブロック単位のパターンを格納するブロックメモ
リで頁メモリ16の対応するブロックに、図形のコード
化情報として後述するパターンメモテ及出する発生順の
通し番号及び図形有無情報を第5図(、)に示すよう々
フォーマットで書き込む。17は頁メモリ16の表示領
域に対応する部分を第5図(b)に示すような変換され
たコードで格納しているコードリフレッシュメモリであ
る。18はコードリフレッシュメモリ17及びブロック
メモリ16から送出されてくる情報を記憶するパターン
メモリで、第5図(b)に示したコードリフレッシュメ
モリ17内のパターンメモリアドレスコードBiTO〜
13がパターンビットを格納している先頭アドレスに対
応している。19は文字および図形を表示するCRTで
、この表示リフレッシュ周期と同期してコードリフレッ
シュメモリ17の内容がパターンメモリ18を介して表
示される。Reference numeral 13 designates a character generation section that generates a character pattern according to the character code stored in the data buffer 12, and reference numeral 14 designates a graphic generation circuit that generates a graphic pattern according to the graphic compression code stored in the data buffer 12. . 16
corresponds to the maximum dimension of the figure. A page memory is divided into a plurality of blocks, and one word is allocated to each block. Reference numeral 16 denotes a block memory that stores patterns in units of blocks generated by the figure generation unit 14, and a pattern memo, which will be described later as figure encoding information, is sent to the corresponding block of the page memory 16, including the serial number of the generation order and the presence or absence of figures. Information is written in the format shown in Figure 5 (,). A code refresh memory 17 stores a portion corresponding to the display area of the page memory 16 as a converted code as shown in FIG. 5(b). 18 is a pattern memory for storing information sent from the code refresh memory 17 and the block memory 16, and the pattern memory address code BiTO in the code refresh memory 17 shown in FIG. 5(b) is
13 corresponds to the start address where the pattern bits are stored. Reference numeral 19 denotes a CRT for displaying characters and figures, and the contents of the code refresh memory 17 are displayed via the pattern memory 18 in synchronization with this display refresh cycle.
以下、第6図を参照してパターンメモリ18の具体的構
成を示す。The specific structure of the pattern memory 18 will be described below with reference to FIG.
パターンメモリ18は16X16ドツトのブロック単位
に分けられ、アドレス9 addより上の領域は文字パ
ターン領域で固定パターン用として使用され、アドレス
gadd以下は図形パターン領域で可変パターン領域と
して使用される。この図形パターン領域にはブロックメ
モリ17を介して図形発生回路14から送出されてくる
図形パターン情報を下位ブロックから順に格納されてい
く。The pattern memory 18 is divided into blocks of 16×16 dots, and the area above address 9 add is a character pattern area and is used for a fixed pattern, and the area below address gadd is a graphic pattern area and is used as a variable pattern area. In this graphic pattern area, graphic pattern information sent from the graphic generation circuit 14 via the block memory 17 is stored in order from the lower block.
なお文字パターン領域のアドレスh0がら8ブロツクま
でには第3図に示したようなハツチングパターンが登録
されている。Note that a hatching pattern as shown in FIG. 3 is registered in the 8th block from address h0 in the character pattern area.
上記のように構成された図形発生回路について以下第7
図(a)に示したような図形にハツチングを与える動作
について説明する。Regarding the figure generation circuit configured as above, the seventh section is as follows.
The operation of adding hatching to a figure as shown in FIG.
第7図(、)の扇形の図形パターンを発生した後の頁メ
モリ15の対応するブロックのコードは、扇形の輪郭部
において、第7図(均に示した様にB1T15(図形有
無情報)が”1′′となっている。扇形内の1点Mとハ
ツチングパターンhi が指定されると第10図に示し
たフローチャートに従って扇形内にハツチングを行なう
。なお第10図で示したフローチャートにおいて、MB
、WB、uB。The code of the corresponding block in the page memory 15 after generating the fan-shaped graphic pattern shown in FIG. 1''. When one point M within the fan shape and the hatching pattern hi are specified, hatching is performed within the fan shape according to the flowchart shown in FIG. 10. In the flowchart shown in FIG. 10, M.B.
, W.B., uB.
LB、HBは頁メモリ15上のX座標およびY座標から
なるブロックアドレス、A、B、C,Dはハツチングレ
ジスタ、TMは頁メモリ、BMはブロックメモリ、PM
はパターンメモリである。LB and HB are block addresses consisting of the X and Y coordinates on the page memory 15, A, B, C, and D are hatching registers, TM is the page memory, BM is the block memory, PM
is a pattern memory.
まず、中心点MをブロックアドレスMBに変換後、ブロ
ックメモリMBを含む1ブロツク行(第8図(→に示し
た行)のハツチングを行なう。次にブロックメモIJM
BからY軸の減少方向へ1ブロツク行単位で閉領域の上
限ブロック行までハツチングを行なう(第8図(bl
)。さらに、ブロックアドレスMBまで戻り、ブロック
メモリMBからY軸の増加方向へ1ブロツク行単位で閉
領域の下限ブロック行までハツチングを行なう(第8図
(C))。First, after converting the center point M into a block address MB, hatching is performed for one block row (the row shown in FIG. 8 (→)) including the block memory MB.Next, the block memo IJM
From B to the upper limit block row of the closed area, hatching is performed in block row units in the decreasing direction of the Y axis (see Fig. 8 (bl
). Further, the process returns to the block address MB and hatches from the block memory MB in the increasing direction of the Y axis to the lower limit block row of the closed area in units of one block row (FIG. 8(C)).
このような1ブロツク行のハツチング処理を第10図(
b)のフローチャートに示す。中心・ブロックアドレス
WBが与えられると、そのブロックのハツチングを行な
った後、中心ブロックアドレス細からX軸の減少方向へ
1ブロツク単位で閉領域の左端ブロックまで(ハツチン
グレジスタAがt+oI+となるまで)ハツチングを行
なう。さらに、ブロックアドレスWBまで戻り、ブロッ
クアドレスWBからX軸の増加方向へ1ブロツク単位で
閉領域の右端ブロックまで(ハツチングレジスタBが′
0”となるまで)ハツチングを行なう。The hatching process for one block line is shown in Figure 10 (
This is shown in the flowchart of b). When the center/block address WB is given, that block is hatched, and then from the center block address thin to the left end block of the closed area in the decreasing direction of the X axis (until hatching register A reaches t+oI+ ) Perform hatching. Furthermore, it returns to the block address WB, and from the block address WB in the increasing direction of the
0”).
次に、1ブロツク内のハンチング処理を第10図(C)
のフローチャートに示す。まず、HBで指定されたブロ
ックアドレスに対応する頁メモリ15上のコードを読み
取υ、B1T15=Oならば、指定されたハツチングパ
ターンhi(i=っ〜7)に対するコードを頁メモリT
Mに書きこむ。B1T15=1ならば、閉領域の輪郭線
が含まれるので、指定されたハツチングパターンhi
に対するビットイメージをパターンメモリPMからブ
ロックメモリBMへ転送後、ハツチングレジスタA、B
、C。Next, the hunting process within one block is shown in Fig. 10(C).
This is shown in the flowchart below. First, read the code on the page memory 15 corresponding to the block address specified by HB.
Write in M. If B1T15=1, the outline of the closed area is included, so the specified hatching pattern hi
After transferring the bit image from pattern memory PM to block memory BM, hatching registers A and B
,C.
Dに基づいて、ブロック内の閉領域に含まれる部分のみ
指定されたハツチングパターンとなる様にブロックメモ
リBMを変更し、図形としてパターンメモIJPMの図
形パターン領域へ登録する。ハツチング完了後、ハツチ
ングレジスタA、B、C。Based on D, the block memory BM is changed so that only the portion included in the closed area within the block becomes a specified hatching pattern, and the hatching pattern is registered as a figure in the figure pattern area of the pattern memo IJPM. After hatching is completed, hatch registers A, B, and C.
Dは、第9図に示した様に、ブロックメモリBMの左端
、右端、上端、下端情報として更新される。As shown in FIG. 9, D is updated as left end, right end, upper end, and lower end information of the block memory BM.
uBは閉領域がそのブロックの上方向へ伸びている場合
(ハツチングレジスタC〜0)にそのブロックアドレス
がセットされ、LBは閉領域がそのブロックの下方向へ
伸びている場合(ハツチングレジスタD←0)にそのブ
ロックアドレスがセットされ、ハツチングの終了の制御
に使用される。uB is set to the block address when the closed area extends upwards in the block (hatching registers C to 0), and LB is set to the block address when the closed area extends downwards in the block (hatching registers C to 0). The block address is set in D←0) and used to control the end of hatching.
なお本実施例において領域表示はハツチングを用いて処
理したが、領域表示はドツトによる表示。Note that in this embodiment, the area display is processed using hatching, but the area display is performed using dots.
あるいは色彩による表示でもよい。Alternatively, it may be displayed in color.
発明の効果
以上のように本発明は、閉領域にハツチング等の領域識
別表示を施す場合、閉領域の輪郭線を含むブロックにつ
いてのみパターンのイメージを生成し、輪郭線を含まな
いブロックについては、予め登録された領域表示用のパ
ターンのコード情報のみを頁メモリに書きこむように構
成することにより、処理速度が向上する。また領域表示
の処理そのものは、領域表示用パターンに無関係であり
、種類が増加してもよくプログラム容量が少なくてすむ
等、その効果は大なるものがある。Effects of the Invention As described above, in the present invention, when a region identification display such as hatching is applied to a closed region, a pattern image is generated only for blocks that include the outline of the closed region, and for blocks that do not include the outline, By configuring the page memory to write only the code information of the area display pattern registered in advance, the processing speed is improved. Further, the area display processing itself is unrelated to the area display pattern, and has great effects, such as allowing the number of types to increase and requiring less program capacity.
第1図は従来の図形発生装置のブロック図、第2図は閉
領域へのハツチングの例を示す図、第3図は各種のハツ
チングパターンを示す図、第4図は本発明の一実施例に
おける図形発生装置のブロック図、第5図(a)及び(
b)はそれぞれ頁メモリおよびコードリフレッシュメモ
リの1ブロツクのコードを示す図、第6図は、パターン
メモリの構成図、第7図(a)及び(lはハツチング開
始時における頁メモリの状態を示す図、第8図(、)〜
(C)はノ\ッチングの処理過程を示す図、第9図はノ
・、チングレジスタA、B、C,Dと1ブロツク内のパ
ターンとの関連を示す図、第1Q図(a)〜(C)は本
発明による図形発生装置の処理を示すフローチャートで
ある。
11・・・・・・入力部、12・・・・・・データバッ
ファ、13・・・・・・文字発生部、14・・・・・・
図形発生部、16・・・・・・頁メモリ、16・・・・
・・コートリフレッシュメモリ、17・・・・・・ブロ
ックメモリ、18・・・・・・パターンメモリ、19・
・・・・・CRT0
代理人の氏名 弁理士 中 尾 敏 男 ほか1名第
2 口
第3図
第5図
第6図
フロンクメモ77
第7図
夛メ丑ソ’)BiT15
第8図
第9図
第10図
(α)(b)FIG. 1 is a block diagram of a conventional figure generator, FIG. 2 is a diagram showing an example of hatching into a closed area, FIG. 3 is a diagram showing various hatching patterns, and FIG. 4 is an example of an embodiment of the present invention. Block diagram of the figure generator in the example, FIG. 5(a) and (
b) is a diagram showing one block of code in the page memory and code refresh memory, respectively; FIG. 6 is a configuration diagram of the pattern memory; FIGS. Figure, Figure 8 (,) ~
(C) is a diagram showing the process of notching, Figure 9 is a diagram showing the relationship between the notching registers A, B, C, and D and patterns within one block, and Figures 1Q (a) to (C) is a flowchart showing the processing of the graphic generator according to the present invention. 11...Input section, 12...Data buffer, 13...Character generation section, 14...
Figure generation section, 16... Page memory, 16...
...Court refresh memory, 17...Block memory, 18...Pattern memory, 19.
...CRT0 Name of agent Patent attorney Toshio Nakao and 1 other person
2 Figure 3 Figure 5 Figure 6 Fronck memo 77 Figure 7 夛MEUSSO') BiT15 Figure 8 Figure 9 Figure 10 (α) (b)