Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0425983A - Graphic plotting device - Google Patents
[go: Go Back, main page]

JPH0425983A - Graphic plotting device - Google Patents

Graphic plotting device

Info

Publication number
JPH0425983A
JPH0425983A JP13181090A JP13181090A JPH0425983A JP H0425983 A JPH0425983 A JP H0425983A JP 13181090 A JP13181090 A JP 13181090A JP 13181090 A JP13181090 A JP 13181090A JP H0425983 A JPH0425983 A JP H0425983A
Authority
JP
Japan
Prior art keywords
arc
point
dda
generation
line
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
JP13181090A
Other languages
Japanese (ja)
Inventor
Mitsuo Ouchi
大内 光郎
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP13181090A priority Critical patent/JPH0425983A/en
Publication of JPH0425983A publication Critical patent/JPH0425983A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To plot the thick line of a correct circular arc at high speed by dividing the circular arc into closed area parts capable of being represented by two straight lines and two monotonously decreasing curves, and painting out every closed area part by one line unit successively from an upper part to a lower part. CONSTITUTION:In the processing of a first partial arc ABCD, since the point of the maximum Y-coordinate is A, digital differentiation (DDA) generation is executed by making the circular arc AB a left-hand side and a segment AD a right-hand side. The initial value of Y is Y-coordinate of A. An interval between the point x1 on the circular arc of the left-hand side and the point x2 on the segment of the right-hand side is plotted in a horizontal line. This operation is continued until Y-coordinate generated by this DDA generation becomes the value of the point of the larger Y- coordinate between the point B and D. After the processing up to the point D is finished by the DDA generation, the DDA generation of the right-hand side is changed to the circular arc DC. After the DDA generation is executed up to the point B similarly to the above-mentioned operation, this time, the DDA generation of the left-hand side is changed to the segment BC. As for the partial arc ADFH and the partial arc EFHG too, plotting in the partial arc can be executed through the similar operation.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、図形や文字をデイスプレィやプリンタに表示
あるいは印字する図形描画装置に関し、特に直線、円、
円弧などの線図形を太線で描画する機能を有する図形描
画装置に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a graphic drawing device for displaying or printing figures and characters on a display or printer, and in particular, relates to a graphic drawing device that displays or prints figures and characters on a display or printer, and in particular,
The present invention relates to a graphic drawing device having a function of drawing linear figures such as circular arcs with thick lines.

〔従来の技術〕[Conventional technology]

近年のパーソナルコンピュータやワークステーションの
デイスプレィの解像度は年々高くなっており、1280
x1024ドツト程度が普及してぎた。これは1 mm
あたり5ドツト程度である。
In recent years, the display resolution of personal computers and workstations has been increasing year by year, and 1280
x1024 dots were becoming popular. This is 1 mm
It is about 5 dots per area.

方、プリンタの世界ではさらに高解像度化が進んでいる
。レーザー・ビーム・プリンタでは400dpi(do
t per 1nch)つまり1順あたり16ドツト程
度が標準である。文字や図形をより綺麗に表示あるいは
印字するために高解像度化はますます進む傾向にあるが
、逆に基本となるlボット幅の線が非常に細く感じられ
るため、2ドツト以上の線幅をもつ線図形いわゆる太線
が必須機能になっている。
Meanwhile, in the world of printers, higher resolution is progressing. Laser beam printers use 400 dpi (do
t per 1 nch), that is, the standard is about 16 dots per order. There is a trend toward higher resolution in order to display or print characters and figures more clearly, but on the other hand, the basic l-bot width lines feel very thin, so it is difficult to use line widths of 2 dots or more. Line figures with so-called thick lines are an essential feature.

太線は直線、円、円弧などが代表的なもので、このうち
直線については他の図形に比べて単純なために高速な描
画方法が考案されている。直線に対し、円、円弧は曲線
を含むためのアルゴリズムが面倒になる。以下円弧につ
いて、従来の描画方法を述べる。
Typical examples of thick lines include straight lines, circles, and arcs, and since straight lines are simpler than other shapes, high-speed drawing methods have been devised. In contrast to straight lines, the algorithm for including curves becomes complicated for circles and arcs. A conventional drawing method for circular arcs will be described below.

従来の円弧の太線の描画方法は、シードフィルと呼ばれ
る塗りつぶしを利用する方法、円弧の重ね書きによる方
法などがあった。シードフィルによる方法は、まず外周
の円弧と内周の円弧を描画し、両方の円弧の端点を線分
で結んだ閉領域内を塗りつぶすものである。シードフィ
ルとは、閉領域内のある点を基準点として与えられると
、その点から上下左右方向に境界点があるかないかを検
索し、境界内すなわち閉領域内だけを塗りつぶしていく
方式で、主に任意閉領域内の塗りつぶしに応用される。
Conventional methods for drawing thick lines of circular arcs include a method using filling called seed fill, and a method using overwriting of circular arcs. The seed fill method first draws an outer circumferential arc and an inner circumferential arc, and then fills in the closed area formed by connecting the end points of both arcs with line segments. Seed fill is a method that takes a certain point within a closed area as a reference point, searches for boundary points in the vertical and horizontal directions from that point, and fills only within the boundary, that is, within the closed area. It is mainly applied to filling in arbitrary closed areas.

シードフィルは、一般に低速であるが特定の条件では正
確に描画できる上、任意のパターンで塗りつぶすことが
できるのでよく利用さhている。一方、円弧の重ね書き
は、半径をlずつずらした円弧を線幅のドツト数回だけ
繰り返して描画するものである。この時、各円弧の単線
は外周円の端点と円の中心点を結んだ線分上になるよう
に計算しておく。この方法は、ハードウェア化が進んで
いる1ビツト幅の円弧を基本としているので、高速に描
画することができる。
Seed fill is generally slow, but it is often used because it can draw accurately under certain conditions and can fill in any pattern. On the other hand, in overwriting circular arcs, a circular arc whose radius is shifted by l is drawn repeatedly by the number of dots of the line width. At this time, the single line of each arc is calculated so that it lies on the line segment connecting the end point of the outer circle and the center point of the circle. Since this method is based on a 1-bit wide arc, which is increasingly being implemented in hardware, it can be drawn at high speed.

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

以上のような従来の太線描画には、つぎのような問題点
があった。
The conventional thick line drawing as described above has the following problems.

まず、シードフィルは描画しようとするメモリ上に、す
でに何等かの図形が描かれていて、この図形内に境界色
が含まれている場合には適用できないという問題点があ
る。つまり、円弧の外形をまず描画するのだが、この太
線の外形内の背景画像内に境界色が含まれていると、た
だしく検索できない場合がでてくるのである。真の境界
色と偽の境界色を区別できなくなるのである。さらにシ
ードフィルは、内部の基準点を指定する必要があり、こ
れを求める処理が複雑になる場合がある。
First, there is a problem that seed fill cannot be applied when some figure has already been drawn in the memory to be drawn and this figure contains a border color. In other words, the outline of the arc is first drawn, but if the background image within this thick outline contains a border color, it may not be possible to search properly. It becomes impossible to distinguish between the true boundary color and the false boundary color. Furthermore, it is necessary to specify an internal reference point for the seed fill, and the process to obtain this point may become complicated.

たとえば、3ビツト幅の円弧の外形の内側の点は最大で
も1ビツト幅であり、円弧の角度によって基準点を求め
る手順が変るので、この算出に時間を要するし、最悪の
ケースでは端点は2ビツト幅になり、内部の点を求める
のが困難な場合がある。
For example, a point inside the outline of a 3-bit wide arc is at most 1 bit wide, and the procedure for finding the reference point changes depending on the angle of the arc, so this calculation takes time, and in the worst case, the end points are 2 bits wide. bit width, and it may be difficult to find internal points.

さらに、3ビツト幅程度では、外周の円弧と内周の円弧
が途中で接触している場合があり、この箇所で閉領域が
分断されてしまうため正しく描画できないこともある。
Furthermore, with a width of about 3 bits, the outer circumferential arc and the inner circumferential arc may touch in the middle, and the closed area may be divided at this point, making it impossible to draw correctly.

重ね書きの場合は、太線の内部の点の中で塗り残す点を
生じることが問題点となる。これは、描画する座標平面
の座標が離散的な格子面であることに基づいていること
に起因している。離散的な格子面なのは、メモリの1ビ
ツトをデイスプレィの1画素に対応させたラスクスキャ
ン方式の本質的な問題点である。そこで、nドツト幅の
太線を描画する場合でも、n+α回の描画を行うことに
よって点抜けを防いでいた。しかしながら、どのドツト
が抜けるかを予想してα回の描画を行うのは複雑な計算
を要する上、円弧を定められたパターンで塗りつぶすこ
とはできなかった。
In the case of overwriting, a problem arises in that some points inside the thick line are left unpainted. This is because the coordinates of the coordinate plane to be drawn are based on discrete lattice planes. The discrete lattice planes are an essential problem with the rask scan method, in which one bit in memory corresponds to one pixel on the display. Therefore, even when drawing a thick line with a width of n dots, missing dots are prevented by performing drawing n+α times. However, predicting which dots will fall out and drawing α times requires complex calculations, and it has not been possible to fill the arc with a predetermined pattern.

本発明の目的は、背景の有無、線の太さ、円弧の長さな
どに依存せず、円弧の端点の形状を正確に直線にするこ
とができ、さらに任意の塗りつぶしパターンで描画する
ことができる図形描画装置を提供することを目的として
いる。
The purpose of the present invention is to be able to accurately form the shape of the end point of an arc into a straight line, regardless of the presence or absence of a background, the thickness of the line, the length of the arc, etc. The purpose is to provide a graphic drawing device that can.

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

上記の目的のために本発明の図形描画装置は、XY座標
で定義されたメモリ上に、外周円、内周円および2本の
線分で形成された2ビツト幅以上の円弧を描画する機能
を有する図形描画装置であって、前記円弧を、円の左半
分に含まれる部分と右半分に含まれる部分に分割する分
割手段と、前記左半分に含まれる円弧あるいは前記右半
分に含まれる円弧に対し、前記外周円、前記内周円およ
び前記2本の線分あるいは円の中心を通る垂直線に沿っ
て1ラインごとにXY座標を計算する座標発生手段と、
前記座標発生手段によって算出された1ライン上の2つ
のX座標間に対応するメモリの内容を書換える描画手段
を含んで構成される。
For the above purpose, the figure drawing device of the present invention has a function of drawing an arc with a width of 2 bits or more formed by an outer circumference circle, an inner circumference circle, and two line segments on a memory defined by XY coordinates. A graphic drawing device comprising: dividing means for dividing the arc into a portion included in the left half of the circle and a portion included in the right half of the circle; and an arc included in the left half or an arc included in the right half of the circle. , coordinate generation means for calculating XY coordinates for each line along the outer circumferential circle, the inner circumferential circle, and the two line segments or a perpendicular line passing through the center of the circle;
The apparatus includes a drawing means for rewriting the contents of the memory corresponding to the two X coordinates on one line calculated by the coordinate generating means.

すなわち、本発明は、円弧を2本の直線と2本の単調減
少曲線で表現できる閉領域部分に分割すること、それぞ
れの閉領域部分の塗りつぶしを1ライン単位で上から下
へ順次行い、それぞれのライン上で描画すべき線分の2
つの端点のX座標を求めること、X座標発生の際にディ
ジタル微分解析器と呼ばれるハードウェアを利用して高
速化すること、などの新しい考え方を導入し、正確な円
弧の太線を高速に描画することができる。
That is, the present invention divides an arc into closed area parts that can be expressed by two straight lines and two monotonically decreasing curves, and fills each closed area part sequentially from top to bottom line by line. 2 of the line segments to be drawn on the line of
Introducing new ideas such as finding the X coordinate of two end points and speeding up the X coordinate generation by using hardware called a digital differential analyzer, and drawing accurate thick lines of arcs at high speed. be able to.

〔実施例〕〔Example〕

次に、本発明の第1の実施例について図面を参照して詳
細に説明する。
Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

第1の実施例は太線の円弧を描画する図形描画装置であ
る。
The first embodiment is a graphic drawing device that draws thick circular arcs.

第1図は、本実施例のハードウェア構成のブロック図、
第2図は円弧描画の処理手順、第3図は円弧分割の説明
図、第4図は円弧描画の具体例を示す図である。
FIG. 1 is a block diagram of the hardware configuration of this embodiment,
FIG. 2 is a process procedure for drawing an arc, FIG. 3 is an explanatory diagram of dividing an arc, and FIG. 4 is a diagram showing a specific example of drawing an arc.

まず、第2図を用いて本発明の円弧描画の手順について
説明する。大きな流れとしては、■円弧の外形線の端点
の座標計算、■円弧を左半円と右半内部分に分割する処
理、■スキャンラインと外形線の交点のX座標発生、■
スキャンライン描画の順で処理を進める。
First, the procedure for drawing an arc according to the present invention will be explained using FIG. The major steps are: ■ Calculation of the coordinates of the end points of the outline of the arc, ■ Processing of dividing the arc into the left semicircle and the right inner half, ■ Generation of the X coordinate of the intersection of the scan line and the outline, ■
Processing proceeds in the order of scan line drawing.

■について述べる。円弧の情報として、円弧の半径、幅
(太さ)、始点角度、終点角度が与えられる。円弧の半
径と幅から外周円の半径と内周円の半径を求め、さらに
始点角度と終点角度から外周円、内周円のそれぞれ始点
座標と終点座標を求める。外周円、内周円の半径につい
ては、与えられた半径が円弧の中心線なので、幅の半分
を加えた半径が外周円の半径、幅の半分を減じた半径が
内周円の半径となる。始点、終点については、それぞれ
の角度と半径から容易に計算することができる。
I will talk about ■. The arc information includes the radius, width (thickness), starting point angle, and ending point angle of the arc. The radius of the outer circumferential circle and the radius of the inner circumferential circle are determined from the radius and width of the circular arc, and the starting point coordinates and end point coordinates of the outer circumferential circle and the inner circumferential circle, respectively, are determined from the starting point angle and the end point angle. As for the radius of the outer and inner circles, the given radius is the center line of the arc, so the radius of the outer circle is the sum of half the width, and the radius of the inner circle is the radius of the half of the width. . The starting point and ending point can be easily calculated from their respective angles and radii.

■の分割は次のようにして行う。始点角度と終点角度に
より、円弧が左半円と右半円に跨がるかどうかを検査す
る。ここで、第1と第4象限が右半円であり、第2と第
3象限が左半円である。円弧の分割の組合せを第3図に
示した。円弧は最大で3つの部分に分割される。分割さ
れた円弧それぞれについて、■と■の処理を行うことに
なる。
The division in (2) is performed as follows. Check whether the arc straddles the left semicircle and the right semicircle using the starting point angle and ending point angle. Here, the first and fourth quadrants are right semicircles, and the second and third quadrants are left semicircles. Figure 3 shows the combination of arc divisions. The arc is divided into a maximum of three parts. The processes ``■'' and ``■'' are performed for each divided arc.

■の座標発生について説明する。塗りつぶし処理は、■
ラインごとに水平線を描画する、いわゆるスキャンライ
ン・フィルによって行うので、座標発生はX座標を1ず
つ変化させながら、そのときの左右2辺のX座標を求め
ることになる。まず、分割された円弧を決定する4つの
端点のうち最大のX座標を有する端点を求める。これは
始点終点の象限の位置によって容易に求めることができ
る。
The coordinate generation in (2) will be explained. The filling process is ■
Since this is done by so-called scan line fill, which draws a horizontal line line by line, the coordinate generation involves changing the X coordinate one by one and finding the X coordinates of the two left and right sides at that time. First, the end point having the maximum X coordinate among the four end points that determine the divided circular arc is determined. This can be easily determined by the positions of the starting and ending quadrants.

例えば、第1象限に始点、第4象限に終点がある場合、
X座標の最大値は外周円の始点に決定できる。この点を
端点とする線分、すなわち外周円と内周円の始点を結ぶ
線分と円弧、すなわち外周円が決定されるので、この線
分、円弧の座標を1ラインごとに発生することによって
スキャンラインとの交点が計算される。この処理を線分
あるいは円弧いずれかの終点に到達するまでの繰り返す
For example, if the start point is in the first quadrant and the end point is in the fourth quadrant,
The maximum value of the X coordinate can be determined at the starting point of the outer circumferential circle. Since the line segment with this point as the end point, that is, the line segment and arc connecting the starting points of the outer circumferential circle and the inner circumferential circle, that is, the outer circumferential circle, is determined, by generating the coordinates of this line segment and arc for each line. The intersection with the scan line is calculated. This process is repeated until the end point of either the line segment or the arc is reached.

いずれかの終点まで処理が完了した場合、その端点をあ
らたな左辺あるいは右辺の始点として処理を継続する。
When the processing is completed to any end point, the processing is continued using that end point as the starting point of a new left side or right side.

ようするに、座標発生が終点に達した場合には、つぎの
線分あるいは円弧に切換えて処理を継続するのである。
In other words, when the coordinate generation reaches the end point, processing is continued by switching to the next line segment or circular arc.

このような単純に処理で座標を計算できるのは、円弧が
Y方向に対して単調増加になるからである。逆にいうと
、単調増加になるようにあらかじめ■の処理で分割した
のである。
The reason why the coordinates can be calculated through such simple processing is that the arc increases monotonically in the Y direction. In other words, it is divided in advance using the process (■) so that it increases monotonically.

■は、■で求めた2つのX庄原間を描画する処理である
。これは単純な直線描画であり、しかも水平線なので容
易に実現できる。
(2) is a process of drawing the distance between the two X-Shobara obtained in (2). This is a simple straight line drawing, and since it is a horizontal line, it can be easily realized.

以上が、本実施例の円弧描画の手順の説明であるが、つ
ぎに実際のハードウェアの動作を第1図をもとに述べる
。第1図において、lはレジスタ・ファイル、2は制御
部、3は左辺DDA発生部、4は右辺DDA発生部、5
はアt゛レス計算部、6はスキャンライン描画部である
The above is an explanation of the arc drawing procedure of this embodiment. Next, the actual operation of the hardware will be described based on FIG. In FIG. 1, l is a register file, 2 is a control section, 3 is a left side DDA generation section, 4 is a right side DDA generation section, and 5
6 is an address calculation section, and 6 is a scan line drawing section.

円の半径、幅、始点角度、終点角度などのパラメータは
レジスタ・ファイル1に格納される。このレジスタ・フ
ァイル1の内容を制M部2 カv −ドし、上述した円
弧の外形線の端点の座標計算を行う。つぎに、円弧の始
点角度と終点角度がら円弧を分割し、分割された円弧の
外形を形成する線分と円弧の端点のうち、最大のX座標
をもつ端点を含む線分および円弧について、ディジタル
微分解析器(以降DDAと略す)の初期値を計算する。
Parameters such as the radius, width, starting point angle, and ending point angle of the circle are stored in register file 1. The contents of the register file 1 are controlled by the M unit 2, and the coordinates of the end points of the outline of the arc described above are calculated. Next, the arc is divided based on the starting point angle and end point angle of the arc, and among the line segments and the end points of the arc that form the outline of the divided arc, the line segment and the arc that include the end point with the maximum X coordinate are digitally calculated. An initial value of a differential analyzer (hereinafter abbreviated as DDA) is calculated.

以上の処理が制御部2の動作である。さらに、制御部2
で生成されたDDA初期値を入力として、各線分、円弧
上のX座標を逐次発生するのは左辺DDA発生部3、右
辺DDA発生部4である。直線、円弧のDDA発生のア
ルゴリズムは一般によく知られており、ハードウェア化
もされているため詳しい説明は割愛する。左辺DDA発
生部3、右辺DDA発生部4の出力座標を入力し、スキ
ャンライン描画のための前処理、すなわち始点のアドレ
ス及び描画ドツト数の計算を行うのがアドレス計算部5
である。
The above processing is the operation of the control section 2. Furthermore, the control unit 2
The left-side DDA generation section 3 and the right-side DDA generation section 4 sequentially generate the X coordinates on each line segment and arc by inputting the DDA initial value generated in the above. The algorithm for generating DDA for straight lines and circular arcs is generally well known and has been implemented in hardware, so a detailed explanation will be omitted. The address calculation unit 5 inputs the output coordinates of the left-side DDA generation unit 3 and the right-side DDA generation unit 4 and performs preprocessing for drawing scan lines, that is, calculation of the starting point address and the number of dots to be drawn.
It is.

スキャンライン描画部6は、基本的には水平線描画を実
行する部分であり、このハードウェア構成も周知なので
説明を割愛する。
The scan line drawing unit 6 is basically a part that executes horizontal line drawing, and its hardware configuration is well known, so a description thereof will be omitted.

さて、以上アルゴリズム、ハードウェア動作を中心とし
て説明を行ってきた。ここで第4図をもとに具体例を用
いてさらに説明する。第4図のように、第2象限に始点
、第3象限に終点があり、しかも時計回りの円弧BCE
Gが与えられた場合、3つの部分弧に分割される。まず
第1の部分弧ABCDを処理する。X座標が最大の点は
Aなので、円弧ABを左辺、線分ADを右辺として、D
DA発生を行う。Yの初期値は点Al7)X座標である
Now, the explanation above has focused on the algorithm and hardware operation. Here, further explanation will be given using a specific example based on FIG. As shown in Figure 4, the starting point is in the second quadrant and the ending point is in the third quadrant, and the arc BCE is clockwise.
Given G, it is divided into three subarcs. First, the first partial arc ABCD is processed. The point with the maximum X coordinate is A, so with the arc AB on the left side and the line segment AD on the right side, D
Performs DA generation. The initial value of Y is the point Al7) X coordinate.

DDA発生は、X座標を基本として、X座標を−1した
ときの円弧上あるいは線分上のX座標を求める計算であ
る。左辺の円弧上の点X1と右辺の線分上の点X2間を
水平線で描画する。なお、この場合X2は点AのX座標
と同じである。このDDA発生によって発生するX座標
が、点Bあるいは点りのX座標の大きい方の点の値にな
るまで継続する。
DDA generation is a calculation that calculates the X coordinate on an arc or line segment when the X coordinate is subtracted by 1 based on the X coordinate. A horizontal line is drawn between the point X1 on the arc on the left side and the point X2 on the line segment on the right side. Note that in this case, X2 is the same as the X coordinate of point A. This continues until the X coordinate generated by this DDA generation reaches the value of point B or the point with the larger X coordinate.

さて、DDA発生によって点りまで処理が終了すると、
右辺のDDA発生を円弧DCに変更する。
Now, when the processing is completed to the point due to the occurrence of DDA,
Change the DDA generation on the right side to arc DC.

上記の動作と同様に、DDA発生を点Bまで行うと、今
度は左辺のDDA発生を線分BCに変更する。以上のよ
うにして、部分弧ABCDの処理を完了する。部分弧A
 D F H1部分弧EFGHについても同様な処理で
部分弧内の描画を行うことができる。
Similar to the above operation, when DDA generation is performed up to point B, the DDA generation on the left side is changed to line segment BC. In the manner described above, the processing of partial arc ABCD is completed. partial arc A
Regarding the D F H1 partial arc EFGH, the inside of the partial arc can be drawn using similar processing.

次に、本発明の第2の実施例について図面を参照して説
明する。第2の実施例は直線を描画する図形描画装置で
ある。
Next, a second embodiment of the present invention will be described with reference to the drawings. The second embodiment is a graphic drawing device that draws straight lines.

第5図は、直線描画の具体例を示す図である。FIG. 5 is a diagram showing a specific example of straight line drawing.

太線の直線は、第1の実施例の円弧より処理が容易なの
で、同じハードウェアで実現できる。太線は基本的に長
方形であり、4頂点の順序関係が始点、終点位置によっ
て決定できるので、円弧の場合のように複数の部分に分
割する必要がない。
The thick straight line is easier to process than the circular arc in the first embodiment, so it can be realized with the same hardware. A thick line is basically a rectangle, and the order of the four vertices can be determined by the starting and ending positions, so there is no need to divide it into multiple parts as in the case of a circular arc.

第5図を用いて具体例を説明する。太線の直線は長方形
PQR8で定義される。この4点のX座標を比較して、
最大のX座標をもつ点Pを線ぶ。
A specific example will be explained using FIG. The thick straight line is defined by rectangle PQR8. Compare the X coordinates of these four points,
Draw the point P with the maximum X coordinate.

つぎに、点Pを端点とする2本の線分を取り出す。Next, two line segments with point P as the end point are extracted.

直線の場合は点R1点Qのどちらが左辺にくるかは単純
な計算で求まらない。そこで、DDA発生を無条件で行
ってしまい、出方されたX座標を比較することで左右辺
の識別を行う。なお、第1の実施例の円弧の場合には、
円弧、線分のいずれが左辺になるかを容易に決定するこ
とができる。これは始点あるいは終点が存在する象限が
始点角度あるいは終点角度で与えられ、象限がわかれば
線分、円弧のいずれが左辺になるかは一意に決定できた
In the case of a straight line, it cannot be determined by simple calculation which of point R and point Q is on the left side. Therefore, the DDA is generated unconditionally, and the left and right sides are identified by comparing the generated X coordinates. In addition, in the case of the circular arc of the first embodiment,
It is possible to easily determine whether the left side is an arc or a line segment. This means that the quadrant in which the starting point or ending point exists is given by the starting point angle or the ending point angle, and if the quadrant is known, it is possible to uniquely determine whether the left side is a line segment or an arc.

以降の処理は円弧の場合と同様に、一方のDDA発生が
終了したら、辺の情報を更新し継続していく。
The subsequent processing is similar to the case of circular arcs, and when one DDA generation is completed, the information on the side is updated and continued.

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

以上説明したように、本発明によれば、任意の幅、角度
、長さの円弧を正確な形状で、しかも高速に実行できる
ものである。さらに、塗りつぶしパターンについては、
スキャンライン描画部分ヲパターン参照位置計算を行っ
て描画参照データを任意のデータにすることによって容
易に実現できることも明白である。
As described above, according to the present invention, it is possible to create an arc of any width, angle, and length in an accurate shape and at high speed. Furthermore, regarding the fill pattern,
It is also obvious that this can be easily realized by calculating the pattern reference position of the scan line drawing portion and setting the drawing reference data to arbitrary data.

本発明は円弧、円はもとより、第2の実施例で示したも
うに直線についても適用することができる。さらに内周
円の半径を0”にしたときに扇形を描画できることは容
易に推測することができるので応用利用範囲は広い。ま
た、破線や一点釦線などのいわゆる線種を実現するため
には、上位のソフトウェアにより、円弧列を生成し、本
図形描画装誼に対して1つずつ円弧を実行させることに
よって実現できる。
The present invention can be applied not only to circular arcs and circles, but also to straight lines as shown in the second embodiment. Furthermore, it can be easily inferred that a fan shape can be drawn when the radius of the inner circle is set to 0'', so the range of applications is wide.Also, in order to realize so-called line types such as broken lines and single-point button lines, This can be realized by generating a sequence of arcs using higher-level software and executing the arcs one by one using this graphic drawing system.

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

第1図は、ハードウェア構成のブロック図、第2図は円
弧描画の処理手順、第3図は円弧分割の説明図、第4図
は円弧描画の具体例を示す図、第5図は直線描画の具体
例である。 第1図において、 1・・・・・・レジスタ・ファイル、2・・・・・・制
御部、3・・・・・・左辺DDA発生部、4・・・・・
・右辺DDA発生部、5・・・・・・アドレス計算部、
6・・・・・・スキャンライン描画部。 代理人 弁理士  内 原   晋 羊 回 第 圓 第4 舅
Fig. 1 is a block diagram of the hardware configuration, Fig. 2 is the processing procedure for arc drawing, Fig. 3 is an explanatory diagram of arc division, Fig. 4 is a diagram showing a specific example of arc drawing, and Fig. 5 is a straight line. This is a specific example of drawing. In FIG. 1, 1...Register file, 2...Control unit, 3...Left side DDA generation unit, 4...
・Right side DDA generation section, 5...address calculation section,
6...Scan line drawing section. Agent Patent Attorney Shinyo Uchihara 4th father-in-law

Claims (1)

【特許請求の範囲】[Claims] XY座標で定義されたメモリ上に、外周円、内周円およ
び2本の線分で形成された2ドット幅以上の円弧を描画
する機能を有する図形描画装置であって、前記円弧を、
円の左半分に含まれる部分と右半分に含まれる部分に分
割する分割手段と、前記左半分に含まれる円弧あるいは
前記右半分に含まれる円弧に対し、前記外周円、前記内
周円および前記2本の線分あるいは円の中心を通る垂直
線に沿って1ラインごとにXY座標を計算する座標発生
手段と、前記座標発生手段によって算出された1ライン
上の2つのX座標間に対応するメモリの内容を書替える
描画手段とを有することを特徴とする図形描画装置。
A graphic drawing device having a function of drawing an arc with a width of 2 dots or more formed by an outer circumferential circle, an inner circumferential circle, and two line segments on a memory defined by XY coordinates,
dividing means for dividing a circle into a part included in the left half and a part included in the right half; and dividing means for dividing a circle into a part included in the left half and a part included in the right half; a coordinate generating means for calculating XY coordinates for each line along a vertical line passing through the center of two line segments or a circle, and a correspondence between two X coordinates on one line calculated by the coordinate generating means; 1. A graphic drawing device comprising: drawing means for rewriting the contents of a memory.
JP13181090A 1990-05-22 1990-05-22 Graphic plotting device Pending JPH0425983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13181090A JPH0425983A (en) 1990-05-22 1990-05-22 Graphic plotting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13181090A JPH0425983A (en) 1990-05-22 1990-05-22 Graphic plotting device

Publications (1)

Publication Number Publication Date
JPH0425983A true JPH0425983A (en) 1992-01-29

Family

ID=15066643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13181090A Pending JPH0425983A (en) 1990-05-22 1990-05-22 Graphic plotting device

Country Status (1)

Country Link
JP (1) JPH0425983A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61106682A (en) * 1984-10-30 1986-05-24 Pentel Kk Water-based ink for ball-point pen

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61106682A (en) * 1984-10-30 1986-05-24 Pentel Kk Water-based ink for ball-point pen

Similar Documents

Publication Publication Date Title
JPH0816795A (en) Method and apparatus for improvement of edge of pixel image
JP2861194B2 (en) Data converter
JP2634851B2 (en) Image processing device
JPH0425983A (en) Graphic plotting device
JP2674287B2 (en) Graphic microcomputer
JP2003162728A (en) Image processing device and image output device
JPH11175740A (en) Method and device for drawing thin line
JP2726951B2 (en) Character / graphic drawing device
JP2000338959A (en) Image processing device
JP2002056395A (en) Graphic drawing device
JPH0493992A (en) Character and graphic plotter device
JP2888270B2 (en) Graphic processing apparatus and method
JP2897721B2 (en) Polygon duplexer
JPH05228741A (en) Cad/cam device
JP2613653B2 (en) Image processing device
JP2802646B2 (en) A scaling method for character patterns using vector fonts
JPH02298992A (en) Character font plotting method
JP2771981B2 (en) High quality character pattern generation method
JPH047168A (en) Character magnifying apparatus of dot printer
JP3035141B2 (en) Character creation device and character creation method
JPH0896148A (en) Graphic drawing device
JP2634906B2 (en) Image processing method
JP2666552B2 (en) Line width control method for outline characters
JPH11213178A (en) Three-dimensional data display device and recording medium recording three-dimensional data conversion program
JPH0413182A (en) Method and device for generating character and pattern