JPS6242273A - Drawing control system by xor mode - Google Patents

Drawing control system by xor mode

Info

Publication number
JPS6242273A
JPS6242273A JP18092585A JP18092585A JPS6242273A JP S6242273 A JPS6242273 A JP S6242273A JP 18092585 A JP18092585 A JP 18092585A JP 18092585 A JP18092585 A JP 18092585A JP S6242273 A JPS6242273 A JP S6242273A
Authority
JP
Japan
Prior art keywords
vector
register
vectors
point
slope
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
JP18092585A
Other languages
Japanese (ja)
Inventor
Tsuyoshi Igarashi
五十嵐 強
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP18092585A priority Critical patent/JPS6242273A/en
Publication of JPS6242273A publication Critical patent/JPS6242273A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain a picture processing method which has no omitted joining point of vectors at a necessary part when a closed pattern is drawn, by controlling the drawing of a start point at the joining point according to the tilt of two adjacent vectors. CONSTITUTION:The Y coordinates Y0 and Y1 of the start and end points of a vector are loaded on register 1 and 2 respectively. A comparator 3 compares both coordinates Y0 and Y1 with each other. Then coordinate tilt information Y0>Y1, Y0<Y1 or Y0=Y1 is delivered to a register 4. A decoder 6 reads out the tilt information from a register 4 and 5 and the tilt information of the register 4 is held by the register 5. Thus the register 5 always holds the preceding tilt information, i.e., the tilt information on the preceding vector. The decoder 6 knows vector changes from the tilt of the present vector given from the register 4 and the tilt of the preceding vector given from the register 5 for drawing control of a start point. Thus the drawing processing is possible with no omission of the vector at a desired position and the joining point of vectors.

Description

【発明の詳細な説明】 [発明の技術分野] 本発明は、XORモードによって塗りつぶし対象の閉図
形を描画する際のXORモードによる描画制御方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a drawing control method using the XOR mode when drawing a closed figure to be filled in using the XOR mode.

[発明の技術的背景] 近年、コンピュータを用いた図形処理システムが広範囲
に利用されている。これらのシステムでは、閉図形内を
塗りつぶす操作が頻繁に使用されるが、この処理は従来
からマイクロプロセッサで1ピクセル単位で行われてい
る。しかし、この方法では多大な処理時間が必要とされ
るため、最近この処理をハードウェアで行うことが考え
られている。
[Technical Background of the Invention] In recent years, graphics processing systems using computers have been widely used. In these systems, the operation of filling inside a closed figure is frequently used, and this processing has traditionally been performed pixel by pixel using a microprocessor. However, since this method requires a large amount of processing time, it has recently been considered to perform this processing using hardware.

ところで、第4図に示す閉図形において、符号イ、口で
示す如く閉図形は必ず線対象な1対の点を有している。
By the way, in the closed figure shown in FIG. 4, the closed figure always has a pair of line-symmetric points, as indicated by the symbols A and .

従って、上記1対の点があるかどうかで逆に閉図形であ
るかどうかを検出することができ、この方法を用いて閉
図形の塗りつぶし処理をハードウェアに行わせることが
できる。
Therefore, it is possible to detect whether the figure is a closed figure based on whether or not the pair of points are present, and by using this method, it is possible to cause the hardware to perform the filling process of the closed figure.

[背景技術の問題点] しかし、第4図の閉図形をXOR(排他的論理和)モー
ドで描画した場合、線分くベクトル)と線分(ベクトル
)の接続点の点が第4図のハに示した如く扱けてしまい
、上記閉図形の検出処理に支障を来たしてしまうという
欠点力場った。
[Problems with the background art] However, when the closed figure in Figure 4 is drawn in XOR (exclusive OR) mode, the connection point between the line segment (vector) and the line segment (vector) is as shown in Figure 4. The force field has a disadvantage in that it can be handled as shown in Fig. 3, and it interferes with the closed figure detection process described above.

[発明の目的] 本発明の目的は、上記の欠点に鑑み、閉図形を描画した
際に、必要な部分のベクトルとベクトルの接続点が後け
ない描画処理を行うことができるXORモードによる描
画制御方式を提供することにおる。
[Object of the Invention] In view of the above-mentioned drawbacks, the object of the present invention is to provide a drawing method using an XOR mode that allows drawing processing to be performed without leaving vectors of necessary parts and connection points of the vectors when drawing a closed figure. The purpose is to provide a control method.

[発明の概要] 本発明は、XORモードで閉図形を描画する際に、隣接
する2つのベクトルの傾きからこれらベクトルの接続点
のスタートポイントを描画するかしないかを制御するこ
とにより、上記目的を達成するものである。
[Summary of the Invention] The present invention achieves the above object by controlling whether or not to draw the starting point of the connection point of two adjacent vectors based on the slope of two adjacent vectors when drawing a closed figure in the XOR mode. The goal is to achieve the following.

[発明の実施例] 以下本発明の一実施例を図面を参照して説明する。第1
図は本発明のXORモードによる描画制御方式を適用し
た描画制御装置の一実施例を示したブロック図である。
[Embodiment of the Invention] An embodiment of the present invention will be described below with reference to the drawings. 1st
The figure is a block diagram showing an embodiment of a drawing control device to which the drawing control method using the XOR mode of the present invention is applied.

レジスタ1は、1つの線分(ベクトル)の始点のY座w
yoを記憶し、レジスタ2は同ベクトルの終点のY座標
Y1を記憶する。コンパレータ3はレジスタ1,2から
YO。
Register 1 is the Y location w of the starting point of one line segment (vector)
yo is stored, and register 2 stores the Y coordinate Y1 of the end point of the vector. Comparator 3 receives YO from registers 1 and 2.

Ylを入力して両者を比較し、その比較結果である前記
ベクトルの傾きをレジスタ4に出力する。
Yl is input, the two are compared, and the slope of the vector, which is the result of the comparison, is output to the register 4.

レジスタ4は現ベクトルの傾きを記憶し、レジスタ5は
前回のベクトルの傾きを記憶する。デコーダ6は現ベク
トルの傾きと前回のベクトルの傾きから現ベクトルのス
タートポイントを描画するかどうかを決め、描画する場
合はライト信号100を出力する。
Register 4 stores the slope of the current vector, and register 5 stores the slope of the previous vector. The decoder 6 determines whether or not to draw the start point of the current vector based on the slope of the current vector and the slope of the previous vector, and outputs a write signal 100 if the start point of the current vector is to be drawn.

次に本実施例の動作について説明する。先ず、XORブ
レーンに閉図形を描画する場合、第2図に示す如く閉図
形はいくつかのベクトルで構成される。これらベクトル
のY軸の傾きはプラス、マイナス、O(傾きなし)の3
つでおり、閉図形はこの3つの組み合せで構成されると
いって良い。
Next, the operation of this embodiment will be explained. First, when drawing a closed figure in the XOR brane, the closed figure is composed of several vectors as shown in FIG. The Y-axis slopes of these vectors are positive, negative, and O (no slope).
It can be said that a closed figure is composed of a combination of these three.

即ち、第2図においてaはプラスの傾きを、bはマイナ
スの傾きを、CはO(傾きなし)を示しており、これら
3つの組合せにより、ベクトルの始点を描画するかどう
かが第1表に示した如く決定される。
That is, in Figure 2, a indicates a positive slope, b indicates a negative slope, and C indicates O (no slope). Table 1 shows whether or not the starting point of the vector is drawn based on the combination of these three. It is determined as shown in .

第1表 第1表の左側の欄はベクトルの変化を示し、右側の欄は
左側の欄に示したベクトル変化があった場合に、現ベク
トルのスタートポイントを描画するかしないかを示して
いる。この場合、現ベクトルのスタートポイントを描画
すると、現ベクトルと前ベクトルの接続点は抜け、スタ
ートポイントを描画しない場合は前記両ベクトルの接続
点は恢けずに描画される。
Table 1 The left column of Table 1 shows changes in the vector, and the right column shows whether or not to draw the starting point of the current vector when there is a vector change shown in the left column. . In this case, when the start point of the current vector is drawn, the connection point between the current vector and the previous vector is omitted, and when the start point is not drawn, the connection point between the two vectors is drawn without being combined.

第1図のレジスタ1,2には図示されないマイクロプロ
セッサよりベクトルの始点のY座標YO9終点のY座標
Y1がロードされる。コンパレータ3は前記両Y座標を
比較し、傾き情報YO>Yl又はYO<Yl又はYO=
Y1がレジスタ4に出力される。なお、YO>Ylの時
はベクトルの傾きは十で、YO<Ylの時はベクトルの
傾きは−で、YO=Y1の時はベクトルの傾きはOであ
る。
Registers 1 and 2 in FIG. 1 are loaded with the Y coordinate YO9 of the starting point of the vector and the Y coordinate Y1 of the ending point by a microprocessor (not shown). The comparator 3 compares both Y coordinates and obtains tilt information YO>Yl or YO<Yl or YO=
Y1 is output to register 4. Note that when YO>Yl, the slope of the vector is 0, when YO<Yl, the slope of the vector is -, and when YO=Y1, the slope of the vector is O.

デコーダ6はレジスタ4及びレジスタ5から傾き情報を
読み込むが、その時このレジスタ4の傾き情報はレジス
タ5に保持される。このため、レジスタ5には常に前回
の傾き情報、即ち前ベクトルの傾き情報が保持される。
The decoder 6 reads the slope information from the register 4 and the register 5, and at this time, the slope information of the register 4 is held in the register 5. Therefore, the register 5 always holds the previous slope information, that is, the slope information of the previous vector.

デコーダ6はレジスタ4からの現ベクトルの傾きとレジ
スタ5からの前回のベクトルの傾きから、ベクトルの変
化を求め第1表に基づいて現ベクトルのスタートポイン
トを描画するかしないかを決定し、描画する場合はライ
ト信号100を出力する。
The decoder 6 calculates the change in the vector from the slope of the current vector from the register 4 and the slope of the previous vector from the register 5, determines whether or not to draw the starting point of the current vector based on Table 1, and draws the starting point of the current vector. If so, a write signal 100 is output.

第3図は第1図の装置によりベクトルとベクトルの接続
点を描画するかしないかを制御した描画例を示したもの
である。第3図(A>はベクトルの変化が十から十であ
るためスタートポイントを描画しないため、接続点に点
が残る。(B)はベクトルの変化が+から−であるため
スタートポイントを描画し、接続点の点が扱ける。以下
同様であるが第3図(F)は特別な例で、もともと図形
を描画する際に水平方向の線は描かなし)ため、第1表
とは違って接続点の点が後けているが、実際はこのよう
な場合は描かないため問題は生じない。
FIG. 3 shows an example of drawing in which whether or not to draw connection points between vectors is controlled by the apparatus shown in FIG. 1. Figure 3 (A> does not draw a start point because the vector changes from 10 to 10, so a point remains at the connection point. In (B), a start point is drawn because the vector changes from + to -. , connection points can be handled.The same applies hereafter, but Figure 3 (F) is a special example, and unlike Table 1, because horizontal lines are not originally drawn when drawing the figure). Although the connection points are behind, there is no problem because such cases are not actually drawn.

本実施例によれば、例えば、傾きカーから−へ変化する
ベクトルの接続点は抜けずに描画されるため、第4図の
ハに示すようなことが起こらず、。
According to this embodiment, for example, the connecting point of a vector whose slope changes from a curve to - is drawn without being missed, so that the problem shown in C of FIG. 4 does not occur.

XORモードで描画した場合でも、閉図形は必ず線対称
な1対の点を持つことになり、ハードウェアにて閉図形
を認識させることができる。従ってハードウェアにて高
速に閉図形の塗りつぶしを行うことが可能となる。
Even when drawn in the XOR mode, a closed figure always has a pair of symmetrical points, and the closed figure can be recognized by hardware. Therefore, it becomes possible to fill in a closed figure at high speed using hardware.

E発明の効果] 以上記述した如く本発明のXORモードによる描画制御
方式によれば、XORモードで閉図形を描画する際に隣
接する2つのベクトルの傾きから接続点のスタートポイ
ントを描画するかしないかを制御することにより、必要
な部分のベクトルとベクトルの接続点が扱けない描画処
理を行い得る効果がある。
E. Effects of the Invention] As described above, according to the drawing control method using the XOR mode of the present invention, when drawing a closed figure in the XOR mode, it is possible to determine whether or not to draw the starting point of a connecting point based on the slope of two adjacent vectors. By controlling this, it is possible to perform drawing processing that cannot handle the vectors of the necessary parts and the connection points of the vectors.

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

第1図は本発明のXORモードによる描画制御方式を適
用した描画制御方式の一実施例を示したブロック図、第
2図は第1図の装置にて描画する閉図形例を示した図、
第3図は第1図の装置により描画したベクトル例を示し
た図、第4図はXORモードで描画した従来の閉図形例
を示した図でおる。 1.2,4.5・・・レジスタ 3・・・コンパレータ 6・・・デコーダ 代理人 弁理士  本 1) 索 第4図 (F) OO 第3 o  、!、fJ<八り′よ・1 ・ 免ヤ(へろ 図
FIG. 1 is a block diagram showing an embodiment of a drawing control method to which the XOR mode drawing control method of the present invention is applied, and FIG. 2 is a diagram showing an example of a closed figure drawn by the apparatus shown in FIG.
FIG. 3 is a diagram showing an example of a vector drawn by the apparatus shown in FIG. 1, and FIG. 4 is a diagram showing an example of a conventional closed figure drawn in the XOR mode. 1.2, 4.5...Register 3...Comparator 6...Decoder agent Patent attorney Book 1) Search Figure 4 (F) OO No. 3 o,! , fJ<8ri'yo・1 ・Menya (Hero figure

Claims (1)

【特許請求の範囲】[Claims] ベクトルの始点及び終点のY座標を保持するY座標保持
手段と、前記始点、終点のY座標を比較してベクトルの
傾きを検出するベクトル傾き検出手段と、現ベクトルの
傾きと前ベクトルの傾きを別々に保持する傾き保持手段
と、現ベクトルと前ベクトルの傾きの変化を求めこの変
化に対応して両ベクトルの接続点のスタートポイントを
描画するかしないかを決定するスタートポイント描画決
定手段とを具備し、前記両ベクトルの傾きの変化状態に
よつてはXORモードにおける両ベクトルのスタートポ
イントを描画しない制御を行うことを特徴とするXOR
モードによる描画制御方式。
Y-coordinate holding means for holding the Y-coordinates of the starting point and ending point of a vector; vector inclination detecting means for detecting the inclination of the vector by comparing the Y-coordinates of the starting point and the ending point; A slope holding means that holds the current vector and the previous vector separately, and a start point drawing determining means that determines whether or not to draw a starting point at the connection point of both vectors in response to the change in the slope of the current vector and the previous vector. The XOR is characterized in that, depending on the change state of the slopes of the two vectors, control is performed so as not to draw the start points of the two vectors in the XOR mode.
Drawing control method based on mode.
JP18092585A 1985-08-20 1985-08-20 Drawing control system by xor mode Pending JPS6242273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18092585A JPS6242273A (en) 1985-08-20 1985-08-20 Drawing control system by xor mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18092585A JPS6242273A (en) 1985-08-20 1985-08-20 Drawing control system by xor mode

Publications (1)

Publication Number Publication Date
JPS6242273A true JPS6242273A (en) 1987-02-24

Family

ID=16091676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18092585A Pending JPS6242273A (en) 1985-08-20 1985-08-20 Drawing control system by xor mode

Country Status (1)

Country Link
JP (1) JPS6242273A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63245575A (en) * 1987-03-31 1988-10-12 Pfu Ltd Plotting system for connecting point of continuous segment
US4894730A (en) * 1987-05-26 1990-01-16 Casio Computer Co., Ltd. Manually sweeping contact sensitive copier with image data memory
JPH0916787A (en) * 1995-06-27 1997-01-17 Nippon Denki Micom Technol Kk Start point/end point plotting method for frame line for graphic painting-out
US6043986A (en) * 1995-09-19 2000-03-28 Nippondenso Co., Ltd. Printed circuit board having a plurality of via-holes
JP2014052782A (en) * 2012-09-06 2014-03-20 Fujitsu Semiconductor Ltd Line drawing device, line drawing method, and line drawing program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63245575A (en) * 1987-03-31 1988-10-12 Pfu Ltd Plotting system for connecting point of continuous segment
US4894730A (en) * 1987-05-26 1990-01-16 Casio Computer Co., Ltd. Manually sweeping contact sensitive copier with image data memory
JPH0916787A (en) * 1995-06-27 1997-01-17 Nippon Denki Micom Technol Kk Start point/end point plotting method for frame line for graphic painting-out
US6043986A (en) * 1995-09-19 2000-03-28 Nippondenso Co., Ltd. Printed circuit board having a plurality of via-holes
JP2014052782A (en) * 2012-09-06 2014-03-20 Fujitsu Semiconductor Ltd Line drawing device, line drawing method, and line drawing program

Similar Documents

Publication Publication Date Title
JP3679988B2 (en) Image processing apparatus and image processing method
US4818826A (en) Coordinate input apparatus including a detection circuit to determine proper stylus position
JPH01155484A (en) Character reader
JPH0214714B2 (en)
JPS6242273A (en) Drawing control system by xor mode
US4974172A (en) Image processing apparatus
JPH07210137A (en) Picture display controller in navigation
JPH0277825A (en) Hand-written character input display device
JPH07181051A (en) Running position display
JPS6336484A (en) Straight line drawing device for managing rectangle
JPH01251218A (en) Graphic processor
JPH01220963A (en) Picture input system
JPH04307683A (en) Electronic computer
JPH03296814A (en) Device for inputting coordinate position moving variable
JP2001195597A (en) Image processor
JP2985237B2 (en) Graphic processing unit
JPS61281289A (en) Clipping apparatus
JPH0573256A (en) Crosshair cursor generating device
JPH0235513A (en) Straight line plotting system
JPH04205575A (en) Rectangular area paint out method by dda and picture processor
JPS62140013A (en) Apparatus for correcting earth magnetism sensor
JPH03200008A (en) On-vehicle navigational aids
JPS63225882A (en) Clipping system for vector drawing having line width
JPH1195976A (en) Device and method for controlling output
JPS63223690A (en) Oval acr lithography apparatus