JPH04117582A - Graphic plotting device - Google Patents
Graphic plotting deviceInfo
- Publication number
- JPH04117582A JPH04117582A JP21075890A JP21075890A JPH04117582A JP H04117582 A JPH04117582 A JP H04117582A JP 21075890 A JP21075890 A JP 21075890A JP 21075890 A JP21075890 A JP 21075890A JP H04117582 A JPH04117582 A JP H04117582A
- Authority
- JP
- Japan
- Prior art keywords
- address
- memory
- bits
- processing
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 claims description 2
- 230000012447 hatching Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 26
- 238000004364 calculation method Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 239000013598 vector Substances 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 4
- 102100031584 Cell division cycle-associated 7-like protein Human genes 0.000 description 1
- 101000777638 Homo sapiens Cell division cycle-associated 7-like protein Proteins 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Landscapes
- Image Generation (AREA)
- Image Input (AREA)
Abstract
Description
【発明の詳細な説明】
(イ)産業上の利用分野
本発明は、ワードプロセッサ、ディスクトップパブリッ
シング(以下、DTPと略記する。)、またはワークス
テーションなどのコンピュータグラフィックにおける線
を描画する図形描画装置に関する。DETAILED DESCRIPTION OF THE INVENTION (A) Field of Industrial Application The present invention relates to a figure drawing device for drawing lines in computer graphics such as word processors, desktop publishing (hereinafter abbreviated as DTP), or workstations. .
(ロ)従来の技術
ワードプロセッサ、DTP等のシステムにおいて、各種
文字、記号等の高品位化が要求されている。しかしドツ
トフォントで大きさの異なる文字を持つことは、フォン
ト容量が膨大になり好ましくない。そのため、文字の輪
郭情報のみ記憶しておき、表示または印字する際には輪
郭情報に基き、図形描画装置にて輪郭を描き内側を塗り
つぶすいわゆるアウトラインフォントにより、文字を表
示または印字することが行なわれている。(b) Conventional Technology In systems such as word processors and DTP, there is a demand for higher quality of various characters, symbols, etc. However, having characters of different sizes in a dot font is undesirable because the font capacity becomes enormous. Therefore, characters are displayed or printed using so-called outline fonts, in which only the outline information of characters is memorized, and when the characters are displayed or printed, the outline is drawn using a graphic drawing device and the inside is filled in based on the outline information. ing.
上述した文字の輪郭は、いくつかの直線に分けて描画さ
れる。そして、各直線はプレゼンハムアルゴリズム等を
用いた図形描画装置により演算され画素ビットが作成さ
れる。その画素ビットを画像メモリに書き込むことによ
り線の描画を行なっている。The outline of the character described above is drawn divided into several straight lines. Then, each straight line is calculated by a graphic drawing device using the Presentham algorithm or the like to create pixel bits. Lines are drawn by writing the pixel bits into the image memory.
ところで、従来プロセッサ等を用いた図形描画装置と画
像メモリの動作速度を比較すると、図形描画装置の方が
格段に速度が速い。そのため、図形描画装置は、画像メ
モリの動作速度に合わせている。すなわち、画像メモリ
の読み出し及び書き込みのメモリサイクルに合わせて動
作スピードを調整し、各種の基本図形をメモリの1サイ
クルごとに1ドツトづつ描画し、そして、lサイクルづ
つ読み出したものを図形描画装置の処理するビット幅の
応じた数だけ全て論理和して、画像メモリの同一アドレ
スに書き込むことにより、線描画が行われている。By the way, when comparing the operating speed of a graphic drawing device using a conventional processor or the like and an image memory, the speed of the graphic drawing device is significantly faster. Therefore, the graphic drawing device is adapted to the operating speed of the image memory. In other words, the operation speed is adjusted according to the memory cycles of reading and writing to the image memory, various basic figures are drawn one dot per memory cycle, and the figures read out every l cycle are transferred to the figure drawing device. Line drawing is performed by ORing all the numbers according to the bit width to be processed and writing them to the same address in the image memory.
(ハ)発明が解決しようとする課題
上述した従来の図形描画装置においては、画像メモリの
読み出し及び書き込みのメモリサイクルと動作速度がネ
ックとなり、図形描画装置を構成するプロセッサの処理
速度が速くても、画像メモリのメモリサイクル並びに動
作速度に合わせて、1ドツトづつ描画しなければならず
、図形描画に時間がかかるという問題があった。しかも
速度の向上もメモリの速度に依存し、高速メモリが必要
などメモリに制約があり、高速化を図るためには、高価
なメモリの使用を余儀なくされている6本発明は上述し
た従来の問題点を解消すべくなされたものにして、メモ
リのサイクル並びに動作速度に無関係で短時間に描画処
理が可能な図形描画装置を提供することをその課題とす
る。(c) Problems to be Solved by the Invention In the conventional graphic drawing device described above, the memory cycle and operating speed of reading and writing to the image memory are the bottlenecks, and even if the processing speed of the processor that constitutes the graphic drawing device is fast, However, it is necessary to draw one dot at a time in accordance with the memory cycle and operating speed of the image memory, which poses a problem in that it takes time to draw figures. Moreover, the improvement in speed also depends on the speed of the memory, and there are memory constraints such as the need for high-speed memory, and in order to increase the speed, it is necessary to use expensive memory.6 This invention solves the above-mentioned conventional problems. It is an object of the present invention to provide a graphic drawing device that is designed to solve the problem and can perform drawing processing in a short time regardless of memory cycles and operating speed.
(ニ)課題を解決するための手段
本発明は、線分の始点及び終点データを設定する手段、
始点及び終点データに従って線分を作成する線描画手段
、この線描画手段にて作成された画素データを記憶する
画像メモリ、画素データのX、Y方向の両アドレスの変
化を検出するアドレス検出手段、前記画素データのビッ
ト数を検出する手段、前記画像メモリのサイクルタイム
と線描画手段の処理サイクルタイムの比により一括して
処理するビット数を決定する処理ビット数決定手段、を
備え、前記アドレス検出手段により、一括処理可能な方
向以外のアドレス変化を検出するが、または前記画素デ
ータのビット数が処理ビット数決定手段のビット数と一
致した際、前記画素データを一括して画像メモリに書き
込むことを特徴とする。(d) Means for solving the problem The present invention provides means for setting starting point and ending point data of a line segment;
Line drawing means for creating a line segment according to start point and end point data; an image memory for storing pixel data created by the line drawing means; address detection means for detecting changes in addresses of the pixel data in both the X and Y directions; means for detecting the number of bits of the pixel data; processing bit number determining means for determining the number of bits to be processed at once based on a ratio of the cycle time of the image memory and the processing cycle time of the line drawing means; detecting an address change in a direction other than that in which batch processing is possible, or writing the pixel data in a batch to the image memory when the number of bits of the pixel data matches the number of bits of the processing bit number determining means; It is characterized by
(ホ)作用
本発明によれば、1回の画像メモリの読み出し及び書き
込みサイクルに対して、複数ドツトを同時に描画できる
。従って、描画速度を画像メモリのサイクルに無関係に
同時に描画するドツト数を増加させることにより向上さ
せることができる。(E) Function According to the present invention, a plurality of dots can be simultaneously drawn in one image memory read and write cycle. Therefore, the drawing speed can be improved by increasing the number of dots drawn simultaneously, regardless of the image memory cycle.
(へ)実施例 以下、本発明の実施例につき図面に従い説明する。(f) Example Embodiments of the present invention will be described below with reference to the drawings.
第1図は、本発明の一実施を示すブロック回路図である
。FIG. 1 is a block circuit diagram illustrating one implementation of the present invention.
第1図において、1は画像メモリであり、この画像メモ
リlは第3図に示すように、プロセッサの処理ビット数
に合わせてX方向の1アドレスに8ビツトづつ、Y方向
の1アドレスに対してはlビットづつメモリマツピング
されている。In Figure 1, 1 is an image memory, and as shown in Figure 3, this image memory l has 8 bits for each address in the X direction and 8 bits for each address in the Y direction, depending on the number of processing bits of the processor. The data is memory mapped in units of l bits.
30は画像メモリ1の書き込み及び読み出しアドレスを
設定するためのアドレス演算部であり、アドレスデータ
を格納するアドレスレジスタ2、アドレスを算出するた
めのパラメータが格納されるランダムアクセスメモリ(
以下、RAMと略記する。)からなるアドレスメモリ6
、およびこのアドレスメモリ6からのデータを加減算し
、アドレスを演算するアドレス演算回路5を備え、アド
レス演算回路5にてアドレス演算されたアドレスデータ
がアドレスレジスタ2及びアドレスメモリ6へ再格納さ
れる。30 is an address calculation unit for setting write and read addresses of the image memory 1, an address register 2 for storing address data, and a random access memory (for storing parameters for calculating addresses).
Hereinafter, it will be abbreviated as RAM. ) address memory 6 consisting of
, and an address arithmetic circuit 5 which adds and subtracts data from the address memory 6 and calculates an address.The address data subjected to the address calculation by the address arithmetic circuit 5 is stored again in the address register 2 and the address memory 6.
3は画像メモリlの書き込み及び読み出しのデータを格
納するデータレジスタである。3 is a data register for storing data written and read from the image memory l.
一方アドレス演算回路5からはデータバス4ヘアドレス
が変化する毎にキャリー出力を出力し、このキャリー出
力がバス4を介してコントローラ14に入力される。On the other hand, the address arithmetic circuit 5 outputs a carry output to the data bus 4 every time the address changes, and this carry output is input to the controller 14 via the bus 4.
コントローラ14はこのキャリー出力により、画像メモ
リ1のアドレス変化を検出する。The controller 14 detects a change in the address of the image memory 1 based on this carry output.
アドレスメモリ6の出力はメモリの各アドレスにより画
像メモリlに描画すべきドツト配列が記憶されたリード
・オンリ・メモリ(以下、ROMと略記する。)7.8
に与えられる。このROM7は第9図(a)に示すよう
に、アドレス(SXL)に対する配列(MRML)が記
憶され、ROM8は第9図(b)に示すようにアドレス
(SXR)に対して配列(MRMR)が記憶されている
。The output of the address memory 6 is a read-only memory (hereinafter abbreviated as ROM) 7.8 in which the dot array to be drawn in the image memory 1 is stored according to each address of the memory.
given to. This ROM7 stores an array (MRML) for the address (SXL) as shown in FIG. 9(a), and the ROM8 stores an array (MRMR) for the address (SXR) as shown in FIG. 9(b). is memorized.
この両ROM?、8からの出力はアンド回路9、マルチ
プレクサlO1及びオア回路12を介して画像データ処
理RAMIIに書き込まれ、このRAMIIから第4図
に示す描画すべき線のドツトデータがデータレジスタ3
に格納される。Both ROMs? .
is stored in
40は線描画処理回路で、プレゼンハムアルゴリズムに
基いて描画ドツトを演算するもので、レジスタ17.1
8.20およびマルチプレクサ16.19並びに加減算
器15より構成される。40 is a line drawing processing circuit which calculates drawn dots based on the Presentham algorithm, and register 17.1.
8.20, a multiplexer 16.19, and an adder/subtractor 15.
22は線描画の演算に用いられる各パラメータが格納さ
れるパラメータRAMであり、外部よりデータバス4を
介して入力される始点及び終点デーJ (XS、YS)
(XE、YE)並びにコノ両データに基くブレゼンハム
アルゴリズムのパラメータが格納される。更に、このパ
ラメータRAM22には、コントローラ14にて算出さ
れた画像メモリlのメモリサイクルタイムと線描画回路
40の処理サイクルタイムの比により決定される一括し
て画像メモリ1に書き込まれる処理ビット数(CNTE
)が設定される。Reference numeral 22 denotes a parameter RAM in which parameters used for line drawing calculations are stored, and the starting point and ending point data J (XS, YS) are input from the outside via the data bus 4.
(XE, YE) and parameters of the Bresenham algorithm based on both data are stored. Furthermore, this parameter RAM 22 stores the number of processing bits ( C.N.T.E.
) is set.
13は線描画回路40の処理サイクル数をカウントする
カウンタ、21は加減算器であり、パラメータRAM2
2の各データを演算し、各パラメータをパラメータRA
M22に再格納する。13 is a counter that counts the number of processing cycles of the line drawing circuit 40, 21 is an adder/subtractor, and the parameter RAM 2
2. Calculate each data and set each parameter as parameter RA.
Store again in M22.
23は第5図に示す線方向ベクトルのデータが格納され
るDIRレジスタである。23 is a DIR register in which data of the linear vector shown in FIG. 5 is stored.
次に、本発明の動作につき更に説明する。Next, the operation of the present invention will be further explained.
本実施例の画像メモリ1は第3図に示すように、Xアド
レスlに対して8ビツトすなわち1バイトに割り付けら
れている。従って、例えば、第3図に示すように、X方
向の1アドレスに3ビツトづつドツトを描画する場合、
従来においては、X方向のNo、 lのアドレスとX方
向のNo、 5のアドレスを3回アドレス指定し、読み
出して論理和をとって再書き込みを行なう処理が行なわ
れている。これに対して、本発明においては、メモリサ
イクルと線描画処理回路40の処理サイクルとの比によ
って決定される処理ビット数だけ、一括して画像メモリ
lに書き込むものである。In the image memory 1 of this embodiment, as shown in FIG. 3, 8 bits, ie, 1 byte, are allocated to the X address l. Therefore, for example, when drawing dots of 3 bits at each address in the X direction as shown in FIG.
Conventionally, the address No. 1 in the X direction and the address No. 5 in the X direction are specified three times, read out, logical summed, and rewritten. In contrast, in the present invention, the number of processing bits determined by the ratio of the memory cycle to the processing cycle of the line drawing processing circuit 40 is written into the image memory l at once.
本実施例においては、第7図に示すように1メモリサイ
クルに対して、線描画回路40の速度が3回の処理が可
能であるとし、1メモリサイクルに3回の演算を行なう
ものとする。In this embodiment, it is assumed that the speed of the line drawing circuit 40 is capable of processing three times per one memory cycle, as shown in FIG. 7, and three calculations are performed per one memory cycle. .
而して、画像メモリlのアドレスのアクセス条件が第8
図に示すように、ハツチングを施したドツトが矢印方向
に変化した場合コントローラ14は画像メモリ1に線ド
ツトデータを書き込むように11J御する。すなわち、
アドレスが第8図(a)に示すように、X方向に変化す
る場合、また同図(b)に示すようにX方向のアドレス
が変化する場合、或は同図(C)に示すように、1つ前
のメモリアクセスからの線描画処理回路40の処理サイ
クルタイムの合計がメモリサイクルに等しくなった時、
本実施例においては3回の処理が終った時に、夫々画像
メモリlをアクセスして画像メモリlにデータレジスタ
3から線描画ドツトを書き込む。Therefore, the access condition for the address of image memory l is the eighth
As shown in the figure, when the hatched dot changes in the direction of the arrow, the controller 14 controls 11J to write line dot data into the image memory 1. That is,
If the address changes in the X direction as shown in Figure 8(a), or if the address changes in the X direction as shown in Figure 8(b), or as shown in Figure 8(C), , when the total processing cycle time of the line drawing processing circuit 40 from the previous memory access becomes equal to the memory cycle,
In this embodiment, when three processes are completed, the image memory 1 is accessed and line drawing dots are written from the data register 3 into the image memory 1.
さて、上述した動作を第1図を参照して説明すると、先
ず線分の始点(XS、YS)及び終点データ(XE、Y
E)を外部よりデータバス4を介して、パラメータRA
M22の夫々の領域に格納するとともに、このデータに
基きブレゼンハムアルゴリズムの各パラメータが演算さ
れ、夫々パラメータRAM22の所定領域に格納される
。この一連の作業はコントローラ14の制御の下で実行
される。Now, to explain the above-mentioned operation with reference to FIG.
E) from the outside via data bus 4, the parameter RA
Each parameter of the Bresenham algorithm is calculated based on this data, and each parameter is stored in a predetermined area of the parameter RAM 22. This series of operations is executed under the control of the controller 14.
更に、このパラメータRAM22には図形描画処理回路
40の処理サイクルタイムを1としたときのメモリサイ
クルタイムとの比が変数CNTEとして与えられる。本
実施例においては3が格納されている。Furthermore, the ratio of the memory cycle time when the processing cycle time of the graphic drawing processing circuit 40 is set to 1 is given to the parameter RAM 22 as a variable CNTE. In this embodiment, 3 is stored.
このパラメータ22から各データがブレゼンハムアルゴ
リズムに基いて線を描画する線描画回路40の各レジス
タ17.18及び20に与えられる。このレジスタ17
.18.20にて後述するディジタル微分解析(DDA
)により線分の各描画ドツトが演算され、マルチプレク
サ16及び加減算器15を介してコントローラ14に与
えられる。コントローラ14はこの作成データをアドレ
ス演算部30に与える。Each data from this parameter 22 is given to each register 17, 18 and 20 of a line drawing circuit 40 which draws a line based on the Bresenham algorithm. This register 17
.. Digital differential analysis (DDA) will be discussed later in 18.20.
), each drawing dot of the line segment is calculated and provided to the controller 14 via the multiplexer 16 and the adder/subtractor 15. The controller 14 provides this created data to the address calculation section 30.
アドレス演算部30においては、上述の作成データをア
ドレスメモリ6に入力し、このアドレスメモリ6に入力
されたデータと前回に入力されたデータとが比較され、
上述したアドレスの変化があるか否かコントローラ14
は判断する。In the address calculation section 30, the above-mentioned created data is input to the address memory 6, and the data input to the address memory 6 is compared with the data input last time.
The controller 14 determines whether there is a change in the address described above.
is to judge.
またカウンタ13には描画処理回路40の処理サイクル
数がカウントされる。すなわち、描画処理回路40が処
理する毎にカウンタ13がカウントアツプされ、このカ
ウンタ13の値とパラメータRAM22のCNTEの値
が比較される。Further, the counter 13 counts the number of processing cycles of the drawing processing circuit 40. That is, each time the drawing processing circuit 40 processes, the counter 13 counts up, and the value of this counter 13 is compared with the value of CNTE of the parameter RAM 22.
そして、描画処理回路40からの作成データが前述した
第8図に示すアクセス条件を満足すると、アドレス演算
部30にて作成された画像メモリ1のアドレスをアクセ
スするとともに、ROM7.8をアクセスしその両配列
パターンをアンド回路9でアンドした描画ドツトをデー
タレジスタ3を介して画像メモリ1に書き込むことによ
り、lメモリサイクル内に複数ドツトを一度に画像メモ
リlに書き込まれる。そして、第6図に示すように、画
像メモリl内に線が描画される。When the created data from the drawing processing circuit 40 satisfies the access conditions shown in FIG. By writing the drawn dots obtained by ANDing both array patterns in the AND circuit 9 to the image memory 1 via the data register 3, a plurality of dots are written to the image memory 1 at once within 1 memory cycle. Then, as shown in FIG. 6, a line is drawn in the image memory l.
次に本実施例の動作につき第1O図のフローチャートに
従い更に説明する。Next, the operation of this embodiment will be further explained according to the flowchart of FIG. 1O.
動作を開始すると、ステップSlにおいて、各レジスタ
並びにパラメータRAM22を初期化し、更に、パラメ
ータRAM22のCNTEに一括して画像メモリlに描
画できるビット数を書き込み、ステップS2へ進む。When the operation starts, each register and the parameter RAM 22 are initialized in step S1, and the number of bits that can be drawn in the image memory l is written all at once into CNTE of the parameter RAM 22, and the process proceeds to step S2.
ステップS2において、線描画のために外部よりデータ
バス4を介して入力された始点(XS、YS)及び終点
(XE%YE)のデータをパラメータRAM22の所定
領域に格納する。In step S2, the data of the start point (XS, YS) and end point (XE%YE) input from the outside via the data bus 4 for line drawing are stored in a predetermined area of the parameter RAM 22.
続いて、プレゼンハムアルゴリズムに基きX座標とY座
標の始点と終点間の距離を求める。すなわち、DX=X
E−XS、DY=YE−YS(7)演算が行なわれ、そ
の演算結果がパラメータRAM22の所定領域に格納さ
れる。そして、第5図に示す線ベクトルの方向を示すD
IRを二進数で標記したフラグの3ビツト目に相当する
フラグFLlを” 1″と仮定し、パラメータRAM2
2に格納しステップS4へ進む。Next, the distance between the starting point and the ending point of the X and Y coordinates is determined based on the Presentham algorithm. That is, DX=X
E-XS, DY=YE-YS (7) calculation is performed, and the calculation result is stored in a predetermined area of the parameter RAM 22. Then, D indicates the direction of the line vector shown in FIG.
Assuming that the flag FLl corresponding to the 3rd bit of the flag representing IR as a binary number is "1", the parameter RAM2
2 and proceeds to step S4.
ステップS4において、DYが正か負か判断され、負の
場合にはステップS5に進み、DYに”−1′°をかけ
てその値をパラメータRAM22の所定領域に再格納し
、フラグFLIを0″に設定した後、ステップS6に進
む。In step S4, it is determined whether DY is positive or negative. If it is negative, the process proceeds to step S5, where DY is multiplied by "-1'°, the value is re-stored in a predetermined area of the parameter RAM 22, and the flag FLI is set to 0. '', the process advances to step S6.
ステップS4において、DYが正の場合はそのままステ
ップS6へ進む。In step S4, if DY is positive, the process directly advances to step S6.
ステップS6において、DXが正か負か判断され、負の
場合にはステップS7に進み、DXに”−1″をかけて
その値をパラメータRAM22の所定領域に再格納し、
DIRを二進数で標記したフラグの2ビツト目に相当す
るフラグFL2を”1″に設定した後ステップS8へ進
む。In step S6, it is determined whether DX is positive or negative, and if it is negative, the process proceeds to step S7, where DX is multiplied by "-1" and the value is re-stored in a predetermined area of the parameter RAM 22.
After setting the flag FL2, which corresponds to the second bit of the flag indicating DIR in binary, to "1", the process proceeds to step S8.
ステップS6において、DXが正の場合はそのままステ
ップS8へ進む。In step S6, if DX is positive, the process directly advances to step S8.
ステップS8において、X方向とY方向の傾きがどちら
が大きいか、すなわち、DX<DYを判断し、Y方向の
傾きが大きい(DX<DY)場合、ステップS9におい
て、DXとDYを入れ替え、DIRを二進数で標記した
フラグの1ビツト目に相当するフラグFL3を”ビに設
定した後、ステップS10へ進む。In step S8, it is determined which of the inclinations in the X direction and the Y direction is larger, that is, DX<DY. If the inclination in the Y direction is larger (DX<DY), in step S9, DX and DY are exchanged, and DIR is After setting the flag FL3, which corresponds to the first bit of the flag expressed in binary, to "bi", the process proceeds to step S10.
またX方向の傾きが大きい、すなわちDXがDYより大
きい場合にはそのままステップSIOへ進む。このとき
FL3は初期設定のままの0″である。If the inclination in the X direction is large, that is, DX is larger than DY, the process directly proceeds to step SIO. At this time, FL3 remains at the initial setting of 0''.
そして、ステップSIOにおいて、線方向ベクトルDI
Rを求めてその値をDIRレジスタ″?3へ格納し、更
にプレゼンハムアルゴリズムに基くパラメータのC0N
52を算出して、対応のレジスタ17に格納する。Then, in step SIO, the linear direction vector DI
Calculate R, store the value in the DIR register "?3, and then calculate the parameter C0N based on the Presentham algorithm.
52 is calculated and stored in the corresponding register 17.
更にステップSitにおいて、プレゼンハムアルゴリズ
ムのパラメータの誤差E及びC0N5Lを算出し、夫々
対応のレジスタ18.20に格納しステップ312へ進
む。Furthermore, in step Sit, the errors E and C0N5L of the parameters of the Presentham algorithm are calculated and stored in the corresponding registers 18 and 20, respectively, and the process proceeds to step 312.
ステップS12において、パラメータRAM22のX、
Y領域に夫々xS%YSを格納するとともに、絶対アド
レスSXを求めパラメータRAM22の所定領域に格納
し、ステップS13へ進む。In step S12, X of the parameter RAM 22,
While storing xS%YS in each Y area, the absolute address SX is determined and stored in a predetermined area of the parameter RAM 22, and the process advances to step S13.
ステップ313において、線分カウンタC1をカウント
アツプし、そのカウント値をパラメータRAM22の所
定領域に格納する。In step 313, the line segment counter C1 is counted up and the count value is stored in a predetermined area of the parameter RAM 22.
続いて、ステップS14において、線描画処理回路40
の処理サイクル数をカララントするカウウンタ13をカ
ウントアツプし、ステップS15へ進む。Subsequently, in step S14, the line drawing processing circuit 40
The counter 13 counts up the number of processing cycles, and the process advances to step S15.
ステップS15においては、アドレスメモリ6の領域x
O及びYにパラメータRAM22のX及びYの値を格納
し、画像メモリlのアドレスを演算する。そして、アド
レスメモリ6のxOの下位ビットによりROM7がアク
セスされる。すなわち、この下位ビットが第9図(b)
のSXHに相当する。In step S15, the area x of the address memory 6
The values of X and Y of the parameter RAM 22 are stored in O and Y, and the address of the image memory l is calculated. Then, the ROM 7 is accessed by the lower bits of xO of the address memory 6. That is, this lower bit is shown in FIG. 9(b).
This corresponds to SXH.
そして、ステップS16において、サブルーチンDDA
Iを呼び出す。サブルーチンDDAlは第11図(a)
に示すように、ディジタル微分解析(DDA)により、
線方向ベクトル(D I R)に対して、次描画のXY
アドレスを求め、このアドレスをアドレス演算部30に
逐次与え、アドレスメモリ6を書き換える。サブルーチ
ンDDA 1が終了すると、ステップS17へ進む。こ
のとき第8図(a)に示す条件が発生するときはパラメ
ータRAM22のフラグFLが”1′′に設定される。Then, in step S16, subroutine DDA
Call I. The subroutine DDAl is shown in FIG. 11(a).
As shown in , by digital differential analysis (DDA),
For the line direction vector (D I R), the XY of the next drawing
The address is determined, and the address is sequentially given to the address calculation section 30 to rewrite the address memory 6. When subroutine DDA 1 ends, the process advances to step S17. At this time, when the condition shown in FIG. 8(a) occurs, the flag FL in the parameter RAM 22 is set to "1''.
ステップS17においては、プレゼンハムアルゴリズム
に基いて、レジスタ20の値が”O″より大きいか否か
判断され、′0”より大きい場合はステップS18へ進
み、小さい場合にはステップS19に進む。In step S17, it is determined whether the value of the register 20 is greater than "0" based on the Presentham algorithm. If it is greater than '0', the process proceeds to step S18, and if it is smaller, the process proceeds to step S19.
EがO”より大きい場合には、ステップ818において
、サブルーチンDDA2を呼び出すとともに、レジスタ
2のEの値とレジスタ18の値を加算器15にて加算し
、レジスタ20に再格納する。サブルーチンDDA2は
第11図(b)に示すように、ディジタル微分解析によ
り、線方向ベクトル(D I R)に対して、次描画の
XYアドレスを求め、このアドレスをアドレス演算部3
0に逐次与え、アドレスメモリ6を書き換える。サブル
ーチンDDA2が終了すると、ステップS20へ進む、
このとき第8図(a)に示す条件が発生するときはパラ
メータRAM22のフラグPLが1″に設定される。If E is larger than O'', in step 818, subroutine DDA2 is called, and the value of E in register 2 and the value in register 18 are added in adder 15 and stored in register 20 again. As shown in FIG. 11(b), the XY address of the next drawing is determined for the line direction vector (DIR) by digital differential analysis, and this address is sent to the address calculation unit 3.
0 successively and rewrites the address memory 6. When subroutine DDA2 ends, the process advances to step S20.
At this time, when the condition shown in FIG. 8(a) occurs, the flag PL in the parameter RAM 22 is set to 1''.
一方、ステップS19においては、プレゼンハムアルゴ
リズムに基いて、レジスタ20の値とレジスタ17の値
を加算器15により加算し、その値をレジスタ20に再
格納し、ステップS20に進む。On the other hand, in step S19, the value of the register 20 and the value of the register 17 are added by the adder 15 based on the Presentham algorithm, the resulting value is stored again in the register 20, and the process proceeds to step S20.
ステップS20において、新しく算出したXアドレスの
絶対アドレスを求めステップS21に進む。In step S20, the absolute address of the newly calculated X address is determined and the process proceeds to step S21.
ステップS21において、カウンタ13の値CNTと1
を比較し、CNTが1と等しい、すなわちそのY座標の
Xアドレスの最初となるとステップS22に進む。In step S21, the value CNT of the counter 13 and 1
When CNT is equal to 1, that is, it is the first X address of the Y coordinate, the process advances to step S22.
ステップS22においては、アドレスメモリ6に格納さ
れたxOの下位ビットによりROM7がアクセスされる
。すなわち、この下位ビットが第9図(a)のSXLに
相当する。そして、ステップS23に進む。In step S22, the ROM 7 is accessed using the lower bits of xO stored in the address memory 6. That is, this lower bit corresponds to SXL in FIG. 9(a). Then, the process advances to step S23.
一方、ステップS21において、CNTとCNTEが等
しくない場合にはそのままステップS23に進む。On the other hand, in step S21, if CNT and CNTE are not equal, the process directly advances to step S23.
ステップS23においては、第8図に示す条件を満足す
るか否か、すなわち、一括して画像メモリ1に描画ドツ
トを書き込むために画像メモリ1をアクセスするか否か
が判断される。そして、第8図に示すいずれかの条件を
満足するとステップS24に進み、いずれも満足しない
場合にはステップS26へ進む。In step S23, it is determined whether the conditions shown in FIG. 8 are satisfied, that is, whether or not the image memory 1 is to be accessed in order to write drawn dots in the image memory 1 all at once. If any of the conditions shown in FIG. 8 is satisfied, the process proceeds to step S24, and if none of the conditions are satisfied, the process proceeds to step S26.
ステップS24において、画像メモリ1の物理アドレス
を求め、そして、xOの下位ビットによりROM8をア
クセスする。この下位ビットが第9図(b)のSXRに
相当する。更に、カウンタ13をクリアし、ステップS
25に進む。In step S24, the physical address of the image memory 1 is determined, and the ROM 8 is accessed using the lower bits of xO. This lower bit corresponds to SXR in FIG. 9(b). Furthermore, the counter 13 is cleared and step S
Proceed to step 25.
ステップS25において、画像メモリlに算出した描画
ドツトを一括して書き込む。すなわち、第4図に示すよ
うに、ROM?、8の出力がアンド回路9、オア回路1
2を介してデータ処理RAM1lに書き込まれていたデ
ータがデータレジスタ3から、アドレス演算部30でア
ドレス指定された領域に書き込まれる。例えば第3図お
よび第6図の例においてはXアドレス1.Yアドレス5
の領域に3ドツトが1メモリサイクルで一括して描画さ
れる。In step S25, the calculated drawing dots are written in the image memory 1 all at once. That is, as shown in FIG. 4, ROM? , 8 output is AND circuit 9, OR circuit 1
The data that had been written to the data processing RAM 1l via the data register 2 is written from the data register 3 to the area specified by the address calculation unit 30. For example, in the examples of FIGS. 3 and 6, X address 1. Y address 5
Three dots are drawn in one memory cycle in the area.
その後、ステップS26においては、線描画のカウンタ
値C1がDXと等しくなったか否か判断され、等しくな
っていない場合には線分が描画されていないので、ステ
ップS13に戻り前述の動作を繰り返す。また等しくな
ったときには線分の描画が終了したので、ステップS2
7へ進む。Thereafter, in step S26, it is determined whether or not the line drawing counter value C1 has become equal to DX. If not, the line segment has not been drawn, and the process returns to step S13 to repeat the above-described operation. When they are equal, the drawing of the line segment has ended, so step S2
Proceed to step 7.
そして、ステップS27において、終点の物理アドレス
を求め、ステップS28において、終点のドツトを画像
メモリ1に描画することにより動作を終了する。Then, in step S27, the physical address of the end point is determined, and in step S28, the end point dot is drawn in the image memory 1, thereby terminating the operation.
第2図は本発明の第二の実施例を示すもので、第1図の
実施例と相違するところは、第1図のものにおいては、
ドツト配列を二つのROM7.8に記憶せしめ、その両
者の値をアンド回路10で論理積をとっているのに対し
て、第二の実施例のものにおいては、第9図(C)に示
すパターン配列を有する一個のROM7aを用いて、ア
ンド回路を省略したものであり、その他の構成は第1図
のものと同じである。FIG. 2 shows a second embodiment of the present invention, and the differences from the embodiment in FIG. 1 are as follows:
The dot array is stored in two ROMs 7.8, and the AND circuit 10 calculates the logical product of both values.In contrast, in the second embodiment, as shown in FIG. 9(C) One ROM 7a having a pattern arrangement is used, and the AND circuit is omitted, and the other configuration is the same as that of FIG. 1.
第12図は第2図に示した本発明の第二の実施例の動作
を示すフローチャートである。上述したように、第一の
実施例と第二の実施例とはドツト配列を記憶したROM
構成のみ相違しているので、このフローチャートにおい
てもその部分のみ相違する。すなわち、ステップ515
aとステップ824aのみ相違すると共に、第10図の
ステップ821.22が省略されている。この両者のス
テップにおいてもROMのアクセスが相違するだけであ
り、実質的には第10図のものと変りはない。FIG. 12 is a flowchart showing the operation of the second embodiment of the present invention shown in FIG. As mentioned above, the first embodiment and the second embodiment use a ROM that stores the dot array.
Since only the configuration is different, only that part is different in this flowchart. That is, step 515
Only step a and step 824a are different, and step 821.22 in FIG. 10 is omitted. Both steps differ only in the access to the ROM, and are substantially the same as those in FIG. 10.
また、その他のステップは第10図と同じであり、ここ
では同じステップ番号を付し説明を省略する。Further, the other steps are the same as those in FIG. 10, so the same step numbers are given here and the explanation is omitted.
(ト)発明の効果
上述したように、本発明によれば、1回の画像メモリの
読み出し及び書き込みサイクルに対して、複数ドツトを
同時に描画できる。従って、描画速度を画像メモリのサ
イクルに無関係に同時に描画するドツト数を増加させる
ことにより向上させることができる。(G) Effects of the Invention As described above, according to the present invention, a plurality of dots can be simultaneously drawn in one image memory read and write cycle. Therefore, the drawing speed can be improved by increasing the number of dots drawn simultaneously, regardless of the image memory cycle.
第1図は本発明の第一の実施例を示すブロック回路図、
第2図は本発明の第二の実施例を示すブロック回路図で
ある。
第3図は本発明に用いられる画像メモリの格納領域を示
す模式図、第4図は画像メモリに書き込むドツトを示す
模式図である。
第5図は線方向ベクトルを示す説明図、第6図は本発明
により線描画を行なった状態を示す模式図、第7図はメ
モリサイクルと演算処理サイクルの関係を示すタイミン
グ図である。
第8図は本発明の画像メモリへの書き込み条件を示す模
式図。
第9図は本実施例のアドレスとドツト配列の関係を示す
図である。
第10図は本発明の第一の実施例の動作を説明−するフ
ローチャート、第11図はディジタル微分解析を示すフ
ローチャート、第12図は本発明の第二の実施例の動作
を説明するフローチャートである。
1・・・画像メモ1ハ 14・・・コントローラ。
22・・・パラメータ、30・・・アドレス演算部、4
0・・・線描画回路。
第2
図
第
図
第
図
第10図(b)
A
第10図(C)
第11図(a)
第11図(b)
第12図(b)
第12図(C)FIG. 1 is a block circuit diagram showing a first embodiment of the present invention;
FIG. 2 is a block circuit diagram showing a second embodiment of the present invention. FIG. 3 is a schematic diagram showing the storage area of the image memory used in the present invention, and FIG. 4 is a schematic diagram showing dots written in the image memory. FIG. 5 is an explanatory diagram showing line direction vectors, FIG. 6 is a schematic diagram showing a state in which line drawing is performed according to the present invention, and FIG. 7 is a timing chart showing the relationship between memory cycles and arithmetic processing cycles. FIG. 8 is a schematic diagram showing conditions for writing to an image memory according to the present invention. FIG. 9 is a diagram showing the relationship between addresses and dot arrays in this embodiment. FIG. 10 is a flowchart explaining the operation of the first embodiment of the invention, FIG. 11 is a flowchart showing digital differential analysis, and FIG. 12 is a flowchart explaining the operation of the second embodiment of the invention. be. 1... Image memo 1c 14... Controller. 22...Parameter, 30...Address calculation section, 4
0...Line drawing circuit. Figure 2 Figure 10 (b) A Figure 10 (C) Figure 11 (a) Figure 11 (b) Figure 12 (b) Figure 12 (C)
Claims (1)
及び終点データに従って線分を作成する線描画手段、こ
の線描画手段にて作成された画素データを記憶する画像
メモリ、画素データのX、Y方向の両アドレスの変化を
検出するアドレス検出手段、前記画素データのビット数
を検出する手段、前記画像メモリのサイクルタイムと線
描画手段の処理サイクルタイムの比により一括して処理
するビット数を決定する処理ビット数決定手段、とを備
え、 前記アドレス検出手段により、一括処理可能な方向以外
のアドレス変化を検出するか、または前記画素データの
ビット数が処理ビット数決定手段のビット数と一致した
際、前記画素データを一括して画像メモリに書き込むこ
とを特徴とする図形描画装置。(1) A means for setting the starting point and end point data of a line segment, a line drawing means for creating a line segment according to the starting point and end point data, an image memory for storing pixel data created by this line drawing means, an X of the pixel data , address detection means for detecting changes in both addresses in the Y direction, means for detecting the number of bits of the pixel data, and the number of bits to be processed at once based on the ratio of the cycle time of the image memory and the processing cycle time of the line drawing means. processing bit number determining means for determining the number of processing bits, and the address detecting means detects an address change in a direction other than that in which batch processing is possible, or the number of bits of the pixel data is equal to the number of bits of the processing bit number determining means. A graphic drawing device characterized in that when a match occurs, the pixel data is written all at once into an image memory.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2-136515 | 1990-05-25 | ||
JP13651590 | 1990-05-25 |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04117582A true JPH04117582A (en) | 1992-04-17 |
Family
ID=15176982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP21075890A Pending JPH04117582A (en) | 1990-05-25 | 1990-08-08 | Graphic plotting device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04117582A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10172340B2 (en) | 2015-06-23 | 2019-01-08 | Jean-Rene BERNARDINI | Portage system for fishing rods, spikes and accessories |
-
1990
- 1990-08-08 JP JP21075890A patent/JPH04117582A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10172340B2 (en) | 2015-06-23 | 2019-01-08 | Jean-Rene BERNARDINI | Portage system for fishing rods, spikes and accessories |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2541539B2 (en) | Graphic processing device | |
US4716533A (en) | Image translation system | |
US4845656A (en) | System for transferring data between memories in a data-processing apparatus having a bitblt unit | |
EP0416421B1 (en) | A clipping processor | |
US4998211A (en) | Method of and apparatus for generating a filled pattern defined by contour vectors | |
US5867172A (en) | Thickened and thinned character generating device including elements for removing undesirably formed outline portions | |
US5269000A (en) | Curve generator | |
US5020002A (en) | Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system | |
JP2634851B2 (en) | Image processing device | |
JPH0640259B2 (en) | Data processing device | |
JPS60136793A (en) | Image processor | |
JPH04117582A (en) | Graphic plotting device | |
US5475809A (en) | Method and apparatus for generating high-quality character pattern defined by edge lines | |
JP2770582B2 (en) | Figure filling device | |
US5428719A (en) | Method and apparatus for generating high-quality pattern in accordance with an edge defining a character pattern | |
EP0391401A2 (en) | Method and apparatus for generating high-quality pattern | |
JP2980732B2 (en) | How to generate outline fonts | |
JP2630843B2 (en) | Straight line drawing method and apparatus | |
JP2985275B2 (en) | Character generation method of outline font | |
JP2606176B2 (en) | Graphic processing unit | |
JP2605609B2 (en) | Dot display processing device | |
JPH0418686A (en) | Picture processing method | |
JPS6169096A (en) | Graphic processing device | |
JPH0766349B2 (en) | Shifter circuit | |
JPH09169150A (en) | Developing circuit |