JP3067137B2 - Information processing device with line drawing function - Google Patents

Information processing device with line drawing function

Info

Publication number
JP3067137B2
JP3067137B2 JP26800889A JP26800889A JP3067137B2 JP 3067137 B2 JP3067137 B2 JP 3067137B2 JP 26800889 A JP26800889 A JP 26800889A JP 26800889 A JP26800889 A JP 26800889A JP 3067137 B2 JP3067137 B2 JP 3067137B2
Authority
JP
Japan
Prior art keywords
straight line
thickness
point
coordinates
information
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 - Fee Related
Application number
JP26800889A
Other languages
Japanese (ja)
Other versions
JPH03130884A (en
Inventor
浩文 宮垣
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP26800889A priority Critical patent/JP3067137B2/en
Publication of JPH03130884A publication Critical patent/JPH03130884A/en
Application granted granted Critical
Publication of JP3067137B2 publication Critical patent/JP3067137B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 この発明は、パーソナルコンピユータやオフイスコン
ピユータ、ワードプロセツサ、ワークステーシヨン、DT
P(デスク・トツプ・パブリツシング)、DPS(データ・
プロセツシング・システム)、CADその他各種のグラフ
イツクス処理機能を備えた情報処理装置の改良に係り、
特に、グラフイツクス処理における直線の描画に際し
て、複数ドツトの線幅で形成される直線を表示あるいは
印刷する際、その両端点における切り口(直線の長軸方
向と直交する線)の形状を、描画する直線の長軸方向に
対して直角にし、また、太め処理においてパターンを付
けた場合でも、そのパターンの切り口が、描画する直線
の長軸方向に対して直交する線上に配列されるようにし
て、太い直線の描画でも極めて高品質の表示/印刷が得
られるようにした直線描画機能を備えた情報処理装置に
関する。
The present invention relates to a personal computer, an office computer, a word processor, a workstation, and a DT.
P (desktop publishing), DPS (data
Processing systems), CAD and other information processing devices equipped with various graphics processing functions.
In particular, when drawing or drawing a straight line having a line width of a plurality of dots when drawing a straight line in the graphics processing, the shape of a cut (a line orthogonal to the long axis direction of the straight line) at each end point of the straight line is drawn. Perpendicular to the long axis direction, and even if a pattern is attached in the thickening process, the cut end of the pattern is arranged on a line orthogonal to the long axis direction of the straight line to be drawn, The present invention relates to an information processing apparatus having a straight line drawing function capable of obtaining extremely high-quality display / printing even when drawing straight lines.

従来の技術 現在、パーソナルコンピユータやワードプロセツサ、
ワークステーシヨン等の情報処理装置では、グラフイツ
クス処理機能を備えた機種の割合が高くなつており、直
線等の描画が行われている。
Conventional technology Currently, personal computers, word processors,
2. Description of the Related Art In information processing apparatuses such as workstations, the proportion of models having a graphics processing function is increasing, and straight lines and the like are drawn.

しかし、大半の機種では、直線等の描画処理について
は、1ドツトの線幅で処理しているのが現状である。
However, in most models, the drawing process of a straight line or the like is currently performed with a line width of one dot.

ところが、1ドツトの線幅の直線では、多様なニーズ
に対応できず、複数ドツトの線幅による直線の描画機能
が要求されている。
However, a line having a line width of 1 dot cannot meet various needs, and a function of drawing a line with a line width of a plurality of dots is required.

このような要求に対応するために、太線で処理する機
能を備えた機種も出現しているが、直線の切り口の形状
や、直線の太さに関しては、厳密な処理は殆ど行われて
いないのが現状である。
In order to respond to such demands, models having a function of processing with a thick line have appeared, but strict processing is hardly performed on the shape of a straight cut or the thickness of a straight line. Is the current situation.

ところで、近年、特に、DTP(デスク・トツプ・パブ
リツシング)分野では、技術的な発展が目覚ましく、そ
れに伴つて、印刷品質の向上のために、解像度の高い表
示装置や印刷装置が使用される傾向にある。
By the way, in recent years, especially in the field of desktop publishing (DTP), technical development has been remarkable, and accordingly, display devices and printing devices with high resolution have been used in order to improve print quality. is there.

そのため、表示あるいは印刷される図形の線の太さ
も、解像度の向上に対応して太くする必要が生じる。
Therefore, it is necessary to increase the thickness of the lines of the displayed or printed graphic in accordance with the improvement of the resolution.

その結果、解像度が低い従来の装置では、余り問題と
ならなかつた直線の両端点の切り口(直線の長軸方向と
直交する線)の形状も、解像度の向上に対応して無視で
きなくなりつつある。
As a result, in the conventional apparatus having a low resolution, the shape of the cuts at both end points of the straight line (a line orthogonal to the long axis direction of the straight line) which is not so much problematic cannot be ignored in response to the improvement of the resolution. .

次に、図面を参照しながら、従来の太線処理による直
線の描画方法について、詳しく説明する。
Next, a conventional straight line drawing method by thick line processing will be described in detail with reference to the drawings.

第7図(1)と(2)は、それぞれ従来の太線処理に
よる直線の描画の一例を示す図である。図面において、
aは直線の始点、bは終点、cは太さ、αとβはそれぞ
れ太さcの直線とx軸との間の角度を示す。
FIGS. 7 (1) and 7 (2) are diagrams each showing an example of drawing a straight line by conventional thick line processing. In the drawing,
a indicates the start point of the straight line, b indicates the end point, c indicates the thickness, and α and β indicate the angles between the straight line having the thickness c and the x-axis, respectively.

この第7図(1)と(2)では、それぞれ線幅が3ド
ツトの直線の場合を示している。
FIGS. 7 (1) and 7 (2) show the case where the line width is a straight line having 3 dots respectively.

このような直線の描画方法では、始点aと終点b、お
よび太さcの各情報を与えるだけでよいから、その描画
処理は簡単である。
In such a straight line drawing method, it is only necessary to provide information on the start point a, the end point b, and the thickness c, so that the drawing process is simple.

しかしながら、この直線描画方法では、直線が太くな
るにつれて、直線の両端点の形状が無視できなくなり、
しかも、直線の角度によつて、太さも異なつてしまう、
という不都合がある。
However, in this straight line drawing method, as the straight line becomes thicker, the shapes of both end points of the straight line cannot be ignored,
In addition, the thickness varies depending on the angle of the straight line,
There is an inconvenience.

すなわち、線幅が同じ3ドツトの直線であつても、そ
の両端点の形状(切り口)は、必然的に水平線あるいは
垂直線となるので、線幅が太くなると、両端の切り口の
不揃いが目立つてしまう上に、直線の角度(α<β)が
小さい第7図(1)の直線は、角度が大きい第7図
(2)の直線よりも太くみえる、という現象が生じる。
That is, even if the line width is the same as that of the three dots, the shape (cut) of the two end points is inevitably a horizontal line or a vertical line. In addition, a phenomenon occurs in which the straight line in FIG. 7 (1) having a small angle (α <β) looks thicker than the straight line in FIG. 7 (2) having a large angle.

このように、従来の太線の描画方法によれば、直線の
処理は比較的簡単であるが、直線の品質に問題がある。
As described above, according to the conventional thick line drawing method, processing of a straight line is relatively simple, but there is a problem in the quality of the straight line.

このような不都合を解決するため他の直線処理方法と
して、ペル描画方法も用いられている。
In order to solve such inconvenience, a pel drawing method is used as another straight line processing method.

このペル描画方法では、任意形状の図形を基本図形
(ペル)として使用し、この基本図形の連続的な繰返え
しによつて、同一線幅の描画を行つている。
In this pel drawing method, a figure of an arbitrary shape is used as a basic figure (pel), and drawing of the same line width is performed by continuously repeating the basic figure.

第8図は、従来のペル描画方法による直線の描画の一
例を示す図である。図面において、dは直線の始点、e
は終点、fは中心線、gは太さを示す。
FIG. 8 is a diagram showing an example of drawing a straight line by a conventional pel drawing method. In the drawing, d is the starting point of the straight line, e
Denotes an end point, f denotes a center line, and g denotes a thickness.

この第8図では、真円形状の基本図形によつて、直線
を描画する場合の一例を示している。グラフイツク処理
の場合、円の描画処理は、比較的簡単であり、中心点と
半径の情報を与えるだけで描画することが可能である。
FIG. 8 shows an example in which a straight line is drawn using a perfect circular basic figure. In the case of the graphic processing, the processing of drawing a circle is relatively simple, and it is possible to draw only by giving information on the center point and the radius.

第8図に示したペル描画方法では、直線の始点d、終
点eの情報によつて中心線fを設定し、太さgに対応す
る半径(g/2)の円を始点dから、中心線fに沿つて順
次移動させながら描画し、この円の描画処理を終点eま
で繰返えすことによつて、あらゆる角度において一定の
太さgの直線が得られる。
In the pel drawing method shown in FIG. 8, the center line f is set based on the information of the start point d and the end point e of the straight line, and a circle having a radius (g / 2) corresponding to the thickness g is shifted from the start point d to the center. By drawing while moving sequentially along the line f and repeating the drawing process of this circle to the end point e, a straight line having a constant thickness g can be obtained at any angle.

この第8図のペル描画方法によれば、その中心点の位
置の移動を細かくすることによつて、理論上は、一定の
太さの直線を得ることができる。
According to the pel drawing method shown in FIG. 8, it is theoretically possible to obtain a straight line having a constant thickness by finely moving the position of the center point.

この第8図では、ペル描画方法の原理を説明するため
に、隣接する円形(ペル)が、斜線を付けた部分のみで
重なつている場合を示している。
In FIG. 8, in order to explain the principle of the pel drawing method, a case where adjacent circles (pels) are overlapped only at the hatched portions is shown.

しかし、この場合には、直線を形成する上側と下側と
にドツト抜けが生じる。
However, in this case, dot missing occurs on the upper side and the lower side forming the straight line.

また、このドツト抜けを防止するために、円の中心の
移動を余り細かくすると、今度は隣接する円形(ペル)
が二重、三重に重なるので、描画処理時の演算が不可能
になる。
In addition, if the movement of the center of the circle is made very small in order to prevent the dot dropout, the next round (pel)
Doubly and triple overlap, so that the calculation at the time of the drawing process becomes impossible.

したがつて、実際上は、円の中心の最小移動距離に限
界があり、ドツト抜けが生じることは避けられない。
Therefore, in practice, there is a limit to the minimum moving distance of the center of the circle, and it is inevitable that dropout occurs.

例えば、描画時の論理演算を排他的論理和(XOR)処
理するときは、ペルの重なりが偶数回時に白となり、ド
ツト抜けが生じる。
For example, when exclusive OR (XOR) processing is performed for a logical operation at the time of drawing, the pel overlap becomes white when it is an even number of times, resulting in missing dots.

その上、基本図形として円形を使用すると、両端点の
切り口の形状も円形となるので、太い直線を描画する場
合には、この点でも品質が低下する、という不都合を生
じる。
In addition, if a circle is used as the basic figure, the shape of the cut at both end points is also circular, so that when a thick straight line is drawn, there is a disadvantage that the quality is also reduced at this point.

ここで、グラフイツクス処理機能を備えた従来の情報
処理システムの一例として、パーソナルコンピユータの
場合について、その構成を説明する。
Here, the configuration of a personal computer as an example of a conventional information processing system having a graphics processing function will be described.

第9図は、グラフイツクス処理機能を備えた従来の情
報処理システムについて、その一例を示す外観斜視図で
ある。図面において、1はキーボード等からなる入力装
置、2はポインテイングデバイス(位置入力装置)、3
はイメージスキヤナ、4はCRTデイスプレイユニツト、
5はプリンタ、6はFDD(フロツピー・デイスク・ドラ
イブ)ユニツト、7はHDD(ハード・デイスク・ドライ
ブ)ユニツト、8はシステム本体部を示す。
FIG. 9 is an external perspective view showing an example of a conventional information processing system having a graphics processing function. In the drawings, 1 is an input device such as a keyboard, 2 is a pointing device (position input device), 3
Is an image scanner, 4 is a CRT display unit,
Reference numeral 5 denotes a printer, 6 denotes a floppy disk drive (FDD) unit, 7 denotes a hard disk drive (HDD) unit, and 8 denotes a system main unit.

次の第10図は、第9図に示した従来の情報処理システ
ムについて、その要部構成の一例を示す機能ブロツク図
である。図面における符号は第9図と同様であり、ま
た、9はCPU、10はROM、11はRAM、12はキーボードコン
トローラ、13はポインテイングデバイス・コントロー
ラ、14はスキヤナコントローラ、15はCRTコントロー
ラ、16はプリンタコントローラ、17はFDDコントロー
ラ、18はHDDコントローラ、19は通信制御部、20はシス
テムバスを示す。
FIG. 10 is a functional block diagram showing an example of the configuration of the main part of the conventional information processing system shown in FIG. 9 are a CPU, 10 is a ROM, 11 is a RAM, 12 is a keyboard controller, 13 is a pointing device controller, 14 is a scanner controller, 15 is a CRT controller, Reference numeral 16 denotes a printer controller, 17 denotes an FDD controller, 18 denotes an HDD controller, 19 denotes a communication control unit, and 20 denotes a system bus.

第9図と第10図に示した情報処理システム、例えばパ
ーソナルコンピユータの各部の機能は、概略次のとおり
である。
The functions of each section of the information processing system shown in FIGS. 9 and 10, for example, a personal computer, are roughly as follows.

入力装置1はキーボード等からなり、システムの起動
その他の命令や、必要な文字情報等を入力する入力手段
である。この入力装置1から入力された情報は、キーボ
ードコントローラ12、システムバス20を介して、コンピ
ユータ側へ送出される。
The input device 1 includes a keyboard or the like, and is an input unit for inputting commands for starting the system and other necessary information and necessary character information. Information input from the input device 1 is transmitted to the computer via the keyboard controller 12 and the system bus 20.

ポインテイングデバイス2は、表示画面上の位置を指
示するポインタカーソルの入力手段(位置入力装置)で
あり、その入力情報も、ポインテイングデバイス・コン
トローラ13、システムバス20を介して、同じくコンピユ
ータ側へ送出される。
The pointing device 2 is a pointer cursor input means (position input device) for indicating a position on the display screen, and the input information is also sent to the computer via the pointing device controller 13 and the system bus 20. Sent out.

イメージスキヤナ3は、画像の入力手段で、読取られ
た画像情報は、スキヤナコントローラ14を介して、同様
にコンピユータ側へ送出される。
The image scanner 3 is an image input unit, and the read image information is similarly transmitted to the computer via the scanner controller 14.

CRTデイスプレイユニツト4は、作成中や作成済み文
書等の文字・数字情報や画像情報、さらに、操作に必要
なガイダンス等を、その画面上に、ドツトパターンで可
視表示する表示手段である。
The CRT display unit 4 is a display means for visually displaying character / numerical information and image information such as a document being created or a document which has been created, and guidance necessary for the operation on the screen in a dot pattern.

このCRTデイスプレイユニツト4には、CRTコントロー
ラ15が接続されており、ドツトパターンに展開されたデ
ータやガイダンスを、画面表示するよう制御する。
A CRT controller 15 is connected to the CRT display unit 4, and controls the data and guidance developed in the dot pattern to be displayed on a screen.

プリンタ5は、通電加熱式のヘツドを有する熱転写型
印刷装置、いわゆるサーマルドツト・プリンタや、イン
クジエツト・プリンタ、プランジヤーマグネツト型プリ
ンタ等のようなドツトイメージの印刷装置で、作成され
たデータにより、文書や伝票、画像等をドツトパターン
によつて印字する。
The printer 5 is a thermal transfer type printing apparatus having an electric heating type head, a so-called thermal dot printer, a dot image printing apparatus such as an ink jet printer, a plunger magnet type printer, or the like. Documents, slips, images, etc. are printed in a dot pattern.

このプリンタ5には、システムバス20、プリンタコン
トローラ16を介して、コンピユータ側から、作成された
文字・数字等のデータや画像情報、書式情報その他の制
御情報が与えられ、ハードコピーを作成する。
The printer 5 is provided with data such as characters and numerals, image information, format information, and other control information from the computer via the system bus 20 and the printer controller 16 to create a hard copy.

FDDユニツト6のプロツピー・デイスクと、HDDユニツ
ト7のハード・デイスクは、外部記憶装置であり、読出
された情報は、FDDコントローラ17やHDDコントローラ1
8、システムバス20を介して、コンピユータ側へ送出さ
れる。なお、外部記憶装置としては、磁気デイスク、磁
気テープその他の大容量の記憶装置を使用することもで
きる。
The propy disk of the FDD unit 6 and the hard disk of the HDD unit 7 are external storage devices, and the read information is stored in the FDD controller 17 or the HDD controller 1.
8. The data is transmitted to the computer via the system bus 20. As the external storage device, a magnetic disk, a magnetic tape, or other large-capacity storage device can be used.

CPU9と、ROM10と、RAM11は、パーソナルコンピユータ
のシステム制御部を構成している。
The CPU 9, the ROM 10, and the RAM 11 constitute a system control unit of the personal computer.

すなわち、ROM10には、システムを制御するプログラ
ムやキヤラクタパターンデータ等が格納されており、ま
た、RAM11は、必要なデータを格納するシステムメモリ
である。
That is, the ROM 10 stores a program for controlling the system, character pattern data, and the like, and the RAM 11 is a system memory for storing necessary data.

CPU9は、第10図のシステム全体を制御する。例えば、
入力装置1からのキー情報を受取り、それに対応した処
理動作や制御指令の出力等を行い、また、キー入力情報
に基いて、CRTデイスプレイ4やプリンタ5へデータを
出力したり、イメージスキヤナ3から画像データを入力
し、さらに、FDDユニツト6のフロツピー・デイスク
や、HDDユニツト7のハード・デイスクをアクセスし、
通信制御部19を介してデータの授受を行う等の各種の制
御を司る。
The CPU 9 controls the entire system of FIG. For example,
It receives key information from the input device 1 and performs corresponding processing operations and output of control commands, etc., and outputs data to the CRT display 4 and the printer 5 based on the key input information, Input the image data, and access the floppy disk of the FDD unit 6 and the hard disk of the HDD unit 7,
It controls various controls such as data transmission and reception via the communication control unit 19.

通信制御部19は、他の通信端末装置との間で授受する
情報の制御を司る。
The communication control unit 19 controls information to be exchanged with another communication terminal device.

パーソナルコンピユータやワードプロセツサ等の直線
描画機能を備えた情報処理システムは、この第10図のよ
うな構成である。
An information processing system having a straight line drawing function, such as a personal computer or a word processor, has a configuration as shown in FIG.

そして、すでに、先の第7図(1)と(2)に関連し
て詳しく説明したように、始点aと終点b、および太さ
cの各情報を与えるだけの比較的簡単な直線描画方法で
は、線幅が複数ドツトからなる太い直線を描画する場
合、直線の両端点の形状が無視できなくなり、しかも、
直線の角度(直線の傾斜)によつて、実際の太さも異な
つてしまう、という不都合がある。
As described in detail with reference to FIGS. 7 (1) and (2) above, a relatively simple straight line drawing method for giving each information of the starting point a and the ending point b and the thickness c. In the case of drawing a thick straight line composed of multiple dots, the shape of both ends of the straight line cannot be ignored.
There is a disadvantage that the actual thickness differs depending on the angle of the straight line (the inclination of the straight line).

また、第8図に示したペル描画方法によつて直線を描
画すれば、あらゆる角度において太さ一定の直線を得る
ことはできるが、中心点の移動を細かく制御すると、描
画処理時の演算が不可能になるので、実際上はその最小
移動距離に限界があり、ドツト抜けが生じる。
If a straight line is drawn by the pel drawing method shown in FIG. 8, a straight line having a constant thickness can be obtained at any angle. However, if the movement of the center point is finely controlled, the calculation at the time of drawing processing becomes difficult. Since it becomes impossible, the minimum moving distance is practically limited, and dot dropout occurs.

その上、基本図形として描画処理が比較的容易な円形
を使用すると、両端点の形状も円形となるので、太い直
線の場合には、品質が低下してしまう、という不都合も
生じる。
In addition, when a circle whose drawing processing is relatively easy is used as the basic figure, the shape of the both end points is also circular, so that in the case of a thick straight line, there is an inconvenience that the quality is reduced.

このように、直線描画機能を備えた従来の情報処理装
置では、複数のドツトから構成された太い直線を描画す
る場合、直線の角度によつて太さが異なつてしまつた
り、両端の切り口が不自然となつたりするので、解像度
が高くなると、見難くい直線が描画されることになり、
直線の品質の低下は免がれない、という不都合があつ
た。
As described above, in a conventional information processing apparatus having a straight line drawing function, when a thick straight line composed of a plurality of dots is drawn, the thickness may be different depending on the angle of the straight line, and cut edges at both ends may be cut. As the resolution becomes higher, straight lines that are difficult to see will be drawn,
There was an inconvenience that the quality of the straight line could not be reduced.

発明が解決しようとする課題 この発明の直線描画機能を備えた情報処理装置では、
従来の直線描画において生じるこのような不都合、すな
わち高解像度の表示/印刷が可能な情報処理装置におけ
る直線の品質の低下という不都合を解決し、太い直線を
表示あるいは印刷する場合でも、直線の両端の切り口
(直線の両端の形状)が、常にその長軸方向と直交する
直線上に配列されると共に、一定の太さとなるように形
成することにより、高品質の直線が得られるようにした
情報処理装置を提供することを目的とする。
SUMMARY OF THE INVENTION In an information processing apparatus having a straight line drawing function according to the present invention,
In order to solve such inconvenience that occurs in the conventional straight line drawing, that is, the inconvenience of deteriorating the quality of a straight line in an information processing apparatus capable of high-resolution display / printing, even when a thick straight line is displayed or printed, both ends of the straight line are displayed. Information processing that cuts (shapes at both ends of the straight line) are always arranged on a straight line orthogonal to the long axis direction and are formed to have a constant thickness so that a high-quality straight line can be obtained. It is intended to provide a device.

具体的にいえば、直線の始点と終点との2点の座標上
において、2点間を結ぶ直線に対して直角な座標を演算
することにより、描画される直線の両端の切り口が、そ
の長軸方向と直交する方向となると共に、直線の角度に
よつて太さが変化しないように、太さの量の決定に際し
て、角度をパラメータとしてドツトが配列される座標を
演算することにより、高品質の直線が得られるようにし
た直線描画機能を備えた情報処理装置を提供することを
目的とする。
Specifically, on the coordinates of the two points, the start point and the end point of the straight line, the coordinates at right angles to the straight line connecting the two points are calculated, so that the cut ends at both ends of the drawn straight line have the same length. When determining the amount of thickness, the coordinates at which dots are arranged are calculated using the angle as a parameter when determining the amount of thickness so that the thickness is not changed by the angle of the straight line. It is an object of the present invention to provide an information processing apparatus having a straight line drawing function capable of obtaining a straight line.

課題を解決するための手段 この発明では、 入力装置と、記憶装置と、表示装置と、印刷装置と、
これらを制御する中央処理装置とを具備すると共に、入
力装置あるいは記憶装置から与えられる直線の始点およ
び終点の2点の座標情報Ps(xs,ys)、Qe(xe,ye)と、
太さtの情報とを記憶する直線の始点,終点,太さ情報
記憶手段を具備し、入力装置あるいは記憶装置から読込
んだ座標値に基いて4連結描画法と8連結描画法による
直線描画機能を備えた情報処理システムにおいて、 直線の始点,終点,太さ情報記憶手段に記憶された太
さtの情報により、該直線の始点Ps(xs,ys)および終
点Pe(xe,ye)のx方向とy方向のオフセツトΔx,Δ
y、および該直線の始点と終点の両点を結ぶ直線の長さ
lを求め、太さtに対応する始点Qs(xs′,ys′)およ
び終点Qe(xe′,ye′)を計算して、該直線の始点Ps(x
s,ys)と太さtに対応する始点Qs(xs′,ys′)とを結
ぶ直線を4連結方式で計算し、該直線の終点Pe(xe,y
e)と太さtに対応する終点Qe(xe′,ye′)とを結ぶ直
線の座標を、該直線の始点と終点の両点を結ぶ直線上の
座標とオフセツトΔx,Δyとにより演算する直交座標演
算手段を設け、 直線の描画時に、直交座標演算手段により、指示され
た直線の始点側Ps,Qsおよび終点側Pe,Qeについて、太さ
tの情報に対応する直交座標値を4連結描画法よつて演
算することにより、直線の両端の切り口を描画すると共
に、始点側Ps,Qsの直線上の座標と終点側Pe,Qeの直線上
の座標との間を8連結描画法によつて描画するようにし
ている。
Means for Solving the Problems According to the present invention, an input device, a storage device, a display device, a printing device,
A central processing unit for controlling these, coordinate information Ps (xs, ys) and Qe (xe, ye) of two points of a start point and an end point of a straight line given from an input device or a storage device;
It has a starting point and an ending point of a straight line for storing information of the thickness t, and a thickness information storage means, and draws a straight line by a 4-connected drawing method and an 8-connected drawing method based on coordinate values read from an input device or a storage device. In the information processing system having the function, the start point Ps (xs, ys) and the end point Pe (xe, ye) of the straight line are obtained based on the information of the start point, the end point of the straight line, and the thickness t stored in the thickness information storage means. Offset Δx, Δ in x direction and y direction
y, and the length l of a straight line connecting both the starting point and the ending point of the straight line, and calculating the starting point Qs (xs ', ys') and the ending point Qe (xe ', ye') corresponding to the thickness t. And the starting point Ps (x
s, ys) and a straight line connecting the starting point Qs (xs ', ys') corresponding to the thickness t is calculated by a four-connection method, and the ending point Pe (xe, y) of the straight line is calculated.
e) and the coordinates of a straight line connecting the end point Qe (xe ', ye') corresponding to the thickness t are calculated from the coordinates on a straight line connecting both the start point and the end point of the straight line and the offsets Δx, Δy. At the time of drawing a straight line, the rectangular coordinate calculating means connects the rectangular coordinate values corresponding to the information of the thickness t with respect to the starting point side Ps, Qs and the ending point side Pe, Qe of the specified straight line. By calculating by the drawing method, the cuts at both ends of the straight line are drawn, and the coordinates on the straight line of the starting point Ps, Qs and the coordinates of the straight line of the ending point Pe, Qe are drawn by the 8-connected drawing method. To draw.

実 施 例 次に、この発明の直線描画機能を備えた情報処理装置
について、図面を参照しながら、その実施例を詳細に説
明する。
Next, an embodiment of an information processing apparatus having a straight line drawing function according to the present invention will be described in detail with reference to the drawings.

理解を容易にするために、最初に、この発明の情報処
理装置における直線処理のアルゴリズムについて説明す
る。
First, an algorithm of the straight line processing in the information processing apparatus of the present invention will be described for easy understanding.

第2図は、この発明の直線描画機能を備えた情報処理
装置における太い直線を描画する処理のアルゴリズムを
説明するための図である。図面において、Psは直線の始
点で、(xs,ys)は始点Psの座標、Peは終点で、(xe,y
e)は終点Peの座標、lは直線の長さ、tは直線の太さ
(線幅)、Qsは太さtの始点で、(xs′,ys′)は太さ
tの始点Qsの座標、Qeは太さtの終点で、(xe′,y
e′)は太さtの終点Qeの座標、Δxは始点Psと終点Pe
のx方向の距離、Δyは始点Psと終点Peのy方向の距
離、Δx′は終点Qeの座標と太さtの終点Qeの座標のx
方向の距離、Δy′は終点Qeの座標と太さtの終点Qeの
座標のy方向の距離、αは直線とx軸との間の角度を示
す。
FIG. 2 is a diagram for explaining an algorithm of processing for drawing a thick straight line in the information processing apparatus having the straight line drawing function of the present invention. In the drawing, Ps is the start point of the straight line, (xs, ys) is the coordinates of the start point Ps, Pe is the end point, and (xe, y
e) is the coordinates of the end point Pe, l is the length of the straight line, t is the thickness of the straight line (line width), Qs is the starting point of the thickness t, and (xs ', ys') is the starting point Qs of the thickness t. Coordinate, Qe is the end point of thickness t, (xe ', y
e ′) is the coordinates of the end point Qe of thickness t, Δx is the start point Ps and end point Pe
Δy is the distance between the start point Ps and the end point Pe in the y direction, and Δx ′ is the coordinate of the end point Qe and the coordinate of the end point Qe of thickness t.
The distance in the direction, Δy ′ is the distance between the coordinates of the end point Qe and the coordinates of the end point Qe having the thickness t in the y direction, and α is the angle between the straight line and the x axis.

この第2図に示すような太さtの直線を描画する場合
には、オペレータは、編集画面上で、直線の始点Psと終
点Pe、および太さtを指示する。
When drawing a straight line having a thickness t as shown in FIG. 2, the operator designates a start point Ps and an end point Pe of the straight line and a thickness t on the editing screen.

この始点Ps,終点Pe,太さtの情報に基いて、直線の長
さl、終点Qeの座標と太さtの終点Qeの座標のx方向の
距離Δx′,終点Qeの座標と太さtの終点Qeの座標のy
方向の距離Δy′を演算する。
Based on the information of the start point Ps, the end point Pe, and the thickness t, the distance lx 'in the x direction between the coordinates of the end point Qe and the coordinates of the end point Qe of the thickness t, and the coordinates and thickness of the end point Qe y of the coordinates of the end point Qe of t
The distance Δy ′ in the direction is calculated.

まず、直線の長さlは、始点Psと終点Peのx方向の距
離Δxと、始点Psと終点Peのy方向の距離Δyとから演
算する。
First, the length l of the straight line is calculated from the distance Δx between the start point Ps and the end point Pe in the x direction and the distance Δy between the start point Ps and the end point Pe in the y direction.

すなわち、第2図から明らかなように、 Δx=xe−xs ……(1) Δy=ye−ys ……(2) であるから、 が得られる。That is, as is clear from FIG. 2, Δx = xe−xs (1) Δy = ye−ys (2) Is obtained.

次に、これらの演算値l,t,Δx,Δy,終点Peの座標(x
e,ye)によつて、太さtの終点Qeの座標(xe′,ye′)
に対応するx方向とy方向の距離Δx′,Δy′を求め
る。
Next, the calculated values l, t, Δx, Δy, and the coordinates (x
e, ye), the coordinates (xe ', ye') of the end point Qe of thickness t
Are obtained in the x direction and the y direction corresponding to Δx ′ and Δy ′.

この関係も第2図から明らかであるが、角度αについ
ては、 cos α=Δx/l=Δy′/t ……(4) の関係が成立し、この式(4)を整理すると、 Δy′=Δx・t/l ……(5) が得られる。
This relationship is also evident from FIG. 2, but with respect to the angle α, the relationship cos α = Δx / l = Δy ′ / t (4) holds, and when this equation (4) is rearranged, Δy ′ = Δx · t / l (5)

同様に、 sin α=Δy/l=Δx′/t ……(6) であるから、 Δx′=Δy・t/l ……(7) が得られる。 Similarly, since sin α = Δy / l = Δx ′ / t (6), Δx ′ = Δy · t / l (7) is obtained.

そして、直線の切り口が、その長さ方向に対して直角
となるためには、角度αが変化しても、常に太さtを一
定にすることが必要である。
In order for the straight cut to be perpendicular to the length direction, it is necessary to keep the thickness t constant even when the angle α changes.

ここで、終点Pe(xe,ye)と、この終点に対する太さ
tの座標Qe(xe′,ye′)との関係を考察すれば、 xe′=xe+Δy・t/l ……(8) ye′=ye+Δx・t/l ……(9) となる。
Here, considering the relationship between the end point Pe (xe, ye) and the coordinate Qe (xe ', ye') of the thickness t with respect to this end point, xe '= xe + Δy · t / l (8) ye '= Ye + Δx · t / l (9)

その理由は、第2図から明らかなように、太さtの座
標Qeは、x方向について、xe′の位置は、xeにΔx′を
加えた値であるから、 xe′=xe+Δx′ ……(10) となり、Δx′は上記の式(7)で表わされるので、こ
の式(7)を式(10)へ代入することによつて、 xe′=xe+Δy・t/l すなわち、上記の式(8)が得られる。
The reason is that, as is clear from FIG. 2, the coordinate Qe of the thickness t is the value of xe plus Δx ′ in the x direction, and thus the position of xe ′ is xe ′ = xe + Δx ′. (10) Since Δx ′ is expressed by the above equation (7), by substituting the equation (7) into the equation (10), xe ′ = xe + Δy · t / l, that is, the above equation (8) is obtained.

y方向についても同様で、式(9)が成立する。 The same holds true for the y direction, and equation (9) holds.

同様に、始点Ps(xs,ys)と、この始点Psに対する太
さtの座標Qs(xs′,ys′)との関係を考察すれば、 xs′=xs+Δy・t/l ……(11) ys′=ys+Δx・t/l ……(12) となる。
Similarly, considering the relationship between the starting point Ps (xs, ys) and the coordinates Qs (xs ′, ys ′) of the thickness t with respect to the starting point Ps, xs ′ = xs + Δy · t / l (11) ys ′ = ys + Δx · t / l (12)

この発明の情報処理装置では、以上に説明した式
(1)〜(3),(8),(9),(11),(12)を用
いて、指示された始点Psと終点Pe、および太さtに対応
する直線の描画を行う。
In the information processing apparatus of the present invention, the specified start point Ps and end point Pe, and the equations (1) to (3), (8), (9), (11), and (12) described above are used. A straight line corresponding to the thickness t is drawn.

以上の第2図に関連して説明した演算処理と演算結果
による描画、すなわち、この発明の情報処理装置によつ
て実行される一定の太さを有し、両端の切り口が長軸方
向に直交する直線の描画処理は、次に述べる第1図の機
能によつて実現される。
The processing described with reference to FIG. 2 and the drawing based on the calculation result, that is, having a constant thickness to be executed by the information processing apparatus of the present invention, and having cuts at both ends orthogonal to the long axis direction. The drawing processing of the straight line is realized by the function of FIG. 1 described below.

第1図は、この発明の直線描画機能を備えた情報処理
装置について、その要部構成の詳細な一実施例を示す機
能ブロツク図である。図面において、21は入力バツフ
ア、22は第1のバツフア、23は第2のバツフア、24は第
3のバツフア、25は第4のバツフア、26はページバツフ
ア、31は数値演算部、32は4連結直線発生器、33は8連
結直線発生器、34はパターンジエネレータを示す。
FIG. 1 is a functional block diagram showing a detailed embodiment of a main part configuration of an information processing apparatus having a straight line drawing function according to the present invention. In the drawing, 21 is an input buffer, 22 is a first buffer, 23 is a second buffer, 24 is a third buffer, 25 is a fourth buffer, 26 is a page buffer, 31 is a numerical operation unit, and 32 is a 4-connected unit. A straight line generator, 33 is an 8-connected straight line generator, and 34 is a pattern generator.

この第1図に示すブロツク図で、符号21〜26はメモリ
部側の構成で、31〜34はプロセツサ側の構成を示してい
る。
In the block diagram shown in FIG. 1, reference numerals 21 to 26 denote configurations on the memory portion side, and reference numerals 31 to 34 denote configurations on the processor side.

まず、メモリ部側について説明する。 First, the memory section will be described.

入力バツフア21は、始点Ps,終点Pe,太さtの情報を記
憶するメモリである。
The input buffer 21 is a memory for storing information of a start point Ps, an end point Pe, and a thickness t.

第1のバツフア22は、前記の式(1)と(2)によつ
て算出される値Δxと、Δyとを記憶するメモリであ
る。
The first buffer 22 is a memory for storing the values Δx and Δy calculated by the above equations (1) and (2).

第2のバツフア23は、前記の式(3)によつて算出さ
れる長さlの値を記憶するメモリである。
The second buffer 23 is a memory for storing the value of the length 1 calculated by the above equation (3).

第3のバツフア24は、前記の式(11),(12),
(8),(9)によつて算出される値xs′,ys′,xe′,y
e′を記憶するメモリである。
The third buffer 24 is based on the above equations (11), (12),
Values xs', ys', xe ', y calculated by (8) and (9)
This is a memory for storing e '.

第4のバツフア25は、4連結直線発生器32から出力さ
れる始点側の座標と終点側の座標との間に配列されるド
ツトの座標情報を記憶するメモリである。
The fourth buffer 25 is a memory for storing dot coordinate information output between the coordinates on the starting point side and the coordinates on the ending point side output from the 4-connected straight line generator 32.

ページバツフア26は、8連結直線発生器33から出力さ
れる直線を形成するドツトの座標情報を記憶するメモリ
である。
The page buffer 26 is a memory for storing coordinate information of dots forming a straight line output from the 8-connected straight line generator 33.

次に、プロセツサ側について説明する。 Next, the processor side will be described.

数値演算部31は、上述した式(1)〜(3),
(8),(9),(11),(12)の演算を行う機能を有
している。
The numerical operation unit 31 calculates the expressions (1) to (3),
It has a function to perform the operations of (8), (9), (11), and (12).

4連結直線発生器32は、従来と同様の構成で、この発
明の直線描画機能を備えた情報処理装置では、直線の切
り口(長さ方向に対して直角方向の直線)の座標値を演
算するための機能する。
The four-connected straight line generator 32 has the same configuration as the conventional one, and in the information processing apparatus having the straight line drawing function of the present invention, calculates the coordinate value of the cut line of the straight line (the straight line perpendicular to the length direction). To work for.

すなわち、始点側の太さtの座標Qs(xs′,ys′)と
始点の座標Ps(xs,ys)、および終点側の太さtの座標Q
e(xe′,ye′)と終点の座標Pe(xe′,ye′)との間に
それぞれ形成される直線の座標を、4連結描画法によつ
て演算する。演算された両座標間を結ぶ4連結直線のド
ツト軌跡の座標情報は、第4のバツフア25へ出力され
て、記憶される。
That is, the coordinates Qs (xs ', ys') of the thickness t on the start point side, the coordinates Ps (xs, ys) of the start point, and the coordinates Q of the thickness t on the end point side
The coordinates of the straight lines formed between e (xe ', ye') and the coordinates Pe (xe ', ye') of the end point are calculated by the 4-connected drawing method. The calculated coordinate information of the dot trajectory of the four connecting straight lines connecting the two coordinates is output to the fourth buffer 25 and stored.

次の第3図(1)と(2)は、4連結描画法による直
線描画の一例を示す図で、(1)はあるドツトに対して
次のドツトが選択できる位置を示し、(2)は基本的な
直線のドツト配列の一例を示す図である。図面におい
て、 は基準となるドツト、×印は次にくるドツトが入り得る
位置を示す。
FIGS. 3 (1) and (2) show an example of straight line drawing by the 4-connected drawing method. FIG. 3 (1) shows a position where a next dot can be selected with respect to a certain dot, and (2) FIG. 4 is a diagram showing an example of a basic linear dot arrangement. In the drawing, Indicates a dot as a reference, and an x indicates a position where the next dot can enter.

この4連結描画法の場合には、第3図(1)に示すよ
うに、上下左右の4方向に対してだけ、次のドツトの位
置を与えることができる。そのため、斜め方向のドツト
を形成するときは、上下方向と左右方向とに対して計2
回、ドツト位置を指定しなければならないが、ドツト抜
けは生じない、という利点がある。
In the case of the four-link drawing method, as shown in FIG. 3A, the next dot position can be given only in four directions, up, down, left, and right. Therefore, when forming a dot in an oblique direction, a total of two dots in the vertical and horizontal directions
Each time, the dot position must be specified, but there is an advantage that the dot dropout does not occur.

そして、この4連結描画法では、先の第2図に関連し
て説明したように、直線の始点側のQs,Ps、また、終点
側のQe,Peの座標が決定した状態では、その始点Qs(ま
たはQe)と、終点Ps(またはPe)の座標情報、およびそ
の傾きの状態に基づいて、この第3図(2)に示すよう
な関係で、順次ドツトを配列して直線を描画する。
In this four-connected drawing method, as described in connection with FIG. 2, when the coordinates of Qs and Ps on the starting point side of the straight line and Qe and Pe on the ending point side are determined, the starting point Based on the coordinate information of Qs (or Qe), the coordinates of the end point Ps (or Pe), and the state of the inclination, dots are sequentially arranged in a relationship as shown in FIG. .

4連結直線発生器32は、このような直線を描線する機
能を有しており、順次演算されたドツト軌跡の座標値
は、一旦、第4のバツフア25に記憶される。なお、これ
らの座標値は、後述する8連結直線発生器33へ入力され
る。
The four-connected straight line generator 32 has a function of drawing such a straight line, and the coordinate values of the dot trajectory calculated sequentially are temporarily stored in the fourth buffer 25. Note that these coordinate values are input to an 8-connected straight line generator 33 described later.

8連結直線発生器33も、従来と同様の構成で、4連結
直線発生器32によつて発生された始点側の座標と終点側
の座標の各情報を順次与えることによつて、8連結描画
法により、両座標間を結ぶ8連結直線のドツト軌跡を演
算して、ページバツフア26へ出力する。
The 8-connected straight line generator 33 also has the same configuration as the conventional one, and sequentially gives each information of the coordinates on the starting point side and the coordinates on the end point side generated by the 4-connected straight line generator 32, thereby performing the 8-connected drawing. The dot trajectory of the eight connected straight lines connecting the two coordinates is calculated by the method and output to the page buffer 26.

第4図(1)と(2)は、8連結描画法による直線描
画の一例を示す図で、(1)はあるドツトに対して次の
ドツトが選択できる位置を示し、(2)は基本的な直線
のドツト配列の一例を示す図である。図面における記号
は、第3図と同様である。
FIGS. 4 (1) and (2) show an example of straight line drawing by the 8-connected drawing method, where (1) shows a position where a next dot can be selected for a certain dot, and (2) shows a basic position. FIG. 7 is a diagram showing an example of a typical linear dot arrangement. The symbols in the drawing are the same as in FIG.

この8連結描画法の場合には、第4図(1)に示すよ
うに、基準となるドツト に対して、×印を付けた周囲8箇所が、次にくるドツト
の入り得る位置となるので、傾きの状態に応じて、始点
の右上,右横,右上,右横,……の順序でドツトを配列
して、第4図のような直線を描画する。なお、この8連
結描画法それ自体は、すでに述べたように公知であり、
また、4連結描画法に比べて斜め方向へのドツト指定が
可能である点で優れているが、反面でドツト抜けが生じ
る、という問題がある。しかし、この発明の情報処理装
置では、最初に4連結描画法によつて直線の切り口を形
成するドツト位置を決定し、長さ方向のドツト形成にこ
の8連結直線発生器33を使用するので、切り口の形状が
きれいな直線状で、太さが一定の直線が得られる。
In the case of the 8-connected drawing method, as shown in FIG. On the other hand, the eight places marked with a cross mark are the positions where the next dot can enter, so that the upper right, right side, upper right, right side,... The dots are arranged and a straight line as shown in FIG. 4 is drawn. Note that this 8-connected drawing method itself is known as described above,
Also, it is excellent in that dots can be specified in an oblique direction as compared with the four-link drawing method, but there is a problem that dots are missing on the other hand. However, in the information processing apparatus according to the present invention, the dot position at which a straight cut is formed is first determined by the 4-connected drawing method, and the 8-connected straight line generator 33 is used for forming the dot in the longitudinal direction. A straight line with a uniform cut shape and a constant thickness can be obtained.

パターンジエネレータ34は、マスク処理に必要なパタ
ーンデータを発生する機能を有しており、先に演算され
て、第4のバツフア25に格納されている始点側の座標と
終点側の座標とを順次出力する際、このパターンジエネ
レータ34から出力されるパターンデータを、8連結直線
発生器33へ入力することによつて、ページバツフア26に
描画される直線にパターンを付けることができる。
The pattern generator 34 has a function of generating pattern data necessary for mask processing. The pattern generator 34 calculates the coordinates of the start point and the coordinates of the end point stored in the fourth buffer 25 in advance. When sequentially outputting the pattern data, the pattern data output from the pattern generator 34 is input to the 8-connected straight line generator 33, whereby a pattern can be added to the straight line drawn on the page buffer 26.

次に、フローチヤートを参照しながら、第1図に示し
たこの発明の情報処理装置について、直線描画時の動作
を説明する。
Next, the operation of the information processing apparatus of the present invention shown in FIG. 1 when drawing a straight line will be described with reference to a flowchart.

第5図は、この発明の情報処理装置における直線描画
時の主要な処理の流れを示すフローチヤートである。図
面において、#1〜#6はステツプを示す。
FIG. 5 is a flowchart showing a main processing flow at the time of straight line drawing in the information processing apparatus of the present invention. In the drawing, # 1 to # 6 indicate steps.

この第5図に示すように、ステツプ#1で、キーボー
ド、あるいはポインテイングデバイス等の座標入力装置
によつて、先の第2図の画面上で、直線の始点Psの座標
(xs,ys),終点Peの座標(xe,ye),直線の太さtに対
応する位置、例えば座標(xe′,ye′)を指示すると、
入力された各情報が、第1図の入力バツフア21に記憶さ
れる。
As shown in FIG. 5, in step # 1, the coordinates (xs, ys) of the start point Ps of the straight line are displayed on the screen shown in FIG. 2 by a coordinate input device such as a keyboard or a pointing device. , The coordinates (xe, ye) of the end point Pe, and the position corresponding to the thickness t of the straight line, for example, the coordinates (xe ′, ye ′)
The input information is stored in the input buffer 21 shown in FIG.

ステツプ#2では、第1図の数値演算部31によつて、
入力バツフア21の情報に基き、 Δx=xe−xs ……(1) Δy=ye−ys ……(2) の演算を実行し、式(1)と(2)の演算結果を第1の
バツフア22へ、式(3)の演算結果を第2のバツフア23
へ、それぞれ記憶させる。
In step # 2, the numerical operation unit 31 shown in FIG.
Based on the information in the input buffer 21, Δx = xe−xs (1) Δy = ye−ys (2) Is performed, the calculation results of Expressions (1) and (2) are transferred to the first buffer 22, and the calculation result of Expression (3) is transferred to the second buffer 23.
To each of them.

ステツプ#3で、第1のバツフア22と第2のバツフア
23の内容、および入力バツフア21の内容から、次の計算
式による演算を、数値演算部31によつて実行する。
In step # 3, the first buffer 22 and the second buffer
Based on the contents of 23 and the contents of the input buffer 21, an arithmetic operation according to the following equation is executed by the numerical operation unit 31.

xs′=xs+Δy・t/l ……(11) ys′=ys+Δx・t/l ……(12) xe′=xe+Δy・t/l ……(8) ye′=ye+Δx・t/l ……(9) これらの式(11),(12),(8),(9)によつて
計算された(xs′,ys′),(xe′,ye′)の座標値を、
それぞれ第3のバツフア24へ記憶させる。
xs ′ = xs + Δy · t / l (11) ys ′ = ys + Δx · t / l (12) xe ′ = xe + Δy · t / l (8) ye ′ = ye + Δx · t / l (8) 9) The coordinate values of (xs ', ys') and (xe ', ye') calculated by these equations (11), (12), (8) and (9) are
Each is stored in the third buffer 24.

ステツプ#4で、入力バツフア21に格納されている座
標値(xs,ys)と、第3のバツフア24に格納されている
座標値(xe′,ye′)の情報を、4連結直線発生器32へ
入力することによつて、始点側の座標Ps(xs,ys)と、
座標Qs(xs′,ys′)とを結ぶ4連結直線のドツト軌跡
座標を、第4のバツフア25へ出力する。
In step # 4, information of the coordinate values (xs, ys) stored in the input buffer 21 and the coordinate values (xe ', ye') stored in the third buffer 24 is converted to a four-connected linear generator. By inputting to 32, the coordinates Ps (xs, ys) on the starting point side and
The dot trajectory coordinates of the four connected straight lines connecting the coordinates Qs (xs ', ys') are output to the fourth buffer 25.

ステツプ#5で、第4のバツフア25へ出力されたx座
標とy座標に、先のステツプ#2で第1のバツフア22に
格納した演算結果のΔx,Δyをそれぞれ加算することに
よつて、終点側の座標Pe(xe,ye)とQe(xe′,ye′)と
をそれぞれ結ぶ4連結直線のドツト軌跡座標を、第4の
バツフア25へ出力する。
In step # 5, the x and y coordinates output to the fourth buffer 25 are added to the x and y coordinates of the operation result stored in the first buffer 22 in step # 2, respectively. The dot trajectory coordinates of the four connecting straight lines connecting the coordinates Pe (xe, ye) and Qe (xe ', ye') on the end point are output to the fourth buffer 25.

ステツプ#6で、第4のバツフア25内の始点側の座標
(xs,ys)と終点側の座標(xe,ye),(xs1,ys1)と(x
e1,ye1),(xs2,ys2)と(xe2,ye2),………,(x
s′,ys′)と(xe′,ye′)、を順次8連結直線発生器3
3へ入力することによつて、ページバツフア26に、求め
る直線(第2図で指示された始点、終点と太さに対応す
る直線)が描画される。
In step # 6, the start point side of the coordinates in the fourth buffer 25 (xs, ys) and the end point coordinates (xe, ye), the (xs 1, ys 1) ( x
e 1 , ye 1 ), (xs 2 , ys 2 ) and (xe 2 , ye 2 ), ………, (x
s ', ys') and (xe ', ye') are sequentially connected to an 8-connected linear generator 3
By inputting to 3, the straight line to be obtained (the straight line corresponding to the starting point, the ending point and the thickness designated in FIG. 2) is drawn on the page buffer 26.

この際、パターンジエネレータ34から出力されるパタ
ーンデータを、8連結直線発生器33へ入力することによ
り、ページバツフア26に描画される直線にパターンを付
与することができる。
At this time, by inputting the pattern data output from the pattern generator 34 to the 8-connected straight line generator 33, a pattern can be given to the straight line drawn on the page buffer 26.

第6図は、この発明の直線描画機能を備えた情報処理
装置において、パターンジエネレータ34によるパターン
付き直線の一描画例を示す図である。
FIG. 6 is a diagram showing an example of drawing a straight line with a pattern by the pattern generator 34 in the information processing apparatus having the straight line drawing function of the present invention.

この第6図で、上方の1個の は、パターンジエネレータから出力されるビツト「1」
のパターンデータを、複数個用いることによつて形成さ
れる。
In FIG. 6, the upper one Is the bit "1" output from the pattern generator
This is formed by using a plurality of pattern data items.

そして、このパターンデータを、第4のバツフア25内
の始点,終点の座標情報と共に、8連結直線発生器33へ
入力することによつて、第6図の下方に示すようなパタ
ーン付きの直線が得られる。
By inputting this pattern data together with the coordinate information of the start point and the end point in the fourth buffer 25 to the 8-connected straight line generator 33, a straight line with a pattern as shown in the lower part of FIG. can get.

以上のステツプ#1〜#6の処理によつて、先の第2
図に関連して説明したように、直線の角度によつて太さ
が変化しないように、太さの量を決定する際、角度をパ
ラメータとして演算している。
By the above processing of steps # 1 to # 6, the second
As described with reference to the drawing, when determining the thickness amount, the angle is used as a parameter so that the thickness does not change with the angle of the straight line.

その結果、両端の切り口が長さ方向に対して直角で、
かつ、太さが角度の変化に対して常に一定の直線を描画
することができる。
As a result, the cuts at both ends are perpendicular to the length direction,
In addition, it is possible to draw a straight line whose thickness is always constant with respect to a change in angle.

したがつて、この発明の情報処理装置によれば、どの
ような太さの直線でも、両端の切り口が、直線上にきれ
いに揃つた表示や印刷が得られる。
Therefore, according to the information processing apparatus of the present invention, it is possible to obtain a display and a print in which the cuts at both ends are aligned neatly on a straight line of any thickness.

また、印刷装置に限らず、表示装置やフアクシミリ装
置、その他ドツトパターンでイメージデータを表現する
各種の情報処理システムについて、実施可能なことは明
らかであり、以上に説明した実施例の場合に限定される
ものでないことはいうまでもない。
Further, it is clear that the present invention can be applied not only to the printing apparatus but also to a display apparatus, a facsimile apparatus, and other various information processing systems for expressing image data by dot patterns, and is limited to the above-described embodiment. Needless to say, it is not something.

発明の効果 この発明の情報処理装置では、直線の両端切り口の座
標(始点側と終点側のそれぞれの座標)を、直線の長さ
方向に対して垂直な傾きをもつ4連結描画法によつて演
算しているので、切り口の形状が、常に直線の長軸方向
に対して垂直となる。
According to the information processing apparatus of the present invention, the coordinates of the both ends of the straight line (the coordinates of the start point and the end point) are determined by a four-connection drawing method having a gradient perpendicular to the length direction of the straight line. Since the calculation is performed, the shape of the cut is always perpendicular to the long axis direction of the straight line.

しかも、そのための操作は、直線の始点Psと終点Pe、
および太さtの各情報を与えるだけでよいから、従来の
装置と同様に、その描画操作は極めて簡単である。
Moreover, the operations for that are the start point Ps and end point Pe of the straight line,
Since it is only necessary to provide each information of the thickness and the thickness t, the drawing operation is very simple as in the conventional apparatus.

したがつて、どのような角度の直線でも、常に一定の
太さで、しかも、両端の切り口が、一直線上にきれいに
揃つた表示や印刷が得られる。
Therefore, it is possible to obtain a display and a print in which a straight line at any angle always has a constant thickness and cuts at both ends are aligned in a straight line.

また、パターン付きの直線の切り口も、同様で、直線
の長軸方向に対して垂直方向になる(第6図参照)。
Similarly, the cut line of a straight line with a pattern is also perpendicular to the long axis direction of the straight line (see FIG. 6).

しかも、直線の両端切り口の座標は、4連結線法によ
る直線であるから、直線の内部のドツト抜けも防止さ
れ、高解像度の印刷装置や表示装置でも、充分に高品質
の直線の印刷や表示が得られる、等の多くの優れた効果
が奏せられる。
In addition, since the coordinates of both ends of the straight line are straight lines according to the 4-connected line method, dot dropout inside the straight line can be prevented, and printing and displaying of a sufficiently high-quality straight line can be performed even with a high-resolution printing device or display device. Are obtained, and many other excellent effects can be obtained.

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

第1図は、この発明の直線描画機能を備えた情報処理装
置について、その要部構成の詳細な一実施例を示す機能
ブロツク図、 第2図は、この発明の直線描画機能を備えた情報処理装
置における太い直線を描画する処理のアルゴリズムを説
明するための図、 第3図(1)と(2)は、4連結描画法による直線描画
の一例を示す図、 第4図(1)と(2)は、8連結描画法による直線描画
の一例を示す図、 第5図は、この発明の情報処理装置における直線描画時
の主要な処理の流れを示すフローチヤート、 第6図は、この発明の直線描画機能を備えた情報処理装
置において、パターンジエネレータ34によるパターン付
き直線の一描画例を示す図、 第7図(1)と(2)は、それぞれ従来の太線処理によ
る直線の描画の一例を示す図、 第8図は、従来のペル描画方法による直線の描画の一例
を示す図、 第9図は、グラフイツクス処理機能を備えた従来の情報
処理システムについて、その一例を示す外観斜視図、 第10図は、第9図に示した従来の情報処理システムにつ
いて、その要部構成の一例を示す機能ブロツク図。 図面において、21は入力バツフア、22は第1のバツフ
ア、23は第2のバツフア、24は第3のバツフア、25は第
4のバツフア、26はページバツフア、31は数値演算部、
32は4連結直線発生器、33は8連結直線発生器、34はパ
ターンジエネレータ。
FIG. 1 is a functional block diagram showing a detailed embodiment of an essential part of an information processing apparatus having a straight line drawing function according to the present invention, and FIG. FIGS. 3A and 3B are diagrams illustrating an example of a processing algorithm for drawing a thick straight line in the processing device. FIGS. 3A and 3B are diagrams illustrating an example of a straight line drawing by a 4-connected drawing method. FIGS. (2) is a diagram showing an example of a straight line drawing by the 8-connected drawing method, FIG. 5 is a flowchart showing a flow of main processing at the time of straight line drawing in the information processing apparatus of the present invention, and FIG. FIGS. 7A and 7B show an example of drawing a straight line with a pattern by the pattern generator 34 in the information processing apparatus having the straight line drawing function of the present invention. FIGS. FIG. 8 shows an example of FIG. FIG. 9 shows an example of drawing a straight line by a conventional pel drawing method. FIG. 9 is an external perspective view showing an example of a conventional information processing system having a graphics processing function. FIG. FIG. 2 is a functional block diagram showing an example of a main configuration of the conventional information processing system shown in FIG. In the figure, 21 is an input buffer, 22 is a first buffer, 23 is a second buffer, 24 is a third buffer, 25 is a fourth buffer, 26 is a page buffer, 31 is a numerical operation unit,
32 is a 4-connected linear generator, 33 is an 8-connected linear generator, and 34 is a pattern generator.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力装置と、記憶装置と、表示装置と、印
刷装置と、これらを制御する中央処理装置とを具備する
と共に、前記入力装置あるいは記憶装置から与えられる
直線の始点および終点の2点の座標情報Ps(xs,ys)、Q
e(xe,ye)と、太さtの情報とを記憶する直線の始点,
終点,太さ情報記憶手段を具備し、前記入力装置あるい
は記憶装置から読込んだ座標値に基いて4連結描画法と
8連結描画法による直線描画機能を備えた情報処理シス
テムにおいて、 前記直線の始点,終点,太さ情報記憶手段に記憶された
太さtの情報により、該直線の始点Ps(xs,ys)および
終点Pe(xe,ye)のx方向とy方向のオフセツトΔx,Δ
y、および該直線の始点と終点の両点を結ぶ直線の長さ
lを求め、太さtに対応する始点Qs(xs′,ys′)およ
び終点Qe(xe′,ye′)を計算して、該直線の始点Ps(x
s,ys)と太さtに対応する始点Qs(xs′,ys′)とを結
ぶ直線を4連結方式で計算し、該直線の終点Pe(xe,y
e)と太さtに対応する終点Qe(xe′,ye′)とを結ぶ直
線の座標を、該直線の始点と終点の両点を結ぶ直線上の
座標と前記オフセツトΔx,Δyとにより演算する直交座
標演算手段を備え、 直線の描画時に、前記直交座標演算手段により、指示さ
れた直線の始点側Ps,Qsおよび終点側Pe,Qeについて、太
さtの情報に対応する直交座標値を4連結描画法よつて
演算することにより、直線の両端の切り口を描画すると
共に、前記始点側Ps,Qsの直線上の座標と前記終点側Pe,
Qeの直線上の座標との間を8連結描画法によつて描画す
ることを特徴とする情報処理装置。
An input device, a storage device, a display device, a printing device, and a central processing unit for controlling these devices, and a start point and an end point of a straight line provided from the input device or the storage device are provided. Point coordinate information Ps (xs, ys), Q
e (xe, ye) and the starting point of the straight line storing the information of the thickness t,
An information processing system comprising an end point and thickness information storage means, and having a straight line drawing function by a 4-connected drawing method and an 8-connected drawing method based on coordinate values read from the input device or the storage device. The offsets Δx, Δ in the x and y directions of the start point Ps (xs, ys) and the end point Pe (xe, ye) of the straight line are obtained from the information of the start point, the end point, and the thickness t stored in the thickness information storage means.
y, and the length l of a straight line connecting both the starting point and the ending point of the straight line, and calculating the starting point Qs (xs ', ys') and the ending point Qe (xe ', ye') corresponding to the thickness t. And the starting point Ps (x
s, ys) and a straight line connecting the starting point Qs (xs ′, ys ′) corresponding to the thickness t is calculated by a four-connection method, and the ending point Pe (xe, y) of the straight line is calculated.
e) and the coordinates of a straight line connecting the end point Qe (xe ', ye') corresponding to the thickness t are calculated from the coordinates on the straight line connecting both the start point and the end point of the straight line and the offsets Δx, Δy. When drawing a straight line, the Cartesian coordinate calculator calculates the orthogonal coordinate value corresponding to the information of the thickness t for the start point side Ps, Qs and the end point side Pe, Qe of the designated straight line. By calculating by the 4-connected drawing method, the cuts at both ends of the straight line are drawn, and the coordinates on the straight line of the start point Ps, Qs and the end point Pe,
An information processing apparatus for drawing between the coordinates on a straight line of Qe by an 8-connected drawing method.
JP26800889A 1989-10-17 1989-10-17 Information processing device with line drawing function Expired - Fee Related JP3067137B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26800889A JP3067137B2 (en) 1989-10-17 1989-10-17 Information processing device with line drawing function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26800889A JP3067137B2 (en) 1989-10-17 1989-10-17 Information processing device with line drawing function

Publications (2)

Publication Number Publication Date
JPH03130884A JPH03130884A (en) 1991-06-04
JP3067137B2 true JP3067137B2 (en) 2000-07-17

Family

ID=17452626

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26800889A Expired - Fee Related JP3067137B2 (en) 1989-10-17 1989-10-17 Information processing device with line drawing function

Country Status (1)

Country Link
JP (1) JP3067137B2 (en)

Also Published As

Publication number Publication date
JPH03130884A (en) 1991-06-04

Similar Documents

Publication Publication Date Title
JPH0652472B2 (en) Image processing method
JP3067137B2 (en) Information processing device with line drawing function
US20190344585A1 (en) Information Processing Apparatus, Method of Controlling the Same and Non-Transitory Computer-Readable Medium Storing Instructions Therefor
JPH046554B2 (en)
US5539863A (en) Method and apparatus for positioning an image onto a recording medium
JP2697918B2 (en) Printing equipment
JP2783601B2 (en) Information processing device
JPS63302083A (en) Printer
JPH0950358A (en) Document processor and document editing method
JPS6366630A (en) Input device for print position
JP3051496B2 (en) Document processing method and apparatus
JP3184048B2 (en) Oblique line drawing device
JP2893277B2 (en) Electronic filling device with image data enlargement / reduction processing function
JPH0263762A (en) Output apparatus
JP2920959B2 (en) Information processing device
JPH02216593A (en) Information processor provided with graphic generating function
JPH02306298A (en) Information processor with character pattern generating function by vector font
JP2878715B2 (en) Document creation device
JPH02165389A (en) Information processor
JP3057963B2 (en) Data converter
JPS63131278A (en) Information storage device
JP3072756B2 (en) Drawing equipment
JP2605690B2 (en) Image creation device
JPS6318394A (en) Display for illustrated document processing system
JPH03158918A (en) Cursor controller for electronic filing device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080519

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090519

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees