[go: up one dir, main page]

JPH03196379A - Drawing calculation processing unit - Google Patents

Drawing calculation processing unit

Info

Publication number
JPH03196379A
JPH03196379A JP1337326A JP33732689A JPH03196379A JP H03196379 A JPH03196379 A JP H03196379A JP 1337326 A JP1337326 A JP 1337326A JP 33732689 A JP33732689 A JP 33732689A JP H03196379 A JPH03196379 A JP H03196379A
Authority
JP
Japan
Prior art keywords
dot
flag register
flag
straight line
calculation
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
Application number
JP1337326A
Other languages
Japanese (ja)
Inventor
Yasuhiko Takahashi
保彦 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Steel Corp
Original Assignee
Nippon Steel Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP1337326A priority Critical patent/JPH03196379A/en
Publication of JPH03196379A publication Critical patent/JPH03196379A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To increase the drawing speed by providing two flag registers and leaving the state of a status flag for judging information regarding a dot generated on the last scanning line of the same straight line in a 2nd flag register when the area of part between two given straight lines is filled. CONSTITUTION:The two flag registers are provided and the contents of the 1st flag register 16 are transferred to and stored in the 2nd flag register 17 before the contents of the 1st flag register 16 are updated by performing arithmetic regarding a new dot generation point by an arithmetic means 13. Therefore, the status flag for grasping the information (e.g. cumulative error) regarding the last dot generated on the 1st straight line is left in the 2nd flag register 17. Consequently, the information regarding the last dot on the same straight line can easily and accurately be grasped only by referring to the 2nd flag register 17 to fill the area of part between the two straight lines at a high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、例えばCRTにおけるラスクスキャン方式の
ように、ドツト発生点がマトリックス状に配列されたド
ツトパターン形成面に各スキャンライン毎にドツトを発
生させて図形を描画するための描画演算処理装置に関し
、特に、与えられた2直線間の塗り潰し処理を高速に行
うのに適した装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention is a method of forming dots for each scan line on a dot pattern forming surface in which dot generation points are arranged in a matrix, for example in the rask scan method of CRT. The present invention relates to a drawing arithmetic processing device for generating and drawing figures, and particularly to a device suitable for performing high-speed filling processing between two given straight lines.

〔従来の技術〕[Conventional technology]

近年、この種の描画演算処理装置に、汎用のマイクロコ
ンピュータが使用されるようになってきている。汎用の
マイクロコンピュータの中央処理装置(CPU)は、通
常、演算回路(ALU)と、二のALUの演算結果を一
時保持するアキュムレータ(ACC)と、演算の結果生
じる桁上がり等のステータスフラグを記憶するフラグレ
ジスタを備えている。このフラグレジスタは、演算結果
の状態(符号、桁上がりの有無等)を示すもので、AL
Uは次のステップの演算において、前ステップの演算の
結果生じたフラグがフラグレジスタから入力されていな
ければプログラム通りの演算を行えなくなる。
In recent years, general-purpose microcomputers have come to be used as this type of drawing arithmetic processing device. The central processing unit (CPU) of a general-purpose microcomputer usually has an arithmetic unit (ALU), an accumulator (ACC) that temporarily holds the calculation results of the second ALU, and a status flag such as a carry that occurs as a result of the calculation. It has a flag register to This flag register indicates the status of the operation result (sign, presence or absence of carry, etc.).
In the calculation of the next step, U will not be able to perform the calculation according to the program unless the flag generated as a result of the calculation of the previous step is input from the flag register.

ところで、描画プロセスの中で頻繁に行われる作業とし
て、2本の直線を引き、その2本の直線の間を塗り潰す
作業がある。この作業は、例えば第3図に示すように、
ラスクスキャン方向(水平方向)の1スキヤンライン毎
に、第1の直線り。
By the way, as a frequently performed task in the drawing process, there is a task of drawing two straight lines and filling in the space between the two straight lines. This work can be done, for example, as shown in Figure 3.
For each scan line in the rask scan direction (horizontal direction), the first straight line is drawn.

に対応するドツト発生点の位置を計算する第1のステッ
プと、第2の直線L2に対応するドツト発生点の位置を
計算する第2のステップと、計算によって求められた上
記2つのドツト発生点及びその間の全てのドツト発生点
にドツトを発生させる第3のステップの3つのステップ
を繰り返す作業である。
A first step of calculating the position of the dot generation point corresponding to the second straight line L2, a second step of calculating the position of the dot generation point corresponding to the second straight line L2, and a second step of calculating the position of the dot generation point corresponding to the second straight line L2. This is a process of repeating three steps: (1) and (3) generating dots at all dot generating points between them.

各直線り、、L2の発生には、通常、r Bresen
hamの線描画アルゴリズム」と呼ばれる方法が用いら
れる。このr Bresenhamの線描画アルゴリズ
ム」については、図形処理情報センター出版の雑誌rP
 I XELJ NO,11の101〜107ページに
記載されているが、第4図を参照して簡単に説明すると
、例えばX軸に対する傾きが456より小さい直線!を
描画する場合、図示のように、確定したドツトDo(X
+、yI)に対してX軸方向に1移動した点DI (X
+ +1.  yI )と、X軸方向及びY軸方向に夫
々1移動した点Dz  (x+ +1゜yI+1)を計
算し、これらの点D+−Diと理想直線lとの間の誤差
を夫々求め、その誤差の小さい方の点を描画点として確
定して、そこにドツトを発生させる。以下同様にして直
線!を表現するためのドツトパターンを形成する。
For the generation of each straight line, , L2, typically r Bresen
A method called "Ham's line drawing algorithm" is used. Regarding this r Bresenham's line drawing algorithm, please refer to the magazine rP published by Graphic Processing Information Center.
IXELJ NO. 11, pages 101 to 107, but to briefly explain with reference to FIG. 4, for example, a straight line whose slope with respect to the X axis is smaller than 456! When drawing a fixed dot Do(X
+, yI), the point DI (X
+ +1. yI) and a point Dz (x+ +1°yI+1) moved by one in the X-axis direction and the Y-axis direction, respectively, calculate the errors between these points D+-Di and the ideal straight line l, and calculate the error. The smaller point is determined as the drawing point and a dot is generated there. Do the same and make a straight line! Form a dot pattern to express

この演算を、整数値のみを用いて行うようにしたのがr
 Bresenhamの線描画アルゴリズムJである。
This operation is performed using only integer values.
This is Bresenham's line drawing algorithm J.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

コ(D r Bresenhamの線描画アルゴリズム
」を用いて、第3図で説明したような2直線間の塗り潰
し作業を行う場合、直線り、、L、に対応したドツトを
発生させるためには、直線L+、Lxの各々において、
1つ前に発生させたドツトに関する情報(例えば、累積
誤差等)が無いと次のドツトを発生させることができな
い。例えば、第3図において、直線り、のドツトCを発
生させるためには、同じ直線り、の1つ前のドラI−a
に関する情報が必要である。
When filling in between two straight lines as explained in Figure 3 using Dr. Bresenham's line drawing algorithm, in order to generate dots corresponding to the straight lines L, In each of L+ and Lx,
The next dot cannot be generated unless there is information regarding the previous dot (for example, cumulative error, etc.). For example, in FIG. 3, in order to generate dot C along a straight line, the dot I-a just before the same straight line must be
information is needed.

しかし、この2直線間の塗り潰し作業においては、既述
した3つのステップを繰り返すことにより、直線L1の
ドラ)aの計算の次には、直線L2のドツトbの計算に
移ってしまい、直線L1のドツトCの発生位置を求める
ための計算を行う時点では、ドツトaを発生させる際に
行った計算時のフラグレジスタの内容は消えてしまって
いる。このため、従来のマイクロコンピュータを用いた
システムでは、ドツトCの発生位置を計算する際に必要
な情報をCPUとは別のメモリに記憶させておき、これ
を読み出して使うようにするか、或いは、ドラ)aの発
生時に得られた計算結果の状態を、フラグレジスタを用
いずに判定するための特別のステップを設けることが必
要となり、結果として、全体の描画速度が遅くなるとい
う問題点があった。
However, in the filling operation between these two straight lines, by repeating the three steps described above, after calculating the dot a of the straight line L1, the calculation moves to the dot b of the straight line L2, and the calculation of the dot b of the straight line L1 At the time when the calculation for determining the generation position of dot C is performed, the contents of the flag register at the time of the calculation performed when generating dot A have disappeared. For this reason, in systems using conventional microcomputers, the information necessary to calculate the location of the dot C is stored in a memory separate from the CPU and read out for use. , dora) It is necessary to provide a special step to determine the state of the calculation result obtained when a occurs without using a flag register, and as a result, there is a problem that the overall drawing speed becomes slower. there were.

そこで本発明は、上記の問題点を解決して、与えられた
2直線間を塗り潰す作業を、従来周知の描画演算処理装
置よりも高速で行うことのできる描画演算処理装置を提
供することをその課題とするものである。
SUMMARY OF THE INVENTION Therefore, the present invention aims to solve the above-mentioned problems and provide a drawing arithmetic processing device that can fill in the space between two given straight lines at a higher speed than conventional drawing arithmetic processing devices. This is the issue to be addressed.

〔課題を解決するための手段〕[Means to solve the problem]

上記課題を解決するための本発明による描画演算処理装
置は、例えば第1図に示すように、ドツト発生点がマト
リックス状に配列されたドツトパターン形成面(例えば
ビットマツプメモリ6内に展開された仮想的な概念であ
って良い。)に各スキャンライン毎にドツトを発生させ
て図形を描画するための描画演算処理装置において、=
5= 与えられた2直線間を塗り潰す処理を行う際に、前記ス
キャンライン毎に前記2直線に対応するドツトの発生点
の位置を夫々求めるための演算を行う演算手段13と、 前記演算手段13において1つのドツト発生点に関する
前記演算が終了した時点で、その演算の結果体じたステ
ータスフラグを記憶する第1のフラグレジスタ16と、 前記演算手段13において次のドツト発生点に関する前
記演算を行う前に前記第1のフラグレジスタ16の内容
を取り込んで記憶する第2のフラグレジスタ17と、 前記演算手段13の演算結果に基づいて決定された、1
つのスキャンライン上における前記2直線に対応する2
つのドツト発生点及びその間に存在する全てのドツト発
生点にドツトを発生させるドツト発生手段(例えば、実
施例の塗り潰し回路5)とを有している。
The drawing arithmetic processing device according to the present invention for solving the above problems has a dot pattern forming surface (for example, a dot pattern formed in a bitmap memory 6) in which dot generation points are arranged in a matrix, as shown in FIG. (It may be a virtual concept.) In a drawing arithmetic processing device for drawing a figure by generating dots for each scan line, =
5= Calculating means 13 for calculating the positions of the points of occurrence of dots corresponding to the two straight lines for each scan line when performing the process of filling in the space between the two given straight lines; and the calculating means. When the calculation regarding one dot generation point is completed in step 13, the first flag register 16 stores the status flag recorded as a result of the calculation, and the calculation means 13 executes the calculation regarding the next dot generation point. a second flag register 17 that captures and stores the contents of the first flag register 16 before execution;
2 corresponding to the two straight lines on the two scan lines
The dot generating means (for example, the filling circuit 5 of the embodiment) generates dots at one dot generating point and all the dot generating points existing therebetween.

〔作用〕[Effect]

本発明の描画演算処理装置においては、フラグレジスタ
を2個設け、第1のフラグレジスタ16の内容が、演算
手段13が新たなドツト発生点に関する演算を行うこと
によって更新される前に、その第1のフラグレジスタ1
6の内容を第2のフラグレジスタ17に転送して記憶さ
せるようにしている。
In the drawing arithmetic processing device of the present invention, two flag registers are provided, and before the contents of the first flag register 16 are updated by the arithmetic means 13 performing an operation regarding a new dot generation point, the contents of the first flag register 16 are updated. 1 flag register 1
6 is transferred to the second flag register 17 and stored therein.

従って、与えられた2直線間を塗り潰す作業において、
第1の直線に対応するドツト発生点の位置を求めるため
の演算を行った後、第2の直線に対応するドツト発生点
の位置を求める演算を行い、次に再び第1の直線に対応
するドツト発生点の位置を求める演算を行う際に、その
第1の直線の1つ前で発生させたドツトに関する情報(
例えば、累積誤差等)を把握するためのステータスフラ
グが第2のフラグレジスタ17に残っている。
Therefore, in the task of filling in the space between two given straight lines,
After performing calculations to determine the position of the dot generation point corresponding to the first straight line, calculations are performed to determine the position of the dot generation point corresponding to the second straight line, and then again corresponding to the first straight line. When performing calculations to find the position of the dot generation point, information regarding the dot generated one line before the first straight line (
For example, a status flag remains in the second flag register 17 for ascertaining cumulative errors, etc.).

このため、本発明においては、第2のフラグレジスタ1
7を参照するだけで、同じ直線の1つ前のドツトに関す
る情報を容易且つ正確に把握することができる。
Therefore, in the present invention, the second flag register 1
By simply referring to 7, information regarding the previous dot on the same straight line can be easily and accurately grasped.

〔実施例〕〔Example〕

以下、本発明を実施例につき図面を参照して説明する。 DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to embodiments and drawings.

第1図は本発明の一実施例による描画演算処理装置の構
成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a drawing arithmetic processing device according to an embodiment of the present invention.

この描画演算処理装置は、直線発生回路l、この直線発
生回路1にクロック信号を供給するクロックジェネレー
タ2及び塗り潰し回路5を有し、直線発生回路1と塗り
潰し回路5は、データバス3及びアドレスバス4を介し
てビットマツプメモI76に夫々接続されている。なお
図示は省略したが、このデータバス3及びアドレスバス
4にプログラムメモリや他の制御機器、例えばシステム
コントローラ等が接続されている。
This drawing arithmetic processing device includes a straight line generation circuit 1, a clock generator 2 that supplies clock signals to the straight line generation circuit 1, and a filling circuit 5. The straight line generation circuit 1 and the filling circuit 5 are connected to a data bus 3 and an address bus. 4 to the bitmap memo I76. Although not shown, a program memory and other control devices such as a system controller are connected to the data bus 3 and address bus 4.

直線発生回路1は、図示の如く、命令レジスタ11、命
令デコーダ/制御回路12、演算回路(ALU)13、
データレジスタ(DR)14、アキュムレータ(ACC
)15、第1のフラグレジスタ16、第2のフラグレジ
スタ17及びゲート回路18.19.20.21.22
.23を有するマイクロプロセッサで構成されている。
As shown in the figure, the straight line generation circuit 1 includes an instruction register 11, an instruction decoder/control circuit 12, an arithmetic unit (ALU) 13,
Data register (DR) 14, accumulator (ACC
) 15, first flag register 16, second flag register 17 and gate circuit 18.19.20.21.22
.. It consists of a microprocessor with 23.

そして、図外のプログラムメモリから読み出された命令
は、命令レジスタ11で一時保持され、その命令のオペ
レーション部は命令デコーダ/制御回路12に送られて
解読される。命令デコーダ/制御回路12は、解読した
命令コードの内容に応じて、クロックジェネレータ2か
らのクロック信号に同期した各種ゲート信号をゲート1
8〜23に送出したり、各種の制御信号を生成して、こ
れを各部に送出する。また、この命令デコーダ/制御回
路12で解読された演算命令はALU13に送られ、こ
のALU13で所定の演算が実行される。
An instruction read from a program memory (not shown) is temporarily held in an instruction register 11, and an operation part of the instruction is sent to an instruction decoder/control circuit 12 to be decoded. The instruction decoder/control circuit 12 sends various gate signals synchronized with the clock signal from the clock generator 2 to the gate 1 according to the contents of the decoded instruction code.
8 to 23, and generates various control signals and sends them to each section. Further, the arithmetic instruction decoded by the instruction decoder/control circuit 12 is sent to the ALU 13, where a predetermined arithmetic operation is executed.

塗り潰し回路5は、上述の直線発生回路1とほぼ同様に
構成されており、命令レジスタ、ALU等を有している
。但し、フラグレジスタは1個で良い。従って、この塗
り潰し回路5は、従来の汎用マイクロプロセッサによっ
て構成することができる。
The filling circuit 5 is configured in substantially the same manner as the above-described straight line generation circuit 1, and includes an instruction register, an ALU, and the like. However, only one flag register is sufficient. Therefore, this filling circuit 5 can be constructed by a conventional general-purpose microprocessor.

次に、以上のように構成した描画演算処理装置を用いて
2直線間の塗り潰し作業を行う手順を、0 第2A図及び第2B図に示したフローチャートに従って
説明する。
Next, a procedure for performing a filling operation between two straight lines using the drawing arithmetic processing device configured as described above will be described with reference to the flowcharts shown in FIGS. 2A and 2B.

第2A図は、2直線間の塗り潰し作業を行うための基本
ステップを示すもので、例えば第3図に示すように、2
直線LL、L2の間を塗り潰す場合、まず、第1図の直
線発生回路1のALU13において、最初のスキャンラ
イン上での第1の直線り、の始点ドツトaの位置を求め
るための演算を行う(ステップ1)。そして、この演算
の結果生じたステータスフラグは第1のフラグレジスタ
16に記憶される。
Figure 2A shows the basic steps for filling in between two straight lines. For example, as shown in Figure 3,
When filling in the space between the straight lines LL and L2, first, the ALU 13 of the straight line generation circuit 1 in FIG. Do it (Step 1). The status flag generated as a result of this operation is stored in the first flag register 16.

次に、やはり直線発生回路lのALU13により、同じ
スキャンライン上での第2の直線L2の始点ドラ)bの
位置を求めるための演算が行われる(ステップ2)。こ
のドラ+−bの位置を求めるための演算の結果生じるス
テータスフラグは、やはり第1のフラグレジスタ16に
記憶されるが、この演算を実行する前に、第1のフラグ
レジスタ16に記憶されている内容は、第2のフラグレ
ジスタ17に取り込まれて記憶される。
Next, the ALU 13 of the straight line generation circuit 1 performs calculations to determine the position of the starting point (drag) b of the second straight line L2 on the same scan line (step 2). The status flag resulting from the calculation to find the position of the driver +-b is also stored in the first flag register 16, but before executing this calculation, the status flag is stored in the first flag register 16. The contents are taken into the second flag register 17 and stored.

上記ステップ1及びステップ2において直線発生回路工
のALU13で得られたドツト発生点に関する情報は、
第1図の塗り潰し回路5に供給される。そして、この塗
り潰し回路5は、直線発生回路1のALU13から送ら
れてきた情報に基づいて、両始点ドッ)a、b及びその
間に存在する全てのドツト発生点にドツトを発生させる
(ステップ3)。この塗り潰し回路5によるドツト発生
、即ち、塗り潰しは、具体的には、ビットマツプメモリ
6内の両始点ドッ)a、bに対応するビット及びその間
に存在するビットを全て論理反転することにより行われ
る。
The information regarding the dot generation point obtained by the ALU 13 of the straight line generation circuit engineer in steps 1 and 2 above is as follows:
The signal is supplied to the filling circuit 5 in FIG. Then, based on the information sent from the ALU 13 of the straight line generation circuit 1, the filling circuit 5 generates dots at both starting points a and b and all dot generation points existing between them (step 3). . Specifically, dot generation, that is, filling, by the filling circuit 5 is performed by logically inverting the bits corresponding to both starting points dots a and b in the bitmap memory 6, and all bits existing between them. .

そして、この第1のスキャンライン上での塗り潰し作業
が終了すると、スキャンラインを1つシフトさせ(ステ
ップ4)、第2のスキャンライン上での塗り潰し作業を
行う。
When the filling operation on the first scan line is completed, the scan line is shifted by one (step 4), and the filling operation on the second scan line is performed.

第2B図は、第2のスキャンライン以降のスキャンライ
ン上で塗り潰し作業(ステップ5及び6)を行うための
ドツト位置演算処理のサブルーチンを示すものである。
FIG. 2B shows a subroutine for dot position calculation processing for performing the filling operation (steps 5 and 6) on the scan lines after the second scan line.

1 2 このドツト位置演算処理においては、例えば第1の直線
り、のドラ)cを発生させる場合(ステップ5)、まず
、1つ前のスキャンライン上で発生させたその直線り、
のドツトaに関するデータ(例えば、誤差の累積値等)
を、第1図のデータレジスタ(DR)14から読み出し
て、ALUI3に供給する。
1 2 In this dot position calculation process, for example, when generating a dot c on the first straight line (step 5), first, the straight line generated on the previous scan line,
Data regarding dot a (for example, cumulative error value, etc.)
is read from the data register (DR) 14 in FIG. 1 and supplied to the ALUI 3.

ALU13は、このデータと第2のフラグレジスタ17
に記憶されているフラグ状態とからドツトaに関する正
確な情報を得る。この時、第2のフラグレジスタ17に
は、ALU13がドツトaに関して演算を行った時のス
テータスフラグが記憶されているので、この第2のフラ
グレジスタ17の記憶内容をALU13に供給すること
により、ALU13はフラグに関してドラ)aを発生さ
せた直後の状態になり、あたかも連続して同一直線り、
上のドツトを発生させるかのようになる。
The ALU 13 stores this data and the second flag register 17.
Accurate information regarding dot a is obtained from the flag state stored in dot a. At this time, the second flag register 17 stores the status flag when the ALU 13 performs the calculation on the dot a, so by supplying the stored contents of the second flag register 17 to the ALU 13, Regarding the flag, the ALU 13 is in the state immediately after generating a), as if it were continuously in the same straight line,
It will appear as if the above dot is generated.

次いで、ゲート22を介して、第1のフラグレジスタ1
6の内容(即ち、第2の直線L2のドツトbに関する演
算を行った際のフラグ状態)が第2のフラグレジスタ1
7に取り込まれる。
Then, via the gate 22, the first flag register 1
The contents of 6 (that is, the flag state when performing the calculation regarding dot b of the second straight line L2) are stored in the second flag register 1.
Incorporated into 7.

次に、ドツトCを発生させるために必要な演算がALU
13において行われるが、この時、第1のフラグレジス
タ16の内容は更新される。
Next, the calculations necessary to generate dot C are carried out by the ALU.
At this time, the contents of the first flag register 16 are updated.

しかる後、フローは、第2A図のメインルーチンにリタ
ーンする。
Flow then returns to the main routine of FIG. 2A.

第2の直線L2のドツトを発生するステップ6において
も、全く同様の処理が行われ、例えばドラl−dを発生
させる場合には、1つ前のドツトbに関するデータが読
み出され、このデータと、ドラ)bに関してALU13
が行った演算結果のフラグ状態を記憶している第2のフ
ラグレジスタ17とから、トン)bに関する正確な情報
が得られる。
Exactly the same process is performed in step 6 for generating dots on the second straight line L2. For example, when generating a dot ld, data regarding the previous dot b is read out, and this data and Dora) ALU13 regarding b
Accurate information regarding t)b can be obtained from the second flag register 17, which stores the flag state of the result of the operation performed by .

次に、上述したステップ5.6で夫々得られたドツト発
生点に関する情報に基づいて、塗り潰し回路5により、
2つのドツトc、d及びその間に存在する全てのドツト
発生点にドツトを発生させる。
Next, based on the information regarding the dot generation points obtained in step 5.6 above, the filling circuit 5 performs the following steps.
Dots are generated at the two dots c and d and at all dot generation points between them.

次に、スキャンラインが最終スキャンラインか3 4− 否かが判断され(ステップ8)、最終スキャンラインで
ない場合には、フローをステップ4に戻してスキャンラ
インをシフトさせ、次のスキャンライン上での塗り潰し
作業を行う。
Next, it is determined whether the scan line is the last scan line (step 8), and if it is not the last scan line, the flow returns to step 4 to shift the scan line and start on the next scan line. Do the filling work.

このようにして、順次ドツトe、f、−−−−−を求め
、その間を塗り潰す。
In this way, dots e, f, etc. are sequentially obtained and the space between them is filled in.

このように、本実施例の描画演算処理装置においては、
各直線り、、L、の開始端のドラ)a、b以外のドツト
を発生させる場合、第1のフラグレジスタ16ではなく
、第2のフラグレジスタ17の記憶内容をALU13に
供給することにより、各々の直線 L+、L2における
1つ前のドツトに関する情報を正確に把握することがで
きる。従って、例えばプロセッサ内のレジスタのみを使
用して、ドツト発生点の位置を決めるための演算処理を
行うようにすることができ、その場合でも、その演算結
果の情報を判定するための特別のステップを必要としな
い。従って、汎用マイクロコンピュータを用いた従来の
この種の描画演算処理装置に比較して、2直線間の塗り
潰し処理を高速で行うことができる。
In this way, in the drawing arithmetic processing device of this embodiment,
When generating dots other than a and b at the starting end of each straight line, , L, by supplying the stored contents of the second flag register 17 instead of the first flag register 16 to the ALU 13, Information regarding the previous dot on each straight line L+ and L2 can be accurately grasped. Therefore, for example, it is possible to perform arithmetic processing to determine the position of the dot generation point using only the registers in the processor, and even in that case, a special step is required to determine the information of the result of the calculation. does not require. Therefore, compared to this type of conventional drawing arithmetic processing device using a general-purpose microcomputer, filling processing between two straight lines can be performed at high speed.

なお、上に説明した実施例は、ラスクスキャン方式のC
RT用の描画演算処理装置であるが、本発明の描画演算
処理装置は、他のあらゆる種類のドツト式プロッタ、プ
リンタ、デイスプレィ等に適用が可能である。
Note that the embodiment described above is based on the C
Although this is a drawing arithmetic processing device for RT, the drawing arithmetic processing device of the present invention can be applied to all kinds of other dot plotters, printers, displays, etc.

また、本発明で言う「ドツトパターン形成面」は、実際
にそのような面が存在している必要はなく、例えばビッ
トマツプメモリ等に展開された仮想的な概念であって良
い。
Furthermore, the "dot pattern forming surface" referred to in the present invention does not need to actually exist, and may be a virtual concept developed in, for example, a bitmap memory.

更に、液晶デイスプレィ等のデイスプレィ装置に本発明
を適用する場合には、そのデイスプレィ装置の各画素を
1つのドツトとみなして、本発明を適用すれば良い。
Further, when the present invention is applied to a display device such as a liquid crystal display, each pixel of the display device can be regarded as one dot and the present invention can be applied.

〔発明の効果〕〔Effect of the invention〕

本発明の描画演算処理装置においては、フラグレジスタ
を2個設け、与えられた2直線間を塗り潰す処理を行う
際に、同じ直線の1つ前のスキャンライン上で発生させ
たドツトに関する情報を判断するためのステータスフラ
グの状態を第2のフ 5− 6 ラグレジスタに残すようにしている。
In the drawing arithmetic processing device of the present invention, two flag registers are provided, and when performing the process of filling in between two given straight lines, information regarding the dots generated on the scan line immediately before the same straight line is stored. The state of the status flag for judgment is left in the second flag register.

従って、この第2のフラグレジスタをルックアップする
ことにより、当該スキャンライン上でのその直線のドツ
ト発生点の位置を決定するのに必要な情報を容易且つ正
確に得ることができ、他の特別のステップを設ける必要
がないので、全体の描画速度を速くすることができる。
Therefore, by looking up this second flag register, we can easily and accurately obtain the information necessary to determine the position of the straight dot point on the scan line, and other special Since it is not necessary to provide the step, the overall drawing speed can be increased.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例による描画演算処理装置の構
成を示すブロック図、第2A図及び第2B図は第1図の
装置の動作を示すフローチャート、第3図は2直線間の
塗り潰し作業を説明するための説明図、第4図は直線を
発生させる方法を説明するための説明図である。 なお、図面に用いた符号において、 1 ・・・・・・ 直線発生回路 2 ・・・・・・ クロックジェネレータ5 ・・・・
・・ 塗り潰し回路(ドツト発生手段)6 ・・・・・
・ ビットマツプメモリ13 ・・・・・・ 演算回路
(ALU)・・・・・・ アキュムレータ(ACC)・
・・・・・ 第1のフラグレジスタ ・・・・・・ 第2のフラグレジスタ
FIG. 1 is a block diagram showing the configuration of a drawing arithmetic processing device according to an embodiment of the present invention, FIGS. 2A and 2B are flowcharts showing the operation of the device in FIG. 1, and FIG. 3 is a filling between two straight lines. FIG. 4 is an explanatory diagram for explaining the work, and FIG. 4 is an explanatory diagram for explaining the method of generating straight lines. In addition, in the symbols used in the drawings, 1... Line generation circuit 2... Clock generator 5...
・・・ Filling circuit (dot generation means) 6 ・・・・・・
・ Bitmap memory 13 ・・ Arithmetic circuit (ALU) ・ Accumulator (ACC) ・
...First flag register ...Second flag register

Claims (1)

【特許請求の範囲】 ドット発生点がマトリックス状に配列されたドットパタ
ーン形成面に各スキャンライン毎にドットを発生させて
図形を描画するための描画演算処理装置において、 与えられた2直線間を塗り潰す処理を行う際に、前記ス
キャンライン毎に前記2直線に対応するドット発生点の
位置を夫々求めるための演算を行う演算手段と、 前記演算手段において1つのドット発生点に関する前記
演算が終了した時点で、その演算の結果生じたステータ
スフラグを記憶する第1のフラグレジスタと、 前記演算手段において次のドット発生点に関する前記演
算を行う前に前記第1のフラグレジスタの内容を取り込
んで記憶する第2のフラグレジスタと、 前記演算手段の演算結果に基づいて決定された、1つの
スキャンライン上における前記2直線に対応する2つの
ドット発生点及びその間に存在する全てのドット発生点
にドットを発生させるドット発生手段とを有することを
特徴とする描画演算処理装置。
[Claims] In a drawing arithmetic processing device for drawing a figure by generating dots for each scan line on a dot pattern forming surface in which dot generation points are arranged in a matrix, when performing the filling process, a calculation means for calculating the positions of the dot generation points corresponding to the two straight lines for each scan line; and a calculation means for completing the calculation regarding one dot generation point in the calculation means. a first flag register that stores a status flag generated as a result of the operation; and a first flag register that captures and stores the contents of the first flag register before performing the operation regarding the next dot generation point in the calculation means. a second flag register to perform dot generation at two dot generation points corresponding to the two straight lines on one scan line and all dot generation points existing therebetween, determined based on the calculation result of the calculation means; A drawing arithmetic processing device comprising: dot generating means for generating dots.
JP1337326A 1989-12-26 1989-12-26 Drawing calculation processing unit Pending JPH03196379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1337326A JPH03196379A (en) 1989-12-26 1989-12-26 Drawing calculation processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1337326A JPH03196379A (en) 1989-12-26 1989-12-26 Drawing calculation processing unit

Publications (1)

Publication Number Publication Date
JPH03196379A true JPH03196379A (en) 1991-08-27

Family

ID=18307572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1337326A Pending JPH03196379A (en) 1989-12-26 1989-12-26 Drawing calculation processing unit

Country Status (1)

Country Link
JP (1) JPH03196379A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109657328A (en) * 2018-12-12 2019-04-19 中国航空工业集团公司西安航空计算技术研究所 A kind of TLM micro-structure towards GPU hardware linear light gated Boundary algorithm

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109657328A (en) * 2018-12-12 2019-04-19 中国航空工业集团公司西安航空计算技术研究所 A kind of TLM micro-structure towards GPU hardware linear light gated Boundary algorithm
CN109657328B (en) * 2018-12-12 2023-03-14 中国航空工业集团公司西安航空计算技术研究所 TLM microstructure for GPU hardware line rasterization boundary algorithm

Similar Documents

Publication Publication Date Title
EP0548052A2 (en) Video picking and clipping method and apparatus
JPS63198174A (en) Graphic processor
JPS6326898B2 (en)
EP0437379A2 (en) Curve generator
EP0229693B1 (en) Wide line drawing in a graphics display system
JP2634851B2 (en) Image processing device
JPH03196379A (en) Drawing calculation processing unit
JP2674287B2 (en) Graphic microcomputer
US6504543B1 (en) Polygon drawing method and polygon drawing apparatus
JP2588257B2 (en) Contour approximation method
JP2630843B2 (en) Straight line drawing method and apparatus
JP2947984B2 (en) Figure Drawing Method in Multiprocessor System
JPS642953B2 (en)
JPH10334250A (en) Anti-alias processor and image processing unit
JP2611098B2 (en) Vector / raster conversion method
JP2904994B2 (en) Coordinate connection display method
JP3214722B2 (en) Stroke character generator
JPH0315193B2 (en)
JP2715496B2 (en) Image filling device
JP2727667B2 (en) Drawing equipment
JPS636685A (en) Vector drawing method
JP2613653B2 (en) Image processing device
JPH0124654Y2 (en)
JP3099556B2 (en) Data converter
JP2605609B2 (en) Dot display processing device