JPH10116348A - Plotting device and method, and storage medium - Google Patents

Plotting device and method, and storage medium

Info

Publication number
JPH10116348A
JPH10116348A JP27003196A JP27003196A JPH10116348A JP H10116348 A JPH10116348 A JP H10116348A JP 27003196 A JP27003196 A JP 27003196A JP 27003196 A JP27003196 A JP 27003196A JP H10116348 A JPH10116348 A JP H10116348A
Authority
JP
Japan
Prior art keywords
scan line
filled
coordinate
coordinates
area
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
JP27003196A
Other languages
Japanese (ja)
Inventor
Naohiro Yoshikawa
直廣 吉川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP27003196A priority Critical patent/JPH10116348A/en
Publication of JPH10116348A publication Critical patent/JPH10116348A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a clear plotting result without making it into a broken line in spite of the form of an area to be painted out by comparing a first coordinate corresponding to the area to be painted out in the scan line component of a scan line with the second coordinate of the next scan line and changing the second coordinate in accordance with a comparison result so that the painted-out area does not become discrete. SOLUTION: The inclination ΔR of the virtual right outline of the plotted graphics is checked (S507). When ΔR>=0, the right X-coordinate XR-1 of the scan line component of the scan line immediately before, which is previously stored in a step S515, is compared with the left X-coordinate XL or the scan line component of the adjacent scan line in the middle of a processing at present (S508). When XL>XR-1 , an overlap range does not exist in the range of both X-coordinates, the X-coordinates are adjusted so that the pixel which is turned on becomes discrete and the broken line does not occur. Namely, the value of the present left X-coordinate XL is substituted for the same value as the right X-coordinate XR-1 immediately before so as to change it (S509).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は描画装置および方法
および記憶媒体に関し、特に、スキャンライン分解によ
り画像を描画する描画装置および方法および記憶媒体に
関する。
The present invention relates to a drawing apparatus, a drawing method, and a storage medium, and more particularly to a drawing apparatus, a drawing method, and a storage medium for drawing an image by scanning line decomposition.

【0002】[0002]

【従来の技術】従来、ドットマトリクスによって近似的
に多角形等の図形を描画する描画装置、たとえば印刷装
置では、領域を塗り潰すための様々な描画方法が提案さ
れているが、一般的にはスキャンライン分解による方法
が用いられる。
2. Description of the Related Art Conventionally, in a drawing apparatus for approximately drawing a figure such as a polygon using a dot matrix, for example, a printing apparatus, various drawing methods for filling an area have been proposed. A method based on scan line decomposition is used.

【0003】スキャンライン分解による描画方法とは、
塗り潰そうとする図形をスキャンライン方向(すなわち
主走査方向であり、以降、この方向をx方向、主走査方
向と直交する方向をy方向とする)に走査し、このスキ
ャンラインと仮想的な左輪郭線との交点と右輪郭線との
交点との間の画素をオンにする(塗り潰す)という処理
をy座標の必要な範囲について順次実行し、所望の図形
の描画を実現するものである。
[0003] The drawing method by scan line decomposition is as follows.
The graphic to be painted is scanned in the scan line direction (that is, the main scanning direction, hereinafter, this direction is referred to as an x direction, and a direction orthogonal to the main scanning direction is referred to as a y direction). A process of turning on (filling) a pixel between the intersection point with the left contour line and the intersection point with the right contour line is sequentially executed for a necessary range of the y-coordinate, thereby realizing drawing of a desired figure. is there.

【0004】図1はこの処理を説明する図である。FIG. 1 is a diagram for explaining this processing.

【0005】図1において、格子線101は主走査方向
の画素境界を,102は副走査方向の画素境界を表し、
両走査方向の各格子線によって囲まれる各正方形領域が
1画素を表す。103,104,105,および106
は、それぞれ塗り潰そうとする図形の左輪郭線、右輪郭
線、上輪郭線、および下輪郭線であり、仮想的に設けた
ものであって実際には描画されない。
In FIG. 1, grid lines 101 indicate pixel boundaries in the main scanning direction, and 102 indicates pixel boundaries in the sub-scanning direction.
Each square area surrounded by each grid line in both scanning directions represents one pixel. 103, 104, 105, and 106
Are the left contour line, the right contour line, the upper contour line, and the lower contour line of the figure to be filled, respectively, which are virtually provided and are not actually drawn.

【0006】図1において斜線のハッチングで示されて
いる画素は、仮想的な各輪郭線103,104,10
5,106で構成される仮想的な図形を塗り潰した結
果、オンになる画素である。
In FIG. 1, pixels indicated by oblique hatching are virtual outlines 103, 104, and 10 respectively.
These pixels are turned on as a result of filling a virtual figure composed of 5, 106.

【0007】次に、スキャンライン分解による方法でオ
ンにする画素を決定する処理について説明する。図1に
おいて、107は左輪郭線103の開始点を、108は
左輪郭線103の終了点を、109は右輪郭線104の
開始点を、110は右輪郭線104の終了点をそれぞれ
表す。ここで、開始点107の座標を(XLS,Y
S),終了点108の座標を(XLE,YE),開始点
109の座標を(XRS,YS),終了点110の座標
を(XRE,YE)とする。また、左右輪郭線の傾きを
x増加分/y増加分と定義すると、左輪郭線103の傾
きは(XLE−XLS)/(YE−YS)となる。この
傾きをΔLとする。同様に、右輪郭線104の傾きは
(XRE−XRS)/(YE−YS)となる。この傾き
をΔRとする。
Next, a process for determining a pixel to be turned on by a method based on scan line decomposition will be described. In FIG. 1, reference numeral 107 denotes a start point of the left contour line 103, 108 denotes an end point of the left contour line 103, 109 denotes a start point of the right contour line 104, and 110 denotes an end point of the right contour line 104. Here, the coordinates of the start point 107 are represented by (XLS, Y
S), the coordinates of the end point 108 are (XLE, YE), the coordinates of the start point 109 are (XRS, YS), and the coordinates of the end point 110 are (XRE, YE). When the inclination of the left and right contour lines is defined as x increment / y increment, the inclination of the left contour line 103 is (XLE-XLS) / (YE-YS). This inclination is defined as ΔL. Similarly, the inclination of the right contour line 104 is (XRE-XRS) / (YE-YS). This inclination is defined as ΔR.

【0008】このようにすると、y=YS+n(nは正
の整数)で示されるスキャンラインと左輪郭線103お
よび右輪郭線104とのそれぞれの交点のx座標XLn
およびXRnは、
Thus, the x-coordinate XLn of the intersection of each of the scan line indicated by y = YS + n (n is a positive integer) and the left contour line 103 and the right contour line 104 is obtained.
And XRn are

【0009】[0009]

【数1】 XLn=XLS+(ΔL*n) (1) XRn=XRS+(ΔR*n) (2) となる。XLn = XLS + (ΔL * n) (1) XRn = XRS + (ΔR * n) (2)

【0010】この演算結果に従ってオンにする画素を決
定すればよい。両式の第2項は、たとえば小数点以下を
切り捨てたり四捨五入するなどの方法が考えられるが、
特に限定する必要はないので、ここでは説明を省略す
る。
The pixel to be turned on may be determined according to the result of this operation. The second term of both formulas can be considered, for example, by truncating or rounding off the decimal part.
Since there is no particular limitation, the description is omitted here.

【0011】前記両計算式に従って計算したXLn,X
Rnに対して決定した左右の画素間をオンにする処理
を、所定範囲のy座標の画素に対して実行することによ
り、図1に示すような連続する領域で形成される図形を
描画することができる。なお、ここで説明した従来例で
は、両走査方向の各格子線で形成される画素の境界の、
図中下側の境界線の座標を越えた時に、そのy座標の画
素をオンとするという規則によってオンにする画素を決
定している。
XLn, X calculated according to the above formulas
By performing the process of turning on the left and right pixels determined for Rn on the pixels of the y-coordinate in a predetermined range, drawing a figure formed in a continuous area as shown in FIG. Can be. In the conventional example described here, the boundary of the pixel formed by each grid line in both scanning directions is
The pixel to be turned on is determined by the rule that the pixel at the y coordinate is turned on when the coordinates of the lower boundary line in the figure are exceeded.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、上記従
来例では塗り潰そうとする領域の形状によってはスキャ
ンライン分解した各スキャンライン成分が意図する領域
を形成できない場合があるという課題があった。以下、
この課題について説明する。
However, in the above-described conventional example, there is a problem that depending on the shape of the region to be filled, each scan line component obtained by the decomposition of the scan line may not be able to form an intended region. Less than,
This problem will be described.

【0013】図2はスキャンライン分解した各スキャン
ライン成分が領域を形成しない場合の一例を示す説明図
である。図2において、格子線201は主走査方向の画
素境界を、202は副走査方向の画素境界を表し、両走
査方向の各格子線によって囲まれる各正方形領域が1画
素を表す。203,204,205,および206はそ
れぞれ塗り潰そうとする図形の左輪郭線、右輪郭線、上
輪郭線、および下輪郭線であり、仮想的に設けたもので
あって実際には描画されない 図2において斜線のハッチングで示されている画素は、
仮想的に設けた輪郭線203,204,205,206
で構成される仮想図形を、前記スキャンライン分解によ
る方法によって塗り潰した結果オンになる画素を表して
おり、オンになる(塗り潰される)画素は式(1),
(2)の演算結果によって決定している。
FIG. 2 is an explanatory diagram showing an example in which each scan line component obtained by decomposing a scan line does not form an area. In FIG. 2, grid lines 201 indicate pixel boundaries in the main scanning direction, 202 indicates pixel boundaries in the sub-scanning direction, and each square area surrounded by each grid line in both scanning directions indicates one pixel. Reference numerals 203, 204, 205, and 206 denote a left contour line, a right contour line, an upper contour line, and a lower contour line of a figure to be filled, respectively, which are virtually provided and are not actually drawn. In FIG. 2, pixels indicated by hatching are hatched.
Virtually provided contour lines 203, 204, 205, 206
Represents a pixel which is turned on as a result of filling the virtual figure constituted by the above-described method by the scan line decomposition, and a pixel which is turned on (filled) is expressed by the formula (1),
It is determined based on the calculation result of (2).

【0014】図2からも明らかなように、前記スキャン
ライン分解による方法では画素PX1,PX2,……P
X6が塗り潰されるので、輪郭線203,204,20
5,206で形成される領域が連続せずに破線化してし
まい、連続する領域を形成するように塗り潰すことがで
きない。このような破線化現象は、次の条件が成立する
時に起こる。
As is apparent from FIG. 2, in the method using the scan line decomposition, pixels PX1, PX2,.
Since X6 is filled, the contour lines 203, 204, 20
The area formed by 5, 206 is not continuous and is broken, and cannot be filled so as to form a continuous area. Such a broken line phenomenon occurs when the following condition is satisfied.

【0015】傾きΔL,ΔRが正の時:XL+ΔL>X
R 傾きΔL,ΔRが負の時:XR+ΔR<XL そこで、本発明は上記の問題点を解決するためになされ
たもので、スキャンライン分解による方法を使用して塗
り潰し処理を行う際に、塗り潰そうとする領域の形状に
よって生じていた破線化を防いで美しい描画を得られる
描画装置および方法および記憶媒体を提供することを目
的とする。
When the slopes ΔL and ΔR are positive: XL + ΔL> X
When R slopes ΔL and ΔR are negative: XR + ΔR <XL Therefore, the present invention has been made to solve the above-described problem, and when performing a filling process using a method based on scan line decomposition, It is an object of the present invention to provide a drawing apparatus, a drawing method, and a storage medium which can obtain beautiful drawing by preventing a broken line from being caused by the shape of a region to be made.

【0016】[0016]

【課題を解決するための手段】上記目的を達成するため
に、請求項1に記載の本発明の装置は、塗り潰そうとす
る領域をスキャンライン分解して順次塗り潰し処理する
描画装置において、スキャンラインのスキャンライン成
分の前記塗り潰そうとする領域に応じた第1座標を記憶
する記憶手段と、前記スキャンラインの次のスキャンラ
インのスキャンライン成分の前記塗り潰そうとする領域
に応じた第2座標と前記第1座標を比較する比較手段
と、前記スキャンラインと前記次のスキャンラインの塗
り潰し領域が離散しないように、前記比較手段の比較結
果に従って前記第2座標を変更する変更手段とを備えた
ことを特徴とする。
In order to attain the above object, according to the present invention, there is provided a drawing apparatus which separates an area to be filled by a scan line and sequentially fills the area. Storage means for storing first coordinates of a scan line component of a line corresponding to the region to be filled, and a first coordinate corresponding to the region to be filled of a scan line component of a scan line next to the scan line Comparing means for comparing two coordinates with the first coordinate, and changing means for changing the second coordinate in accordance with the comparison result of the comparing means so that the filled area between the scan line and the next scan line is not dispersed. It is characterized by having.

【0017】ここで、前記第1座標は、前記塗り潰そう
とする領域の輪郭線と前記スキャンラインとの交差位置
の座標であり、前記第2座標は、前記輪郭線と前記次の
スキャンラインとの交差位置の座標である。
Here, the first coordinates are coordinates of an intersection of the outline of the area to be filled and the scan line, and the second coordinates are coordinates of the outline and the next scan line. Are the coordinates of the intersection with.

【0018】さらに、前記変更手段は、前記第1座標と
前記第2座標が前記塗り潰し領域が離散する値をとると
きに、前記第2座標を前記第1座標に置換することでオ
ーバーラップするようにすることもできる。
Further, when the first coordinate and the second coordinate take a value at which the filled area is discrete, the changing means overlaps by replacing the second coordinate with the first coordinate. You can also

【0019】また、上記目的を達成するために、請求項
4に記載の本発明の装置は、複数の点で表される塗り潰
そうとする領域をスキャンライン分解し、前記複数の点
で決まる輪郭線に基づき塗り潰し処理する描画装置にお
いて、前記点の数を調べる点数検査手段と、スキャンラ
インと異なる方向の第1および第2の輪郭線の傾きを調
べる傾き検査手段と、前記点の数と前記第1および第2
の輪郭線の傾きに従って前記塗り潰そうとする領域を構
成する点に新たな点を追加する点追加手段とを備えたこ
とを特徴とする。
According to another aspect of the present invention, there is provided an apparatus according to the present invention, wherein a region to be filled, which is represented by a plurality of points, is subjected to scan line decomposition and is determined by the plurality of points. In a drawing apparatus for performing filling processing based on an outline, a point inspection unit for inspecting the number of points, an inclination inspection unit for inspecting inclinations of first and second outlines in directions different from a scan line, The first and second
Point adding means for adding a new point to a point constituting the area to be filled according to the inclination of the contour line.

【0020】ここで、前記第1および第2の輪郭線は同
一の開始点を有し、前記傾き検査手段により、前記第1
の輪郭線の傾きの大きさと前記第2の輪郭線の傾きの大
きさが所定の関係にあるかを調べ、前記点追加手段は、
前記所定の関係が満足されるときに前記新たな点を追加
し、前記開始点、前記新たな点、前記第1および第2の
輪郭線それぞれの終了点に基づき前記塗り潰そうとする
領域を塗り潰し処理する塗り潰し手段をさらに具備する
こともできる。
Here, the first and second contour lines have the same starting point, and the first and second contour lines are provided by the inclination inspection means.
Whether the magnitude of the inclination of the contour line and the magnitude of the inclination of the second contour line have a predetermined relationship,
When the predetermined relationship is satisfied, the new point is added, and the area to be filled is defined based on the start point, the new point, and the end points of the first and second contour lines. The apparatus may further include a filling means for performing a filling process.

【0021】さらに、前記所定の関係は前記塗り潰そう
とする領域が離散する条件を表し、前記第1の輪郭線の
傾きの大きさが前記第2の輪郭線の傾きの大きさの2倍
よりも大きい関係とすることもできる。
Further, the predetermined relationship represents a condition in which the region to be filled is discrete, and the gradient of the first contour is twice as large as the gradient of the second contour. A larger relationship can be used.

【0022】また、上記目的を達成するために、請求項
7に記載の本発明の方法は、塗り潰そうとする領域をス
キャンライン分解して順次塗り潰し処理する描画方法に
おいて、スキャンラインのスキャンライン成分の前記塗
り潰そうとする領域に応じた第1座標を記憶する記憶ス
テップと、前記スキャンラインの次のスキャンラインの
スキャンライン成分の前記塗り潰そうとする領域に応じ
た第2座標と前記第1座標を比較する比較ステップと、
前記スキャンラインと前記次のスキャンラインの塗り潰
し領域が離散しないように、前記比較ステップにおける
比較結果に従って前記第2座標を変更する変更ステップ
とを含むことを特徴とする。
According to a seventh aspect of the present invention, there is provided a drawing method in which a region to be filled is divided into scan lines to sequentially fill the region. A storage step of storing a first coordinate corresponding to the region to be filled of the component, a second coordinate corresponding to the region to be filled of a scan line component of a scan line subsequent to the scan line, and A comparing step of comparing the first coordinates;
A changing step of changing the second coordinates in accordance with the comparison result in the comparing step so that the filled areas of the scan line and the next scan line are not dispersed.

【0023】ここで、前記第1座標は、前記塗り潰そう
とする領域の輪郭線と前記スキャンラインとの交差位置
の座標であり、前記第2座標は、前記輪郭線と前記次の
スキャンラインとの交差位置の座標である。
Here, the first coordinate is a coordinate of an intersection of the outline of the region to be filled and the scan line, and the second coordinate is a coordinate of the outline and the next scan line. Are the coordinates of the intersection with.

【0024】さらに、前記変更ステップにおいて、前記
第1座標と前記第2座標が前記塗り潰し領域が離散する
値をとるときに、前記第2座標を前記第1座標と置換す
ることもできる。
Further, in the changing step, when the first coordinates and the second coordinates take values in which the filled area is discrete, the second coordinates may be replaced with the first coordinates.

【0025】また、上記目的を達成するために、請求項
10に記載の本発明の方法は、複数の点で表される塗り
潰そうとする領域をスキャンライン分解し、前記複数の
点で決まる輪郭線に基づき塗り潰し処理する描画方法に
おいて、前記点の数を調べる点数検査ステップと、スキ
ャンラインと異なる方向の第1および第2の輪郭線の傾
きを調べる傾き検査ステップと、前記点の数と前記第1
および第2の輪郭線の傾きに従って前記塗り潰そうとす
る領域を構成する点に新たな点を追加する点追加ステッ
プとを含むことを特徴とする。
In order to achieve the above object, a method according to the present invention as set forth in claim 10, wherein a region to be filled represented by a plurality of points is subjected to scan line decomposition and determined by the plurality of points. In a drawing method for performing filling processing based on a contour line, a point number checking step for checking the number of points, a slope checking step for checking the inclination of the first and second contour lines in a direction different from the scan line, The first
And a point adding step of adding a new point to a point constituting the area to be filled according to the inclination of the second contour line.

【0026】ここで、前記第1および第2の輪郭線は同
一の開始点を有し、前記傾き検査ステップにおいて、前
記第1の輪郭線の傾きの大きさと前記第2の輪郭線の傾
きの大きさが所定の関係にあるかを調べ、前記点追加ス
テップにおいて、前記所定の関係が満足されるときに前
記新たな点を追加し、前記開始点、前記新たな点、前記
第1および第2の輪郭線それぞれの終了点に基づき前記
塗り潰そうとする領域を塗り潰し処理する塗り潰しステ
ップをさらに含むこともできる。
Here, the first and second outlines have the same starting point, and in the inclination inspection step, the magnitude of the inclination of the first outline and the inclination of the second outline are determined. It is checked whether the size is in a predetermined relationship, and in the point adding step, the new point is added when the predetermined relationship is satisfied, and the start point, the new point, the first and the second points are added. The method may further include a filling step of filling the area to be filled based on the end point of each of the two outlines.

【0027】さらに、前記所定の関係は前記塗り潰そう
とする領域が離散する条件を表し、前記第1の輪郭線の
傾きの大きさが前記第2の輪郭線の傾きの大きさの2倍
よりも大きい関係とすることもできる。
Further, the predetermined relationship represents a condition in which the area to be filled is discrete, and the gradient of the first contour is twice as large as the gradient of the second contour. A larger relationship can be used.

【0028】また、上記目的を達成するために、請求項
13に記載の本発明の記憶媒体は、スキャンラインのス
キャンライン成分の塗り潰そうとする領域に応じた第1
座標を記憶する記憶ステップと、前記スキャンラインの
次のスキャンラインのスキャンライン成分の前記塗り潰
そうとする領域に応じた第2座標と前記第1座標を比較
する比較ステップと、前記スキャンラインと前記次のス
キャンラインの塗り潰し領域が離散しないように、前記
比較ステップにおける比較結果に従って前記第2座標を
変更する変更ステップとを含むスキャンライン分解によ
る描画方法のプログラムを記憶したことを特徴とする。
In order to achieve the above object, the storage medium of the present invention according to the thirteenth aspect provides a first storage medium according to a region to be filled with a scan line component of a scan line.
A storage step of storing coordinates, a comparison step of comparing the first coordinates with second coordinates corresponding to the region to be filled in of a scan line component of a scan line next to the scan line; A program for a drawing method by scan line decomposition including a changing step of changing the second coordinate according to the comparison result in the comparing step is stored so that the filled area of the next scan line is not dispersed.

【0029】そして、上記目的を達成するために、請求
項14に記載の本発明の記憶媒体は、スキャンライン分
解して塗り潰そうとする領域を表す複数の点の数を調べ
る点数検査ステップと、スキャンラインと異なる方向の
第1および第2の輪郭線の傾きを調べる傾き検査ステッ
プと、前記点の数と前記第1および第2の輪郭線の傾き
に従って前記塗り潰そうとする領域を構成する点に新た
な点を追加する点追加ステップとを含む描画方法のプロ
グラムを記憶したことを特徴とする。
In order to achieve the above object, a storage medium according to the present invention according to claim 14, further comprising: a score inspection step of examining the number of a plurality of points representing an area to be filled by scanning line decomposition. An inclination inspection step of examining the inclination of the first and second contour lines in a direction different from the scan line; and forming the area to be filled in according to the number of points and the inclination of the first and second contour lines. A program of a drawing method including a point adding step of adding a new point to a point to be executed is stored.

【0030】[0030]

【発明の実施の形態】以下、図面を参照しながら本発明
の実施の形態を詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0031】(第1の実施の形態)図3は本発明にかか
る描画装置の第1の実施の形態の構成を示すブロック図
である。ここでは、本発明の実施の形態の一例として、
描画装置の一種である印刷装置における処理について説
明する。
(First Embodiment) FIG. 3 is a block diagram showing a configuration of a drawing apparatus according to a first embodiment of the present invention. Here, as an example of the embodiment of the present invention,
Processing in a printing device, which is a type of drawing device, will be described.

【0032】印刷装置30は、各種プログラムや固定デ
ータ等を記憶したROM32や作業用のRAM33を含
んで構成されるマイクロプロセッサシステムを有し、印
刷装置全体を制御する制御部34と、ホストコンピュー
タ300とのデータ通信のためのインターフェース35
と、インターフェース35を通して入力される印刷コマ
ンドを解析する印刷コマンド解析部36と、描画処理を
行い実際に印刷される形のビットマップ展開などを行う
描画部37と、展開されたビットマップデータをたとえ
ばレーザビームプリンタにより用紙上に永久可視画像化
する出力部38とを備えている。これらの各要素は、シ
ステムバス39によって接続されている。
The printing apparatus 30 has a microprocessor system including a ROM 32 storing various programs, fixed data, and the like, and a working RAM 33, and includes a control unit 34 for controlling the entire printing apparatus, and a host computer 300. Interface 35 for data communication with
A print command analyzing unit 36 that analyzes a print command input through the interface 35; a drawing unit 37 that performs drawing processing to develop a bitmap in a form that is actually printed; And an output unit 38 for permanently visualizing an image on paper by a laser beam printer. These components are connected by a system bus 39.

【0033】続いて、印刷装置30が塗り潰し図形を描
画する手順について、図4のフローチャートを参照して
説明する。このフローチャートで表される描画方法のプ
ログラムは、たとえばROM32に予め記憶されてい
る。
Next, the procedure in which the printing apparatus 30 draws a solid figure will be described with reference to the flowchart of FIG. The program of the drawing method represented by this flowchart is stored in the ROM 32 in advance, for example.

【0034】まず、印刷装置30がインターフェース3
5を通して外部装置であるホストコンピュータ300か
らの印刷コマンドを受信すると、印刷コマンド解析部3
6が印刷コマンドを解析する(ステップS401)。次
に、この解析結果に基づき受信した印刷コマンドが塗り
潰し図形描画コマンドかを判断し(S402)、塗り潰
し図形描画コマンドであれば描画部37によって塗り潰
し図形描画処理を行う(S403)。そして、続いて次
の印刷コマンドを処理するためにステップS401へ戻
る。
First, the printing apparatus 30 has the interface 3
5 receives a print command from a host computer 300 as an external device,
6 analyzes the print command (step S401). Next, it is determined whether the received print command is a filled graphic drawing command based on the analysis result (S402). If the received print command is a filled graphic drawing command, the drawing unit 37 performs a filled graphic drawing process (S403). Then, the process returns to step S401 to process the next print command.

【0035】一方、ステップS402において、受信し
た印刷コマンドが塗り潰し図形描画処理でなければ印刷
終了コマンドかを判断する(S404)。ここで、印刷
終了コマンドであれば描画部37が生成したビットマッ
プデータを出力部38へ転送して、用紙上に永久可視画
像を形成し、印刷処理を終了する。一方、ステップS4
04において、受信した印刷コマンドが印刷終了コマン
ドでなければ他の処理を実行する(S406)。そし
て、続いて次の印刷コマンドを処理するためにステップ
S401へ戻る。
On the other hand, in step S402, it is determined whether or not the received print command is a print end command unless it is a process of drawing a filled figure (S404). Here, if it is a print end command, the bitmap data generated by the drawing unit 37 is transferred to the output unit 38 to form a permanent visible image on paper, and the printing process ends. On the other hand, step S4
If the received print command is not a print end command in 04, another process is executed (S406). Then, the process returns to step S401 to process the next print command.

【0036】次に、本発明の第1の実施の形態に特徴的
なステップS403の塗り潰し図形描画処理について図
5のフローチャートを参照して説明する。
Next, a description will be given, with reference to the flowchart of FIG. 5, of the solid figure drawing process in step S403, which is characteristic of the first embodiment of the present invention.

【0037】まず、処理したスキャンライン数をカウン
トするスキャンラインカウンタのカウント値SLを0に
リセットする(ステップS501)。本実施の形態にお
いて、処理すべきスキャンライン数は予め分っているも
のとする。次に、式(1)と式(2)を使用してスキャ
ンライン成分を演算して求める(S502)。この演算
処理に続いて、カウント値SLが0かを調べる(S50
3)。初めはこのカウント値SLは0であるのでステッ
プS514へ進む。ステップS514では、スキャンラ
イン成分を描画データとして所定の記憶領域に記憶する
(S514)。
First, the count value SL of a scan line counter for counting the number of processed scan lines is reset to 0 (step S501). In the present embodiment, it is assumed that the number of scan lines to be processed is known in advance. Next, a scan line component is calculated and obtained using Expressions (1) and (2) (S502). Subsequent to this arithmetic processing, it is checked whether the count value SL is 0 (S50).
3). Initially, the count value SL is 0, so the process proceeds to step S514. In step S514, the scan line components are stored as drawing data in a predetermined storage area (S514).

【0038】続いて、処理したスキャンラインのスキャ
ンライン成分の左X座標(スキャンラインと塗り潰そう
とする図形の仮想的な左輪郭線との交点位置の座標)と
右X座標(スキャンラインと塗り潰そうとする図形の仮
想的な右輪郭線との交点位置の座標)を次のスキャンラ
インの処理に使用するために座標記憶手段(RAM3
3)の所定の位置に記憶する(S515)。そして、カ
ウント値SLを1インクリメント(S516)した後、
処理すべきスキャンライン数を処理したかを調べる(S
517)。初めは、まだ処理すべきスキャンラインが残
っているので、次のスキャンラインの処理を行うために
ステップS502へ戻る。なお、ステップS517にお
いて所定のスキャンライン数を処理していたら、本フロ
ーチャートの処理を終了する。
Subsequently, the left X coordinate of the scan line component of the processed scan line (the coordinate of the intersection point of the scan line and the virtual left contour of the figure to be filled) and the right X coordinate (the scan line Coordinate storage means (RAM3) for using the coordinates of the intersection of the figure to be filled with the virtual right contour line in the processing of the next scan line.
It is stored in the predetermined position of 3) (S515). Then, after incrementing the count value SL by 1 (S516),
It is checked whether the number of scan lines to be processed has been processed (S
517). Initially, since there are still scan lines to be processed, the process returns to step S502 to process the next scan line. If a predetermined number of scan lines have been processed in step S517, the processing of this flowchart ends.

【0039】2本目以降のスキャンラインの処理におい
て再びステップS502でスキャンライン成分を演算し
て求め、ステップS503ではスキャンラインカウンタ
のカウント値SLが0でないので、描画する図形の仮想
的な右輪郭線の傾きΔRを調べる(S507)。ここ
で、右輪郭線の傾きΔRが正または0(ΔR≧0)であ
れば、先にステップS515において記憶している直前
のスキャンラインのスキャンライン成分の右X座標XR
-1と次に現在処理中の隣接スキャンラインのスキャンラ
イン成分の左X座標XLとを比較する(S508)。
In the processing of the second and subsequent scan lines, the scan line components are calculated again in step S502. In step S503, since the count value SL of the scan line counter is not 0, the virtual right contour of the figure to be drawn is obtained. Is checked (S507). Here, if the inclination ΔR of the right contour line is positive or 0 (ΔR ≧ 0), the right X coordinate XR of the scan line component of the immediately preceding scan line previously stored in step S515.
-1 is compared with the left X coordinate XL of the scan line component of the adjacent scan line currently being processed (S508).

【0040】ここで、XL>XR-1であれば両X座標の
範囲にオーバーラップする範囲が無いので、オンする画
素が離散して破線化が生じないように両X座標を調整す
る。すなわち、ステップS509に進んで現在の左X座
標XLの値を直前の右X座標XR-1と同じ値に置換して
変更し、ステップS514以降の処理へ進む。一方、ス
テップS508においてXL≦XR-1であれば、両X座
標の範囲にオーバーラップする範囲が有るためそのまま
描画しても、オンする画素が離散せず描画する図形に破
線化が生じることはないので、スキャンライン成分を描
画データとして所定の記憶領域に記憶するためにステッ
プS514以降の処理へ進む。
Here, if XL> XR- 1 , there is no overlapping range in the range of both X coordinates, so that both X coordinates are adjusted so that the pixels to be turned on are not discrete and a broken line does not occur. That is, the process proceeds to step S509 to replace the current value of the left X coordinate XL with the same value as the immediately preceding right X coordinate XR- 1 and change the value, and then proceeds to the process from step S514. On the other hand, if XL ≦ XR −1 in step S508, since there is an overlapping range between the ranges of both X coordinates, even if the drawing is performed as it is, the turned-on pixels are not discrete and the figure drawn is broken. Since there is no scan line component, the process proceeds to step S514 and subsequent steps to store the scan line component as drawing data in a predetermined storage area.

【0041】一方、ステップS507において右輪郭線
の傾きΔRが0より小さい(ΔR<0)ときは、先に記
憶している直前のスキャンラインのスキャンライン成分
の左X座標XL-1と次に現在処理中の隣接スキャンライ
ンのスキャンライン成分の右X座標XRとを比較する
(S510)。ここで、XR<XL-1であれば両X座標
の範囲にオーバーラップする範囲が無いので、オンする
画素が離散して破線化が生じないように両X座標を調整
する。
On the other hand, when the inclination ΔR of the right contour line is smaller than 0 (ΔR <0) in step S507, the left X coordinate XL- 1 of the previously stored scan line component of the immediately preceding scan line and the next X coordinate XL- 1 The scan line component of the adjacent scan line currently being processed is compared with the right X coordinate XR (S510). Here, if XR <XL- 1 , there is no overlapping range in the range of both X coordinates, so that both X coordinates are adjusted so that the pixels to be turned on are not discrete and a broken line is not generated.

【0042】すなわち、ステップS511に進んで現在
の右X座標XRの値を直前の左X座標XL-1と同じ値に
置換して変更し、ステップS514以降の処理へ進む。
また一方、ステップS510においてXR≧XL-1であ
れば、両X座標の範囲にオーバーラップする範囲が有る
ため、そのまま描画してもオンする画素が離散せず描画
する図形に破線化が生じることはないので、スキャンラ
イン成分を描画データとして所定の記憶領域に記憶する
ためにステップS514の処理へ進む。
That is, the flow advances to step S511 to replace the current value of the right X coordinate XR with the same value as the immediately preceding left X coordinate XL- 1 and change the value, and the flow advances to the processing after step S514.
On the other hand, if XR ≧ XL −1 in step S510, there is a range that overlaps the range of both X coordinates. Therefore, the process proceeds to step S514 in order to store the scan line component as drawing data in a predetermined storage area.

【0043】以上のように現在処理中のスキャンライン
と互いに隣接する直前のスキャンラインの左右X座標を
調整することにより、各スキャンライン成分間に隙間が
生じなくなるのでオンする(塗り潰す)画素が離散する
ことなく、塗り潰そうとする領域の形状に関わらず破線
化が発生せず、美しい描画結果を得られるようになる。
As described above, by adjusting the left and right X coordinates of the immediately preceding scan line adjacent to the scan line currently being processed, no gap is formed between the scan line components. Without being discrete, dashed lines do not occur regardless of the shape of the region to be filled, and a beautiful drawing result can be obtained.

【0044】なお、本実施の形態では、X座標が破線化
が生じる条件のときには現在処理中のスキャンライン成
分の左または右X座標を、直前のスキャンライン成分の
左または右X座標値に置換することで破線化を防止する
ようにしたが、簡単な処理手順の変更で直前スキャンラ
イン成分の左または右X座標値を変更したり、または現
在処理中のスキャンライン成分の左または右X座標値と
直前スキャンライン成分の右または左X座標値の両者を
変更することによりX座標の範囲がオーバーラップする
ようにすれば、本実施の形態と同様の効果を得られるこ
とは当業者において自明である。
In the present embodiment, when the X-coordinate is in a condition where a broken line occurs, the left or right X-coordinate of the currently processed scan line component is replaced with the left or right X-coordinate of the immediately preceding scan line component. To prevent the broken line from being formed, but it is possible to change the left or right X coordinate value of the immediately preceding scan line component by changing the simple processing procedure, or to change the left or right X coordinate value of the scan line component currently being processed. It is obvious to those skilled in the art that the same effect as in the present embodiment can be obtained by changing both the value and the right or left X coordinate value of the immediately preceding scan line component so that the X coordinate ranges overlap. It is.

【0045】(第2の実施の形態)本発明の第2の実施
の形態としても、描画装置としての印刷装置における処
理について説明する。本発明の第2の実施の形態の印刷
装置は、図3を参照して説明した第1の実施の形態の印
刷装置と同一構成で具現化できるので、ここではその説
明を省略する。また、第2の実施の形態の印刷装置30
が塗り潰し図形を描画する手順は第1の実施の形態で図
4のフローチャートを参照して説明したのと同一手順な
ので、ここではその説明を省略する。
(Second Embodiment) In the second embodiment of the present invention, a process in a printing apparatus as a drawing apparatus will be described. Since the printing apparatus according to the second embodiment of the present invention can be embodied with the same configuration as the printing apparatus according to the first embodiment described with reference to FIG. 3, the description is omitted here. Further, the printing apparatus 30 according to the second embodiment
The procedure for drawing the filled figure is the same as that described in the first embodiment with reference to the flowchart of FIG. 4, and thus the description thereof is omitted here.

【0046】次に、本実施の形態に特徴的な描画部37
の塗り潰し図形描画処理について図6のフローチャート
を参照して説明する。このフローチャートで表される描
画方法のプログラムは、たとえばROM32に予め記憶
されている。
Next, the drawing section 37 characteristic of the present embodiment.
Will be described with reference to the flowchart of FIG. The program of the drawing method represented by this flowchart is stored in the ROM 32 in advance, for example.

【0047】塗り潰し図形描画コマンドが、塗り潰す領
域の頂点座標とともに描画部37に入力されると、まず
頂点の数を調べてその領域の形状が三角形かどうかを判
定する(S601)。三角形でなけれればS620に進
んで、その形状を決定する複数の点(4点以上)の間の
仮想輪郭線に対しスキャンライン分解による方法で塗り
潰しを行って処理を終了する。一方、三角形であれば、
三角形を決定する3つの頂点のうちy座標が最も小さい
第1頂点と別の頂点を結ぶ左輪郭線の傾きΔLと、第1
頂点とさらに別の頂点を結ぶ右輪郭線の傾きΔRの符号
とが同一符号かどうかを調べる(S602)。同一符号
であればΔL,ΔRの符号が正か負かを判定(S60
3)した後、判定結果に応じて分岐して以降の処理を行
う。
When the filled figure drawing command is input to the drawing unit 37 together with the vertex coordinates of the region to be filled, first, the number of vertices is checked to determine whether the shape of the region is a triangle (S601). If it is not a triangle, the process proceeds to S620, where the virtual contour between a plurality of points (four or more) that determine the shape is painted out by scanline decomposition, and the process is terminated. On the other hand, if it is a triangle,
The slope ΔL of the left contour connecting the first vertex having the smallest y coordinate to another vertex among the three vertices for determining the triangle, and the first
It is checked whether the sign of the gradient ΔR of the right contour line connecting the vertex and another vertex is the same sign (S602). If the signs are the same, it is determined whether the signs of ΔL and ΔR are positive or negative (S60).
3) After that, branching is performed according to the determination result, and subsequent processing is performed.

【0048】ここで、図7および図8を参照して左輪郭
線の傾きと右輪郭線の傾きの絶対値の所定の関係につい
て説明する。図7は両輪郭線の傾きΔL,ΔRが正の場
合を、図8は両輪郭線の傾きΔL,ΔRが負の場合を表
している。両図は塗り潰そうとする領域が三角形である
場合の説明図であり、説明のために左右輪郭線の傾きを
強調して表しているが、実際には両輪郭線はスキャンラ
イン方向に対し極く僅かな傾きを持ち、かつ、この描画
対象の三角形のy方向の寸法は極めて小さく、目視上は
水平な直線形状として識別されるものである。
Here, the predetermined relationship between the inclination of the left contour and the absolute value of the inclination of the right contour will be described with reference to FIGS. FIG. 7 shows a case where the slopes ΔL and ΔR of both contour lines are positive, and FIG. 8 shows a case where the slopes ΔL and ΔR of both contour lines are negative. Both figures are explanatory diagrams in the case where the area to be filled is a triangle. For the sake of explanation, the inclination of the left and right contour lines is emphasized, but actually both contour lines are in the scan line direction. The triangle to be drawn has an extremely small dimension in the y-direction and has a very slight inclination, and is visually identified as a horizontal linear shape.

【0049】両図から明らかなように、塗り潰そうとす
る領域の左輪郭線703,803と右輪郭線704,8
04が第1頂点P1 ,P3 を開始点とする場合、スキャ
ンライン成分が破線化する(塗り潰そうとする領域のド
ットが離散する)条件は、両輪郭線の傾きΔL,ΔRの
間の条件式、
As is apparent from both figures, the left contour lines 703 and 803 and the right contour lines 704 and 8 of the area to be filled are shown.
In the case where 04 is the first vertices P 1 and P 3 as the starting points, the condition that the scan line component is broken (the dots in the area to be filled are discrete) is between the gradients ΔL and ΔR of both contour lines. Conditional expression,

【0050】[0050]

【数2】 2ΔL>ΔR(ただし傾きがともに正の場合) (3) または、 2|ΔR|<|ΔL|(ただし傾きがともに負の場合) (4) で与えられる。2ΔL> ΔR (when both slopes are positive) (3) or 2 | ΔR | <| ΔL | (when both slopes are negative) (4)

【0051】そこで、図6に戻って説明すると、ステッ
プS603において両輪郭線の傾きΔL,ΔRがともに
正であれば(図7参照)、左輪郭線703の傾きΔLと
右輪郭線704の傾きΔRが破線化の上記条件式(3)
を満たすかを判定する(S604)。式(3)が満たさ
れ破線化が起こるようならば、右輪郭線704の終了点
Pmを通るスキャンラインに垂直な垂直線Lvと左輪郭
線703が交差するかを、左輪郭線703と右輪郭線7
04の終了点Ph,Pmのx座標に基づき判定する(S
605)。交差する場合は、そのままステップS607
に進む。
Returning to FIG. 6, if the slopes ΔL and ΔR of both contour lines are both positive in step S603 (see FIG. 7), the slope ΔL of the left contour line 703 and the slope of the right contour line 704 Conditional expression (3) where ΔR is a broken line
It is determined whether or not the condition is satisfied (S604). If Expression (3) is satisfied and the broken line occurs, it is determined whether the vertical line Lv perpendicular to the scan line passing through the end point Pm of the right outline 704 and the left outline 703 intersect with each other. Contour 7
04 based on the x-coordinates of the end points Ph and Pm (S
605). If they intersect, step S607 is performed as it is.
Proceed to.

【0052】一方、交差しない場合は、交差するように
左輪郭線703を延長してステップS607に進み、垂
直線Lvと延長後の左輪郭線703との交点P2 と右輪
郭線704の終了点Pmとの距離d1 を求める。続い
て、第1頂点P1 からy方向に距離d1 下がった位置に
新たな頂点P1 ′を追加してステップS620に進む。
また一方、ステップS604で式(3)が満たされなけ
れば破線化は起こらないので、頂点を追加せずそのまま
ステップS620に進む。そしてステップS620で
は、4つの頂点P1 ,P1 ′,P2 ,Pmにより決定さ
れる4本の仮想輪郭線(P1 −P1 ′,P1 −Pm,P
m−P2 ,P2 −P1 ′)に対して通常のスキャンライ
ン分解による方法で塗り潰し処理を行う。なお、P1
1 ′間の距離d1 は画素サイズに比して小さく、描画
結果は直線となる。
Meanwhile, if not intersect, the process proceeds to step S607 by extending the left contour line 703 so as to intersect, the end of the intersection P 2 and the right contour line 704 of the left contour line 703 after the extension and the vertical line Lv The distance d 1 from the point Pm is obtained. Subsequently, a new vertex P 1 ′ is added at a position lower by the distance d 1 in the y direction from the first vertex P 1, and the process proceeds to step S620.
On the other hand, if equation (3) is not satisfied in step S604, the dashed line does not occur, so the process proceeds to step S620 without adding a vertex. In step S620, 4 vertices P 1, P 1 ', 4 of the imaginary contour line determined by P 2, Pm (P 1 -P 1', P 1 -Pm, P
m−P 2 , P 2 −P 1 ′) is subjected to a filling process by a normal scan line decomposition method. Note that P 1 ,
The distance d 1 between P 1 ′ is smaller than the pixel size, and the drawing result is a straight line.

【0053】さらに、ステップS603において両輪郭
線の傾きΔL,ΔRがともに負であれば(図8参照)、
左輪郭線803の傾き|ΔL|と右輪郭線804の傾き
|ΔR|が破線化の上記条件式(4)を満たすかを判定
する(S614)。式(4)が満たされ破線化が起こる
ようならば、左輪郭線803の終了点Phを通るスキャ
ンラインに垂直な垂直線Lvと右輪郭線804が交差す
るかを、左輪郭線803と右輪郭線704の終了点P
h,Pmのx座標に基づき判定する(S615)。交差
する場合は、そのままステップS617に進む。
Further, if the slopes .DELTA.L and .DELTA.R of both contour lines are negative in step S603 (see FIG. 8),
It is determined whether the inclination | ΔL | of the left outline 803 and the inclination | ΔR | of the right outline 804 satisfy the conditional expression (4) of the broken line (S614). If Equation (4) is satisfied and the broken line occurs, it is determined whether the vertical line Lv perpendicular to the scan line passing through the end point Ph of the left outline 803 and the right outline 804 intersect with each other. End point P of contour line 704
The determination is made based on the x coordinates of h and Pm (S615). If they intersect, the process proceeds directly to step S617.

【0054】一方、交差しない場合は、交差するように
右輪郭線804を延長してステップS617に進み、垂
直線Lvと延長後の右輪郭線804との交点P4 と左輪
郭線803の終了点Phとの距離d2 を求める。続い
て、第1頂点P3 からy方向に距離d2 下がった位置に
新たな頂点P3 ′を追加してステップS619に進む。
また一方、ステップS614で式(4)が満たされなけ
れば破線化は起こらないので、頂点を追加せずそのまま
ステップS620に進む。そしてステップS620で
は、4つの頂点P3 ,P3 ′,P4 ,Phにより決定さ
れる4本の仮想輪郭線(P3 −P3 ′,P3 −Ph,P
h−P4 ,P4 −P3 ′)に対して通常のスキャンライ
ン分解による方法で塗り潰し処理を行う。なお、P3
3 ′間の距離d2 は画素サイズに比して小さく、描画
結果は直線となる。
On the other hand, if not intersect, the process proceeds to step S617 by extending the right contour line 804 so as to intersect, the end of the intersection point P 4 and the left contour line 803 of the right contour line 804 after the extension and the vertical line Lv The distance d 2 from the point Ph is obtained. Subsequently, a new vertex P 3 ′ is added at a position lower by the distance d 2 in the y direction from the first vertex P 3, and the process proceeds to step S619.
On the other hand, if equation (4) is not satisfied in step S614, the dashed line does not occur, so that the process proceeds to step S620 without adding a vertex. In step S620, 4 vertices P 3, P 3 ', 4 of the imaginary contour line determined by P 4, Ph (P 3 -P 3', P 3 -Ph, P
h−P 4 , P 4 −P 3 ′) is subjected to a filling process by a normal scan line decomposition method. Note that P 3 ,
The distance d 2 between P 3 ′ is smaller than the pixel size, and the drawing result is a straight line.

【0055】以上の処理により、各スキャンライン成分
間に隙間が生じなくなるので、塗り潰そうとする領域の
形状に関わらず破線化が発生せず、美しい描画結果を得
られるようになる。
By the above processing, no gap is generated between the scan line components, so that a broken line does not occur regardless of the shape of the region to be filled, and a beautiful drawing result can be obtained.

【0056】なお、上記の各実施の形態では印刷装置に
おける処理について本発明を適用した例について説明し
たが、たとえば画像表示装置等の他の描画装置に本発明
を適用することもできる。
In each of the above embodiments, an example is described in which the present invention is applied to processing in a printing apparatus. However, the present invention can be applied to other drawing apparatuses such as an image display apparatus.

【0057】本発明方法は、複数の機器から構成される
システムに適用しても、1つの機器からなる装置に適用
しても良い。また、本発明方法はシステム或いは装置に
プログラムを供給することによって達成される場合にも
適用できることは言うまでもない。この場合、本発明方
法を達成するためのソフトウエアによって表されるプロ
グラムを格納した記憶媒体をシステム或いは装置に読み
出すことによって、そのシステム或いは装置が、本発明
方法の効果を享受することが可能になる。
The method of the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of one device. Needless to say, the method of the present invention can also be applied to a case where the method is achieved by supplying a program to a system or an apparatus. In this case, by reading out a storage medium storing a program represented by software for achieving the method of the present invention into a system or an apparatus, the system or apparatus can receive the effects of the method of the present invention. Become.

【0058】[0058]

【発明の効果】以上説明したように請求項1および7お
よび13に記載の第1の発明によれば、塗り潰そうとす
る領域をスキャンライン分解して順次塗り潰し処理する
際に、スキャンラインのスキャンライン成分の塗り潰そ
うとする領域に応じた第1座標を記憶し、次のスキャン
ラインのスキャンライン成分の塗り潰そうとする領域に
応じた第2座標と第1座標を比較し、スキャンラインと
次のスキャンラインの塗り潰し領域が離散しないよう
に、比較結果に従って第2座標を変更するようにしたの
で、塗り潰そうとする領域の形状に関わらず、破線化す
ることのない美しい描画結果を提供することができると
いう効果がある。
As described above, according to the first aspect of the present invention, when a region to be filled is separated by a scan line and successively filled, the scan line is processed. A first coordinate corresponding to an area to be filled with a scan line component is stored, and a second coordinate corresponding to an area to be filled with a scan line component of the next scan line is compared with the first coordinate, and scanning is performed. The second coordinate is changed according to the comparison result so that the filled area of the line and the next scan line is not dispersed, so that regardless of the shape of the area to be filled, a beautiful drawing result that does not become a broken line There is an effect that can be provided.

【0059】また、請求項4および10および14に記
載の第2の発明によれば、複数の点で表される塗り潰そ
うとする領域をスキャンライン分解し、複数の点で決ま
る輪郭線に基づき塗り潰し処理する際に点の数を調べ、
スキャンラインと異なる方向の第1および第2の輪郭線
の傾きを調べ、点の数と第1および第2の輪郭線の傾き
に従って塗り潰そうとする領域を構成する点に新たな点
を追加するので、塗り潰そうとする領域の形状に関わら
ず、破線化を防いで美しい描画結果を提供できるように
なる。
According to the second aspect of the present invention, a region to be filled represented by a plurality of points is subjected to scanline decomposition to form a contour determined by a plurality of points. Check the number of points when filling based on
Check the inclination of the first and second contour lines in a direction different from the scan line, and add a new point to a point constituting an area to be filled according to the number of points and the inclination of the first and second contour lines. Therefore, regardless of the shape of the region to be filled, a beautiful drawing result can be provided by preventing the broken line from being broken.

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

【図1】スキャンライン分解による従来の塗り潰し方法
を説明する説明図である。
FIG. 1 is an explanatory diagram for explaining a conventional filling method using scan line decomposition.

【図2】スキャンライン分解による従来の塗り潰し方法
の課題を説明する説明図である。
FIG. 2 is an explanatory diagram for explaining a problem of a conventional filling method using scan line decomposition.

【図3】本発明にかかる描画装置の第1および第2の実
施の形態の構成を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of a drawing apparatus according to first and second embodiments of the present invention.

【図4】本発明にかかる描画装置の第1および第2の実
施の形態により塗り潰し図形を描画処理する描画方法を
示すフローチャートである。
FIG. 4 is a flowchart illustrating a drawing method for performing a drawing process of a solid figure by the first and second embodiments of the drawing apparatus according to the present invention.

【図5】第1の実施の形態による塗り潰し図形描画処理
を示すフローチャートである。
FIG. 5 is a flowchart illustrating a solid figure drawing process according to the first embodiment;

【図6】第2の実施の形態による塗り潰し図形描画処理
を示すフローチャートである。
FIG. 6 is a flowchart illustrating a solid figure drawing process according to a second embodiment;

【図7】隣接スキャンラインの塗り潰し領域の破線化と
左および右輪郭線の傾きの関係を説明する説明図であ
る。
FIG. 7 is an explanatory diagram for explaining the relationship between the dashed lines of the filled area of the adjacent scan line and the inclination of the left and right contour lines.

【図8】隣接スキャンラインの塗り潰し領域の破線化と
左および右輪郭線の傾きの関係を説明する説明図であ
る。
FIG. 8 is an explanatory diagram for explaining the relationship between the dashed lines of the filled area of the adjacent scan line and the inclination of the left and right contour lines.

【符号の説明】[Explanation of symbols]

30 印刷装置 32 ROM 33 RAM 34 制御部 35 インターフェース 36 印刷コマンド解析部 37 描画部 38 出力部 39 システムバス 103,703,803 左輪郭線 104,704,804 右輪郭線 300 ホストコンピュータ Reference Signs List 30 printing device 32 ROM 33 RAM 34 control unit 35 interface 36 print command analysis unit 37 drawing unit 38 output unit 39 system bus 103, 703, 803 left contour line 104, 704, 804 right contour line 300 host computer

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 塗り潰そうとする領域をスキャンライン
分解して順次塗り潰し処理する描画装置において、 スキャンラインのスキャンライン成分の前記塗り潰そう
とする領域に応じた第1座標を記憶する記憶手段と、 前記スキャンラインの次のスキャンラインのスキャンラ
イン成分の前記塗り潰そうとする領域に応じた第2座標
と前記第1座標を比較する比較手段と、 前記スキャンラインと前記次のスキャンラインの塗り潰
し領域が離散しないように、前記比較手段の比較結果に
従って前記第2座標を変更する変更手段とを備えたこと
を特徴とする描画装置。
1. A drawing apparatus for separating a region to be filled by a scan line and sequentially performing a fill process, wherein a storage means for storing a first coordinate corresponding to the region to be filled of a scan line component of a scan line. Comparing means for comparing the first coordinates with the second coordinates corresponding to the region to be filled of the scan line component of the scan line next to the scan line; and comparing the scan line with the next scan line. A drawing unit that changes the second coordinates in accordance with the comparison result of the comparison unit so that the filled area is not dispersed.
【請求項2】 前記第1座標は、前記塗り潰そうとする
領域の輪郭線と前記スキャンラインとの交差位置の座標
であり、前記第2座標は、前記輪郭線と前記次のスキャ
ンラインとの交差位置の座標であることを特徴とする請
求項1に記載の描画装置。
2. The method according to claim 1, wherein the first coordinates are coordinates of an intersection of the outline of the area to be filled and the scan line, and the second coordinates are coordinates of the outline and the next scan line. 2. The drawing apparatus according to claim 1, wherein the coordinates are intersection coordinates of
【請求項3】 前記変更手段は、前記第1座標と前記第
2座標が前記塗り潰し領域が離散する値をとるときに、
前記第2座標を前記第1座標に置換することでオーバー
ラップするようにすることを特徴とする請求項1または
2に記載の描画装置。
3. When the first coordinate and the second coordinate take a value at which the filled area is discrete,
3. The drawing apparatus according to claim 1, wherein the second coordinates are replaced with the first coordinates so as to overlap.
【請求項4】 複数の点で表される塗り潰そうとする領
域をスキャンライン分解し、前記複数の点で決まる輪郭
線に基づき塗り潰し処理する描画装置において、 前記点の数を調べる点数検査手段と、 スキャンラインと異なる方向の第1および第2の輪郭線
の傾きを調べる傾き検査手段と、 前記点の数と前記第1および第2の輪郭線の傾きに従っ
て前記塗り潰そうとする領域を構成する点に新たな点を
追加する点追加手段とを備えたことを特徴とする描画装
置。
4. A drawing apparatus for decomposing a region to be filled represented by a plurality of points into scan lines and performing a filling process based on an outline determined by the plurality of points, wherein a point inspection means for examining the number of points. An inclination inspection means for examining the inclination of the first and second contour lines in a direction different from the scan line; and determining the area to be filled according to the number of points and the inclination of the first and second contour lines. A drawing apparatus, comprising: point addition means for adding a new point to the constituent points.
【請求項5】 前記第1および第2の輪郭線は同一の開
始点を有し、 前記傾き検査手段により、前記第1の輪郭線の傾きの大
きさと前記第2の輪郭線の傾きの大きさが所定の関係に
あるかを調べ、 前記点追加手段は、前記所定の関係が満足されるときに
前記新たな点を追加し、 前記開始点、前記新たな点、前記第1および第2の輪郭
線それぞれの終了点に基づき前記塗り潰そうとする領域
を塗り潰し処理する塗り潰し手段をさらに備えたことを
特徴とする請求項4に記載の描画装置。
5. The method according to claim 5, wherein the first and second contours have the same starting point, and the inclination inspection means determines the magnitude of the inclination of the first contour and the magnitude of the inclination of the second contour. The point adding means adds the new point when the predetermined relation is satisfied, and the start point, the new point, the first and second points 5. The drawing apparatus according to claim 4, further comprising a filling unit that performs a filling process on the region to be filled based on the end point of each of the contour lines.
【請求項6】 前記所定の関係は前記塗り潰そうとする
領域が離散する条件を表し、前記第1の輪郭線の傾きの
大きさが前記第2の輪郭線の傾きの大きさの2倍よりも
大きい関係であることを特徴とする請求項4または5に
記載の描画装置。
6. The predetermined relationship represents a condition in which the region to be filled is discrete, and the magnitude of the inclination of the first contour is twice as large as the magnitude of the inclination of the second contour. The drawing apparatus according to claim 4, wherein the relationship is larger than the relationship.
【請求項7】 塗り潰そうとする領域をスキャンライン
分解して順次塗り潰し処理する描画方法において、 スキャンラインのスキャンライン成分の前記塗り潰そう
とする領域に応じた第1座標を記憶する記憶ステップ
と、 前記スキャンラインの次のスキャンラインのスキャンラ
イン成分の前記塗り潰そうとする領域に応じた第2座標
と前記第1座標を比較する比較ステップと、 前記スキャンラインと前記次のスキャンラインの塗り潰
し領域が離散しないように、前記比較ステップにおける
比較結果に従って前記第2座標を変更する変更ステップ
とを含むことを特徴とする描画方法。
7. A drawing method in which an area to be filled is scanned line-separated and sequentially filled, a first coordinate corresponding to the area to be filled of a scan line component of a scan line is stored. A comparing step of comparing a second coordinate and the first coordinate of a scan line component of a scan line next to the scan line according to the region to be filled; and comparing the scan line with the next scan line. A changing step of changing the second coordinates according to the comparison result in the comparing step so that the filled area does not become discrete.
【請求項8】 前記第1座標は、前記塗り潰そうとする
領域の輪郭線と前記スキャンラインとの交差位置の座標
であり、前記第2座標は、前記輪郭線と前記次のスキャ
ンラインとの交差位置の座標であることを特徴とする請
求項7に記載の描画方法。
8. The first coordinate is a coordinate of an intersection of the outline of the area to be filled and the scan line, and the second coordinate is a coordinate of the outline and the next scan line. The drawing method according to claim 7, wherein the coordinates of the intersection position are:
【請求項9】 前記変更ステップにおいて、前記第1座
標と前記第2座標が前記塗り潰し領域が離散する値をと
るときに、前記第2座標を前記第1座標と置換すること
を特徴とする請求項7または8に記載の描画方法。
9. The method according to claim 1, wherein, in the changing step, when the first coordinates and the second coordinates take values at which the filled area is discrete, the second coordinates are replaced with the first coordinates. Item 7. The drawing method according to Item 7 or 8.
【請求項10】 複数の点で表される塗り潰そうとする
領域をスキャンライン分解し、前記複数の点で決まる輪
郭線に基づき塗り潰し処理する描画方法において、 前記点の数を調べる点数検査ステップと、 スキャンラインと異なる方向の第1および第2の輪郭線
の傾きを調べる傾き検査ステップと、 前記点の数と前記第1および第2の輪郭線の傾きに従っ
て前記塗り潰そうとする領域を構成する点に新たな点を
追加する点追加ステップとを含むことを特徴とする描画
方法。
10. A drawing method in which a region to be filled represented by a plurality of points is subjected to scan line decomposition and a filling process is performed based on an outline determined by the plurality of points. An inclination inspection step of examining the inclination of the first and second contour lines in a direction different from the scan line; and determining the area to be filled according to the number of points and the inclination of the first and second contour lines. A point adding step of adding a new point to the constituent points.
【請求項11】 前記第1および第2の輪郭線は同一の
開始点を有し、 前記傾き検査ステップにおいて、前記第1の輪郭線の傾
きの大きさと前記第2の輪郭線の傾きの大きさが所定の
関係にあるかを調べ、 前記点追加ステップにおいて、前記所定の関係が満足さ
れるときに前記新たな点を追加し、 前記開始点、前記新たな点、前記第1および第2の輪郭
線それぞれの終了点に基づき前記塗り潰そうとする領域
を塗り潰し処理する塗り潰しステップをさらに含むこと
を特徴とする請求項10に記載の描画方法。
11. The method according to claim 11, wherein the first and second contour lines have the same starting point, and in the inclination inspection step, the magnitude of the inclination of the first contour and the magnitude of the inclination of the second contour. In the point adding step, when the predetermined relationship is satisfied, the new point is added, and the start point, the new point, the first and second points are added. 11. The drawing method according to claim 10, further comprising a filling step of filling the area to be filled based on the end point of each of the contour lines.
【請求項12】 前記所定の関係は前記塗り潰そうとす
る領域が離散する条件を表し、前記第1の輪郭線の傾き
の大きさが前記第2の輪郭線の傾きの大きさの2倍より
も大きい関係であることを特徴とする請求項10または
11に記載の描画方法。
12. The predetermined relationship represents a condition in which the area to be filled is discrete, and the gradient of the first contour is twice as large as the gradient of the second contour. The drawing method according to claim 10, wherein the relationship is larger than the relationship.
【請求項13】 スキャンラインのスキャンライン成分
の塗り潰そうとする領域に応じた第1座標を記憶する記
憶ステップと、 前記スキャンラインの次のスキャンラインのスキャンラ
イン成分の前記塗り潰そうとする領域に応じた第2座標
と前記第1座標を比較する比較ステップと、 前記スキャンラインと前記次のスキャンラインの塗り潰
し領域が離散しないように、前記比較ステップにおける
比較結果に従って前記第2座標を変更する変更ステップ
とを含むスキャンライン分解による描画方法のプログラ
ムを記憶したことを特徴とする記憶媒体。
13. A storage step of storing a first coordinate corresponding to a region to be filled with a scan line component of a scan line, and said filling of a scan line component of a scan line next to the scan line is attempted. A comparing step of comparing a second coordinate corresponding to an area with the first coordinate; and changing the second coordinate in accordance with a comparison result in the comparing step so that a filled area of the scan line and the next scan line is not discrete. A storage medium storing a program of a drawing method by scan line decomposition including a changing step of performing the following.
【請求項14】 スキャンライン分解して塗り潰そうと
する領域を表す複数の点の数を調べる点数検査ステップ
と、 スキャンラインと異なる方向の第1および第2の輪郭線
の傾きを調べる傾き検査ステップと、 前記点の数と前記第1および第2の輪郭線の傾きに従っ
て前記塗り潰そうとする領域を構成する点に新たな点を
追加する点追加ステップとを含む描画方法のプログラム
を記憶したことを特徴とする記憶媒体。
14. A point inspection step for examining the number of a plurality of points representing an area to be filled by scanning line decomposition, and an inclination inspection for examining inclinations of first and second contour lines in directions different from the scan line. A program for a drawing method, comprising: a step of adding a new point to a point constituting the area to be filled according to the number of points and the inclinations of the first and second contour lines. A storage medium characterized by the following.
JP27003196A 1996-10-11 1996-10-11 Plotting device and method, and storage medium Pending JPH10116348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27003196A JPH10116348A (en) 1996-10-11 1996-10-11 Plotting device and method, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27003196A JPH10116348A (en) 1996-10-11 1996-10-11 Plotting device and method, and storage medium

Publications (1)

Publication Number Publication Date
JPH10116348A true JPH10116348A (en) 1998-05-06

Family

ID=17480577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27003196A Pending JPH10116348A (en) 1996-10-11 1996-10-11 Plotting device and method, and storage medium

Country Status (1)

Country Link
JP (1) JPH10116348A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007087283A (en) * 2005-09-26 2007-04-05 Mitsubishi Electric Corp Graphic drawing device and graphic drawing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007087283A (en) * 2005-09-26 2007-04-05 Mitsubishi Electric Corp Graphic drawing device and graphic drawing program
JP4664169B2 (en) * 2005-09-26 2011-04-06 三菱電機株式会社 Graphic drawing apparatus and graphic drawing program

Similar Documents

Publication Publication Date Title
US7821514B2 (en) Image processing apparatus, image processing method, and image processing program
JP3333297B2 (en) How to change the thickness of raster output characters
JP4327105B2 (en) Drawing method, image generation apparatus, and electronic information device
US5461703A (en) Pixel image edge enhancement method and system
US20100283780A1 (en) Information processing apparatus, information processing method, and storage medium
JPH08106276A (en) Display method of text on screen
JP3142550B2 (en) Graphic processing unit
JP5067501B2 (en) Multicolor vector image processing apparatus and method
JP4370438B2 (en) Vector image drawing apparatus, vector image drawing method and program
US5524198A (en) Character or graphic processing method and apparatus
JPH05143742A (en) Vector image drawing device
JP3791259B2 (en) Outline smoothing processing method
JPH10116348A (en) Plotting device and method, and storage medium
JPH04139589A (en) Graphic processor
JP3898426B2 (en) Graphic drawing device
JP4930860B2 (en) Graphic drawing apparatus, antialiasing method and program
JP4125245B2 (en) Document display method and document display apparatus
JP2008027350A (en) Thick line drawing processing method and processing device
JP4320604B2 (en) Image processing method and image processing apparatus
JP3350325B2 (en) Character output device
JP2001092981A (en) Device and method for processing image
JP2005077750A (en) Display device and character display control method
JP2001307115A (en) Image processor and image processing method
JPH09138679A (en) Data processor
JPH08202866A (en) Output device and output method