JPH0528393B2 - - Google Patents
Info
- Publication number
- JPH0528393B2 JPH0528393B2 JP59196747A JP19674784A JPH0528393B2 JP H0528393 B2 JPH0528393 B2 JP H0528393B2 JP 59196747 A JP59196747 A JP 59196747A JP 19674784 A JP19674784 A JP 19674784A JP H0528393 B2 JPH0528393 B2 JP H0528393B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- signal
- memory
- dot
- display
- 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.)
- Expired - Lifetime
Links
- 238000006073 displacement reaction Methods 0.000 claims description 19
- 238000000034 method Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 3
- 230000015654 memory Effects 0.000 description 39
- 238000009499 grossing Methods 0.000 description 25
- 238000012545 processing Methods 0.000 description 14
- 238000006243 chemical reaction Methods 0.000 description 6
- 230000003111 delayed effect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 239000003990 capacitor Substances 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
Landscapes
- Controls And Circuits For Display Device (AREA)
Description
〔発明の技術分野〕
この発明はグラフイツク表示装置のスムージン
グ回路に関する。
〔従来技術とその問題点〕
ラスタスキヤン方式のグラフイツク表示装置
(CRT表示装置)の解像度は、水平方向と垂直方
向のドツト数に比例して増大する。しかしながら
ドツト数を増やせば表示メモリの容量が当然増大
してコスト高になる問題がある。
例えば、R(赤)、G(緑)、B(青)各3ビツト
で512色表示するグラフイツク表示装置で、CRT
画面が192×256ドツト構成の場合、R,G,Bに
つき夫々、6K×3バイト、したがつて合計54K
バイトの表示メモリが必要であるが、ここで水平
方向の解像度を倍にしようとすると、192×512ド
ツト構成となるから、(12K×3)×3=108Kバ
イトの表示メモリが必要となり、つまり倍の容量
となつて、この例では更に54Kバイトの表示メモ
リを用意しなければならない。
〔発明の目的〕
メモリ容量を大幅に増加させることなく、水平
方向の解像度が向上するようにしたグラフイツク
表示装置を提供することを目的とする。
〔発明の要点〕
CRT表示画面の各ビツトと1対1の関係をも
つスムージングメモリを設け、このスムージング
メモリに表示図形の直線部(水平方向)の端部半
ドツトのON/OFFを制御するデータを演算によ
り算出して書込み、水平方向の解像度をみかけ上
倍にするようにしたものである。
〔実施例〕
以下、第1図ないし第9図を参照して本発明の
一実施例を説明する。第1図はグラフイツク表示
装置の構成図である。図中1は入力装置であり、
この入力装置1からの入力データはCPU(中央処
理装置)2に入力される。このCPU2には主記
憶装置3が接続されており、データが授受される
と共に、コロツクジエネレータ4の発生するマシ
ンクロツクが入力している。またCPU2が処理
して出力する図形やその輝度をコントロールする
データはRAM(ランダムアクセスメモリ)から
成るビデオメモリ5及びスムージングメモリ6へ
書込まれる。而して上記ビデオメモリ5は赤、
緑、青の各色に対するメモリ5A,5B,5Cか
ら成り、上記図形データが書込まれる。またスム
ージングメモリ6はビデオメモリ5(メモリ5A
〜5C)と一対一の対応関係を有し、輝度コント
ロールのためのデータが書込まれる。
各メモリ5A〜5C及びスムージングメモリ6
からパラレルに出力される表示データは、対応し
て4系列設けられているシフトレジスタ7に与え
られる。このシフトレジスタ7から出力されるデ
ータは3系列設けられているスムージング回路8
に入力してスムージング処理を受け、その信号を
3系列のD−A変換回路9に与えられる。このD
−A変換回路9は入力信号を輝度コントロールし
てビデオ信号としてラスタスキヤン方式のCRT
表示装置10に出力し、図形を表示させる。
一方、クロツクジエネレータ4が出力する他の
クロツク信号は表示アドレス制御回路11及び同
期信号発生回路12に入力される。表示アドレス
制御回路11はビデオメモリ5に対するアドレス
制御信号を出力し、ビデオメモリ5に対するデー
タの読出しを行なう。また同期信号発生回路12
はCRT表示装置10に対し水平、垂直同期信号
を出力する。更にクロツクジエネレータ4が出力
するクロツク信号はシフトレジスタ7に供給され
るロードクロツク及びシフトクロツクである。
第2図は上述した3系列とも同一のスムージン
グ回路8およびD−A変換回路9を抜き出して示
したもので、上記メモリ5A,5B,5C,6に
対し夫々設けられているシフトレジスタ7を7
A,7B,7C,7Dとし、また各シフトレジス
タ7A,7B,7C,7Dから出力する信号を
夫々、 J1 , J2 , J3 , J4 とすると、これら
信号 J1 , J2 , J3 は夫々、対応する系列のス
ムージング回路8A,8B,8Cに入力され、信
号J4はスムージング回路8A,8B,8Cに共通
に入力される。更に各スムージング回路8A,8
B,8Cから夫々出力される信号 n1 , o1 ,
n2 , o2 , n3 , o3 は夫々、対応する系列の
D−A変換回路9A,9B,9Cに入力される。
そしてD−A変換回路9A,9B,9Cの出力を
夫々、信号 l1 , l2 , l3 とすると夫々は赤、
緑、青のビデオ信号となる。
第3図はスムージング回路8A(8B,8Cと
も同様)の具体的回路構成を示したものである。
シフトレジスタ(SR)7Aの出力 J1 は遅延回
路15に入力し、更にその出力信号aは遅延回路
16に入力して信号bとしてオアゲート17に出
力される。またこのオアゲート17には上記信号
J1 も入力されている。そしてこのオアゲート
17の出力信号cは一端にシフトレジスタ7Dか
らの出力 J4 が入力されているアンドゲート18
の他端に入力される。このアンドゲート18の出
力信号dは一端に上記遅延回路15の出力信号a
が入力されているオープンコレクタのオアゲート
19の他端及び、一端に上記遅延回路15の出力
信号aがインバータ20を介して入力されている
アンドゲート21の他端に入力される。しかし
て、上記オアゲート19の出力の信号 n1 とし
て、またアンドゲート21の出力は信号 o1 とし
て夫々D−A変換器9Aに供給される。
第4図は3系統のD−A変換回路9(例えば9
Aとする)の構成を示す。上記信号 n1 は抵抗
RBを介しNPN型トランジスタTrのベースに入力
され、また信号 o1 はインバータ26を介しオー
ブンコレクタのオアゲート27の入力端に入力さ
れる。他方、電圧+Vccが抵抗RDを介し、一端を
接地されたスイツチSWに印加されている。この
スイツチSWはスムージングの輝度調整を行なう
ためのもので、その他端はオアゲート27の入力
端に接続されるほか、ビデオアンプ(図示略)へ
3系統とも共通接続される。またオアゲート27
の出力は抵抗RCを介し上記トランジスタTrのベ
ースに接続される。トランジスタTrのベース、
コレクタ間には抵抗RAが接続され、またエミツ
タは抵抗REを介し接地されている。そしてコレ
クタには電圧Vccが供給されている。トランジス
タTrのエミツタ出力はコンデンサCを介しCRT
表示装置9へ送られる。しかして上記抵抗RB,
RCの抵抗値はRB<RCである。
次に上記実施例の動作を第5図ないし第9図を
参照して説明する。いま、直線をCRT表示装置
10の画面上に描くものとするとして、まず、一
般的な動作から説明する。而してはじめに入力装
置1から描く直線の始点および終点の座標データ
を入力する。CPU2は主記憶回路3を使用して
その座標データにもとづいて描くべき直線データ
及び輝度コントロールデータを夫々算出し、ビデ
オメモリ5の赤、緑、青の各メモリ5A,5B,
5Cに表示データを、また輝度コントロールデー
タをスムージングメモリ6に書込む。例えば赤で
直線を表示させたい場合は赤用メモリ5Aに、緑
で表示させたい場合には緑用メモリ5Bに、白で
表示させたい場合には全メモリ5A,5B,5C
に直線データを書込む。そしてビデオメモリ5か
らは表示データがロードクロツクに従つて1ワー
ド毎にシフトレジスタ7へ出力され、シフトクロ
ツクに従つて1ビツトずつシフトレジスタ7から
スムージング回路8へ送出される。
しかして、黄色の斜め直線を表示するとして、
あるラスタの9ビツト分がビデオメモリ5に書込
まれる場合を例にとつて説明すると、黄色は赤と
緑の合成色であるから、上記9ドツトのうち4ド
ツトを黄色で表示するなら第5図に示すように赤
と緑のデータは同一であり、例えば「001111000」
となる。これに対し青のデータは9ビツトオール
“0”のデータ「0000000000」となる。また、こ
の直線にスムージング処理を行なうためにスムー
ジングメモリ6に書込まれる輝度コントロールデ
ータは、「001000100」となる。なお、この輝度コ
ントロールデータの作成方法については後述す
る。
さて、ビデオメモリ5及びスムージングメモリ
6に書込まれたデータはシフトレジスタ7を介し
てスムージング回路8に供給されるが、第3図に
おいて、赤系統のスムージング回路8Aには赤の
表示データ J1 と、輝度コントロールデータ J4
が供給されている。同図中の J1 , J4 ,a〜d
の各信号及び出力信号 J1 , o1 は第6図のタイ
ムチヤートに示すようになる。すなわち、赤の表
示データ J1 の「001111000」は遅延回路15で
半クロツク遅れてaの信号となり、更に遅延回路
16で半クロツク遅れてbの信号となる。またこ
れら J1 の信号とbの信号がオアゲート17を介
してcの信号となり、このcの信号と J4 の信号
がアンドゲート18を介してdの信号となる。よ
つて、出力信号 n1 はaの信号とdの信号のオア
出力となり、出力信号n1はaの信号のインバート
信号とdの信号のアンド出力となる。そして上記
信号 n1 は第4図に示すD−A変換回路9Aの抵
抗RBに、また信号 o1 はインバータ26に入力
される。このD−A変換回路9Aにおいて、オア
ゲート27の出力端を○イ、トランジスタTrのベ
ースを○ロとすると、信号 n1 , o1 に対する点
○イ,○ロの電位及び出力信号lは次表の如くなる。
TECHNICAL FIELD OF THE INVENTION This invention relates to smoothing circuits for graphic display devices. [Prior art and its problems] The resolution of a raster scan type graphic display device (CRT display device) increases in proportion to the number of dots in the horizontal and vertical directions. However, if the number of dots is increased, the capacity of the display memory will naturally increase, resulting in an increase in cost. For example, a CRT is a graphic display device that displays 512 colors using 3 bits each of R (red), G (green), and B (blue).
If the screen is composed of 192 x 256 dots, each of R, G, and B is 6K x 3 bytes, so the total is 54K.
Bytes of display memory are required, but if we try to double the horizontal resolution, the configuration will be 192 x 512 dots, so (12K x 3) x 3 = 108K bytes of display memory will be required, which means In this example, the capacity is doubled, and an additional 54K bytes of display memory must be provided. [Object of the Invention] An object of the invention is to provide a graphic display device that improves horizontal resolution without significantly increasing memory capacity. [Key Points of the Invention] A smoothing memory that has a one-to-one relationship with each bit on the CRT display screen is provided, and this smoothing memory contains data that controls ON/OFF of half dots at the end of the straight line portion (horizontal direction) of the displayed figure. is calculated and written, and the horizontal resolution is apparently doubled. [Embodiment] An embodiment of the present invention will be described below with reference to FIGS. 1 to 9. FIG. 1 is a block diagram of a graphic display device. 1 in the figure is an input device,
Input data from this input device 1 is input to a CPU (central processing unit) 2. A main storage device 3 is connected to this CPU 2, and data is exchanged therewith, and a machine clock generated by a clock generator 4 is inputted thereto. Further, data for controlling the figures processed and output by the CPU 2 and their brightness are written to a video memory 5 and a smoothing memory 6, which are comprised of RAM (random access memory). Therefore, the video memory 5 is red,
It consists of memories 5A, 5B, and 5C for each color of green and blue, into which the above-mentioned graphic data is written. Also, the smoothing memory 6 is connected to the video memory 5 (memory 5A).
~5C), and data for brightness control is written therein. Each memory 5A to 5C and smoothing memory 6
The display data outputted in parallel from the display data is applied to shift registers 7, which are provided in four corresponding series. The data output from this shift register 7 is processed by a smoothing circuit 8 provided with three series.
The signal is inputted to the DA converter circuit 9 and subjected to smoothing processing, and the signal is applied to three series of DA converter circuits 9. This D
-A conversion circuit 9 controls the brightness of the input signal and converts it into a video signal for a raster scan type CRT.
The data is output to the display device 10 to display the figure. On the other hand, other clock signals output from the clock generator 4 are input to the display address control circuit 11 and the synchronization signal generation circuit 12. Display address control circuit 11 outputs an address control signal to video memory 5 and reads data from video memory 5. Also, the synchronization signal generation circuit 12
outputs horizontal and vertical synchronizing signals to the CRT display device 10. Furthermore, the clock signals output by the clock generator 4 are the load clock and shift clock supplied to the shift register 7. FIG. 2 shows the same smoothing circuit 8 and D-A conversion circuit 9 for the three series mentioned above, and shows the shift registers 7 provided for the memories 5A, 5B, 5C, and 6, respectively.
A, 7B, 7C, 7D, and the signals output from each shift register 7A, 7B, 7C, 7D are J 1 , J 2 , J 3 , J 4 , these signals J 1 , J 2 , J 3 are respectively input to the smoothing circuits 8A, 8B, and 8C of the corresponding series, and the signal J4 is commonly input to the smoothing circuits 8A, 8B, and 8C. Furthermore, each smoothing circuit 8A, 8
Signals n 1 , o 1 , output from B and 8C, respectively
n 2 , o 2 , n 3 , and o 3 are input to corresponding series of DA conversion circuits 9A, 9B, and 9C, respectively.
If the outputs of the D-A conversion circuits 9A, 9B, and 9C are signals l 1 , l 2 , and l 3 , respectively, the signals are red,
Green and blue video signals. FIG. 3 shows a specific circuit configuration of the smoothing circuit 8A (same as 8B and 8C).
The output J 1 of the shift register (SR) 7A is input to the delay circuit 15, and its output signal a is further input to the delay circuit 16 and output to the OR gate 17 as a signal b. Also, this OR gate 17 has the above-mentioned signal.
J 1 is also entered. The output signal c of this OR gate 17 is sent to an AND gate 18 which has one end inputted with the output J4 from the shift register 7D.
is input to the other end of the . The output signal d of this AND gate 18 is connected to the output signal a of the delay circuit 15 at one end.
is input to the other end of an open collector OR gate 19, and the other end of an AND gate 21 to which the output signal a of the delay circuit 15 is input via an inverter 20. Thus, the output of the OR gate 19 and the output of the AND gate 21 are supplied as a signal n 1 and a signal o 1 to the DA converter 9A, respectively. FIG. 4 shows three systems of D-A converter circuits 9 (e.g. 9
The configuration of A) is shown. The above signal n 1 is a resistance
The signal o 1 is input to the base of the NPN transistor T r via R B , and the signal o 1 is input via the inverter 26 to the input terminal of the OR gate 27 of the oven collector. On the other hand, voltage +Vcc is applied to switch SW, one end of which is grounded, via resistor R D. This switch SW is used to adjust brightness for smoothing, and the other end is connected to the input end of the OR gate 27, and all three systems are commonly connected to a video amplifier (not shown). Also, or gate 27
The output of is connected to the base of the transistor Tr through a resistor RC . the base of the transistor T r ,
A resistor R A is connected between the collectors, and the emitter is grounded via a resistor RE . A voltage Vcc is supplied to the collector. The emitter output of transistor T r is connected to CRT via capacitor C.
It is sent to the display device 9. However, the above resistance R B ,
The resistance value of R C is R B <R C. Next, the operation of the above embodiment will be explained with reference to FIGS. 5 to 9. Assuming that a straight line is to be drawn on the screen of the CRT display device 10, the general operation will be explained first. First, the coordinate data of the starting point and ending point of a straight line to be drawn is inputted from the input device 1. The CPU 2 uses the main memory circuit 3 to calculate straight line data and brightness control data to be drawn based on the coordinate data, and calculates the data for each of the red, green, and blue memories 5A, 5B of the video memory 5, respectively.
Display data is written to 5C and brightness control data is written to smoothing memory 6. For example, if you want to display a straight line in red, use red memory 5A, if you want to display it in green, use green memory 5B, and if you want to display it in white, use all memories 5A, 5B, 5C.
Write linear data to. The display data from the video memory 5 is outputted word by word to the shift register 7 in accordance with the load clock, and sent out bit by bit from the shift register 7 to the smoothing circuit 8 in accordance with the shift clock. However, if you want to display a yellow diagonal straight line,
Taking the case where 9 bits of a certain raster are written to the video memory 5 as an example, yellow is a composite color of red and green, so if 4 dots out of the 9 dots are to be displayed in yellow, the 5th As shown in the figure, the red and green data are the same, for example "001111000"
becomes. On the other hand, the blue data is data "0000000000" with all 9 bits "0". Furthermore, the brightness control data written to the smoothing memory 6 to perform smoothing processing on this straight line is "001000100". Note that a method for creating this brightness control data will be described later. Now, the data written in the video memory 5 and the smoothing memory 6 are supplied to the smoothing circuit 8 via the shift register 7, but in FIG. 3, the red display data J 1 is supplied to the red smoothing circuit 8A. and brightness control data J 4
is supplied. J 1 , J 4 , a to d in the same figure
and the output signals J 1 and o 1 are as shown in the time chart of FIG. That is, "001111000" of the red display data J 1 is delayed by half a clock in the delay circuit 15 and becomes a signal a, and further delayed by a half clock in the delay circuit 16 and becomes a signal b. Furthermore, the signal J 1 and the signal b pass through the OR gate 17 to become the signal c, and the signal c and the signal J 4 pass through the AND gate 18 to become the signal d. Therefore, the output signal n 1 becomes the OR output of the signal a and the signal d, and the output signal n 1 becomes the AND output of the inverted signal of the signal a and the signal d. The signal n 1 is input to the resistor R B of the DA converter circuit 9A shown in FIG. 4, and the signal o 1 is input to the inverter 26. In this D-A conversion circuit 9A, if the output terminal of the OR gate 27 is ○A, and the base of the transistor Tr is ○RO, the potentials of points ○A and ○RO and the output signal l with respect to signals n 1 and o 1 are as follows. It will look like the table.
【表】
したがつてSWがONのときは表示データの4
ドツト分の直線部の前後端に半ドツトずつ半輝度
の表示が得られ、斜めの直線が階段状にならず、
なめらかに表示されるものである。またスイツチ
SWをOFFにした際には、前表から明らかなよう
に上記半ドツトの表示が全輝度で表示されるよう
になる。
一方、第3図において青の表示データ J3 の場
合、シフトレジスタ7Cから出力するデータは、
第7図に示すようにオール“0”データであり、
したがつて各信号a〜dも共に“0”となり、信
号 n3 , o3 も共に“0”となる。即ち、D−A
変換回路9Cの出力も“0”となる。
次に2点の座標データを入力して直線を引くと
きにCPU2が行う演算、即ち、直線データと輝
度コントロールデータの算出法(アルゴリズム)
を第8図及び第9図を参照して説明する。いま第
9図Aに示すように、で示す始点(x1,y1)=
(2,3)、12で示す終点(x2,y2)=(13,7)の
間に斜めの直線を描く場合を例とすする。なお、
図中に矢印で示す方向を正のx方向、y方向とす
る。また第9図Bはビデオメモリ5A〜5Cに書
込まれるデータの状態、第9図Cはスムージング
メモリ6に書込まれるデータの状態、第9図Dは
実際の表示状態、第9図Eは第9図Dに対応する
従来の表示状態を示している。
第8図のフローチヤートにおいて、先ず、ステ
ツプS1の前処理では、スムージングメモリ6がオ
ールクリアされ、また入力装置1から前記始点
(x1,y1)、終点(x2,y2)を入力する。更にカラ
ーデータを指定入力する。
次にステツプS2,S3ではxの変位とyの変位を
比較し、傾きが45°以下か否かを判断する。而し
て具体的には、DX=|x1−x2|=11、DY=|
y1−y2|=4となり、DX>DYで傾きが45°以下
と判断される。なお、本実施例の場合、水平方向
のみのスムージング処理なので、|DX|<|DY
|の45°より大のときには処理対象外となり、ス
テツプS34の後処理、例えば次の直線表示のため
の入力待ち処理、描けた直線に基づいたペイント
処理等が実行されて終了する。
次にステツプS4では、x1とx2の大小関係が判断
され、而してx方向は左から右へ向つての処理と
なるから、X1>x2ならばステツプS5に進んでx1
とx2,y1とy2の座標交換がなされ、始点と終点の
交換がなされる。この場合にはx2>x1であるか
ら、上記座標交換は行われず、ステツプS6に進
む。
次にステツプS6では、x座標が1ドツト進むと
きのy座標の変位を表わす△yがDY/DXの除
算から求められ△y=4/11となる。またこの△
yが正のときS=1、負のときS=−1、0のと
きS=0となる符号S=SGN(△y)が求めら
れ、この場合、S=1となる。
次にステツプS7では、ビデオメモリ5,5A〜
5Cの始点(x1,y1)に、上記ステツプS1の前処
理にしたがつたカラーデータが書込まれる。例え
ば、赤ならば、メモリ5A,5B,5Cの各
(x1,y1)に夫々、カラーデータ“1”,“0”,
“0”(なお、この表現をR,G,B順に(1,
0,0)とも表わす。以下、同様)。また白なら
ば(x1,y1)に(1,1,1)を書込む。
次にステツプS8では、x歩進用の変数Mを0と
し、初期設定する。次いでステツプS9では、yの
変位が生ずるまでのxの距離を表わす変数x
(X0,x1であり、第9図Aの点,に対するx0
=2、点,,に対するx1=3となる)の初
期セツト(x0=0)がなされる。
次にステツプS10では上記変数Mが+1されて
1となり、上記始点からx方向への増分によつて
第9図Aの点の処理体勢へ入る。また次のステ
ツプS11では、x=x1+M1y=y1+f(M△y)
の演算がなされ、この場合にはx=2+1=3、
y=3+f(4/11)=3となる。なお、関数f
は、少数点以下は四捨五入するものである。
次にステツプS12では、F=f(△y)−f(M−
1)△y)の演算がなされ、この場合には、F=
(4/11)−f(0)=0となる。即ち、△yはx1
ドツトより小さいが、xが1ドツト分づつ増分さ
れてゆき、yが1ドツトを越えたとき上記関数F
は1となる。そして次のステツプS13で|F|=
1か否か、即ち、yに1ドツト分の変位が生じた
か否かを判断し、而していまの場合、|F|=0
であり、ステツプS14へ進む。
ステツプS14では、現在のの座標(3,3)
の前のカラーデータをレジスタC′へ保存すると共
にそのカラーデータをビデオメモリ5の上記座標
(3,3)に書込む。なお、C′へ上記カラーデー
タを保存する理由は、例えば後でX0とX1の比較
をステツプS27〜S32(後述)の処理により行つた
とき、一度描画した点を取り消す際に使用するた
めである。
次にステツプS15に進み、x=x2か否か、即ち、
の終点までの処理が終つたか否かを判断し、い
まの場合終つていないからステツプS16に進み、
X0が+1される増分処理が行われ、X0=1とな
る。
次にステツプS10に戻り、M=1+1=2とな
り、ステツプS11ではx=2+2=4、y=3+
f(2×4/11)=4となり、座標(4,4)の点
が求められる。そしてステツプS12では、F=
f(8/11)−f(4/11)=1−0=1となり、点
からへの移動、即ち、△yの1ドツト分の増
分が判断される。したがつて次のステツプS13で
はこの|F|=1が判断されてステツプS17へ進
む。
ステツプS17では、y変位が起つたときの座標
保存が、X,Yのレジスタ(X,Y)に行われ、
X=4、Y=4となる。なお、この(X,Y)へ
の座標保存は、この後、変位後のx方向への直線
の長さ(いまの場合、上記X1=3)を求め、変
位前の長さX0=2との比較を行つて(ステツプ
S27〜S32)変位点の処理を行うためである。
そしてステツプS18では、そのときの前のカラ
ーデータをC″に保存し、またカラーメモリ5に
そのカラーデータを書込む。なお、C″に前のカ
ラーデータを保存する理由は、C′へカラーデータ
を保存したステツプS14の場合同様に、ステツプ
S27〜S32の実行の際に、X1を求めたのちにX0と
X1との比較を行い、変位点の処理を行うまでの
保存処理である。
次にステツプS19〜S22では、上記ステツプS9〜
S12と同一処理がなされ、その結果、X1=0(ス
テツプS19)、M=3(ステツプS20)、x=2+3
=5、y=3+f(3×4/11)=4(ステツプ
S21)、F=f(3×4/11)−f(2×4/11)=0
(ステツプS22)となり、座標(4,5)の点4が
求められる。そしてステツプS23に進み、ステツ
プS13ではyの変位をみてX0の長さを求めたこと
に対し、X1の長さを求めるためにyの変位をみ
てNOとなり、ステツプS24に進む。次いで上述
したステツプS14,S18の各処理同様に、そのとき
の点の前のカラーデータをCに保存し、また
ビデオメモリ5の点にそのカラーデータを書込
む。なおCに前のカラーデータを保存する理由
は、C′、C″同様に、ステツプS27〜S32の処理によ
り変位点の前後の長さの比較を行い、変位前後の
長さが等しいとき、この点を新しい変位点として
処理を開始するためである。
次にステツプS25ではNOとなり、ステツプS26
に進んでX1=0+1=1となり、ステツプS20に
戻る。そのためM=4となり、またステツプS21
ではx=2+4=6、y=3+f(4×4/11)=
4となり、座標(4,6)の点が求められる。
そしてステツプS22では、F=f(4×4/11)−
f(3×4/11)=1−1=0が求められる。また
ステツプS23では、|F|≠となり、ステツプS24
に進んで、C[Table] Therefore, when SW is ON, display data 4
A half-brightness display is obtained with half-dots at the front and rear ends of the straight line portion of the dot, and diagonal straight lines do not become step-like.
It is displayed smoothly. Also switch
When the SW is turned OFF, the above half-dot display will be displayed at full brightness, as is clear from the previous table. On the other hand, in the case of blue display data J 3 in FIG. 3, the data output from the shift register 7C is
As shown in Figure 7, it is all “0” data,
Therefore, each of the signals a to d becomes "0", and the signals n 3 and o 3 also become "0". That is, D-A
The output of the conversion circuit 9C also becomes "0". Next, the calculation that the CPU 2 performs when inputting the coordinate data of two points and drawing a straight line, that is, the calculation method (algorithm) for the straight line data and brightness control data.
will be explained with reference to FIGS. 8 and 9. As shown in Figure 9A, the starting point (x 1 , y 1 )=
Let us take as an example the case where a diagonal straight line is drawn between the end points (x 2 , y 2 )=(13, 7) shown by (2, 3) and 12. In addition,
The directions indicated by arrows in the figure are defined as positive x and y directions. 9B shows the state of data written to the video memories 5A to 5C, FIG. 9C shows the state of data written to the smoothing memory 6, FIG. 9D shows the actual display state, and FIG. 9E shows the state of the data written to the smoothing memory 6. A conventional display state corresponding to FIG. 9D is shown. In the flowchart of FIG. 8, first, in the preprocessing of step S1 , the smoothing memory 6 is completely cleared, and the starting point (x 1 , y 1 ) and ending point (x 2 , y 2 ) are input from the input device 1. input. Furthermore, specify and input color data. Next, in steps S 2 and S 3 , the x displacement and y displacement are compared to determine whether the inclination is 45° or less. Specifically, DX=|x 1 −x 2 |=11, DY=|
y 1 −y 2 |=4, and the inclination is determined to be 45° or less when DX>DY. In the case of this example, since the smoothing process is only in the horizontal direction, |DX|<|DY
If | is larger than 45°, the line is not subject to processing, and post-processing in step S34 , such as input waiting processing for displaying the next straight line, painting processing based on the drawn straight line, etc., is executed and the process ends. Next, in step S4 , the magnitude relationship between x 1 and x 2 is determined, and since the x direction is processed from left to right, if X 1 > x 2 , proceed to step S 5 . x 1
The coordinates of x 2 , y 1 and y 2 are exchanged, and the starting point and ending point are exchanged. In this case, since x 2 >x 1 , the above coordinate exchange is not performed and the process proceeds to step S6 . Next, in step S6 , .DELTA.y, which represents the displacement of the y coordinate when the x coordinate advances by one dot, is obtained by dividing DY/DX, and .DELTA.y=4/11. This △ again
A sign S=SGN(Δy) is determined such that S=1 when y is positive, S=−1 when y is negative, and S=0 when y is 0. In this case, S=1. Next, in step S7 , video memories 5, 5A to
At the starting point (x 1 , y 1 ) of 5C, color data according to the preprocessing of step S 1 is written. For example, if it is red, the color data " 1 ", " 0 ",
“0” (This expression is changed in the order of R, G, B (1,
0,0). Same below). If it is white, write ( 1, 1 , 1) in (x 1 , y 1 ). Next, in step S8 , the variable M for x step is set to 0 and initialized. Next, in step S9 , the variable x representing the distance of x until the displacement of y occurs
(X 0 , x 1 , and x 0 for point A in Figure 9
=2, and x 1 =3 for the points , , , etc.). Next, in step S10 , the variable M is incremented by 1 to 1, and by incrementing in the x direction from the starting point, the process enters the processing position of the point A in FIG. In the next step S11 , x=x 1 +M 1 y=y 1 +f(M△y)
In this case, x=2+1=3,
y=3+f(4/11)=3. Note that the function f
is rounded off to the nearest whole number. Next, in step S12 , F=f(△y)-f(M-
1) △y) is calculated, and in this case, F=
(4/11)-f(0)=0. That is, △y is x1
Although it is smaller than a dot, when x is incremented by 1 dot and y exceeds 1 dot, the above function F
becomes 1. And in the next step S 13 |F|=
1, that is, whether a displacement of 1 dot has occurred in y, and in this case, |F|=0
Then, proceed to step S14 . In step S 14 , the current coordinates (3, 3)
The previous color data is stored in the register C', and the color data is written into the video memory 5 at the coordinates (3, 3). The reason for saving the above color data to C' is that it can be used to cancel a previously drawn point, for example, when comparing X 0 and X 1 later by processing steps S 27 to S 32 (described later). This is to do so. Next, proceed to step S15 , and check whether x=x 2 or not, that is,
It is determined whether the processing up to the end point has been completed or not, and in this case it has not been completed, so proceed to step S16 .
Incremental processing is performed in which X 0 is increased by 1, so that X 0 =1. Next, return to step S10 , M = 1 + 1 = 2, and in step S 11 , x = 2 + 2 = 4, y = 3 +
f(2×4/11)=4, and the point at coordinates (4, 4) is found. And in step S12 , F=
f(8/11)-f(4/11)=1-0=1, and the movement from the point, that is, the increment of Δy by one dot is determined. Therefore, in the next step S13 , |F|=1 is determined, and the process advances to step S17 . In step S17 , the coordinates when the y displacement occurs are stored in the X, Y registers (X, Y),
X=4, Y=4. In order to save the coordinates to (X, Y), the length of the straight line in the x direction after displacement (in this case, the above X 1 = 3) is determined, and the length before displacement is determined as X 0 = Compare with 2 (step
S27 to S32 ) This is for processing displacement points. Then, in step S18 , the previous color data at that time is saved in C'', and the color data is also written into the color memory 5.The reason for saving the previous color data in C'' is that the previous color data is saved in C''. In the same way as in step S 14 where color data was saved, step
When executing S 27 to S 32 , after finding X 1 , calculate X 0 and
This is a storage process until comparison with X 1 is performed and displacement points are processed. Next, in steps S 19 to S 22 , the above steps S 9 to
The same processing as S 12 is performed, and as a result, X 1 = 0 (step S 19 ), M = 3 (step S 20 ), x = 2 + 3
= 5, y = 3 + f (3 x 4/11) = 4 (step
S 21 ), F = f (3 x 4/11) - f (2 x 4/11) = 0
(Step S 22 ), and point 4 at coordinates (4, 5) is found. Then, the process advances to step S23 , and while in step S13 the length of X0 was determined by looking at the displacement of y, the answer is NO after looking at the displacement of y to find the length of X1 , and the process advances to step S24 . . Next, in the same manner as in steps S 14 and S 18 described above, the color data before the point at that time is stored in C, and the color data is written to the point in the video memory 5. The reason for saving the previous color data in C is that, similarly to C' and C'', the lengths before and after the displacement point are compared by the processing in steps S27 to S32 , and when the lengths before and after the displacement are equal, , in order to start processing with this point as a new displacement point.Next, in step S25 , the result is NO, and in step S26
Then, X 1 =0+1=1, and the process returns to step S20 . Therefore, M=4, and step S 21
Then x=2+4=6, y=3+f(4×4/11)=
4, and the point with coordinates (4, 6) is found.
And in step S22 , F=f(4×4/11)−
f(3×4/11)=1−1=0 is obtained. Also, at step S 23 , |F|≠, and step S 24
Proceed to C
Claims (1)
の水平方向の増分と垂直方向の増分を算出する手
段と、この算出結果が垂直方向に1ドツト変位し
たとき、その変位点の直前のラスタの水平方向の
連続表示ドツト数と、その変位点の直後のラスタ
の水平方向の連続表示ドツト数を比較する手段
と、この比較結果により短いドツト数の連続表示
ドツトの変位点に面するドツトに半ドツト分付加
表示し、長いドツト数の連続表示ドツトの変位点
に面するドツトを半ドツト分消去する手段とを具
備したことを特徴とするグラフイツク表示装置。1 In a graphic display device, a means for calculating the horizontal increment and vertical increment of a display dot, and when the result of this calculation is displaced by one dot in the vertical direction, a continuous display in the horizontal direction of the raster immediately before the point of displacement. A method for comparing the number of dots with the number of consecutively displayed dots in the horizontal direction of the raster immediately after the displacement point, and a method for displaying an additional half dot on the dot facing the displacement point of the continuously displayed dots with a short number of dots based on the result of this comparison. 1. A graphic display device comprising: means for erasing half a dot facing a displacement point of a long number of consecutively displayed dots.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59196747A JPS6175383A (en) | 1984-09-21 | 1984-09-21 | graphic display device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59196747A JPS6175383A (en) | 1984-09-21 | 1984-09-21 | graphic display device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6175383A JPS6175383A (en) | 1986-04-17 |
| JPH0528393B2 true JPH0528393B2 (en) | 1993-04-26 |
Family
ID=16362932
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP59196747A Granted JPS6175383A (en) | 1984-09-21 | 1984-09-21 | graphic display device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6175383A (en) |
-
1984
- 1984-09-21 JP JP59196747A patent/JPS6175383A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6175383A (en) | 1986-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5388207A (en) | Architecutre for a window-based graphics system | |
| JPH0456316B2 (en) | ||
| JPH0769969B2 (en) | Graphic display processor | |
| US5321805A (en) | Raster graphics engine for producing graphics on a display | |
| JP2761890B2 (en) | Line generator and display device | |
| US4484189A (en) | Memoryless artificial horizon generator | |
| JPH0528393B2 (en) | ||
| US5255366A (en) | Address processing unit for a graphics controller | |
| US4703230A (en) | Raster operation circuit | |
| JPS6150194A (en) | Crt controller | |
| US5420610A (en) | Screen display circuit apparatus | |
| JPH0371714B2 (en) | ||
| EP0323636A2 (en) | Object display system | |
| US20010040582A1 (en) | Image data display apparatus in which image data are displayed on terminal display unit and ntsc system display unit | |
| JPS6152694A (en) | Color change circuit | |
| JPS64716B2 (en) | ||
| JPH04188192A (en) | Multi-gradation character generation method and device | |
| JPS61130993A (en) | Graphic processing method and apparatus | |
| JPH04301886A (en) | Display control circuit | |
| JPS59155888A (en) | display device | |
| JPS6360397B2 (en) | ||
| JPS61180290A (en) | Graphic display unit | |
| JPH0253795B2 (en) | ||
| JPH04186393A (en) | Color display device | |
| JPH06282252A (en) | Drawing processor |