JPH06168339A - Plotting device - Google Patents

Plotting device

Info

Publication number
JPH06168339A
JPH06168339A JP34349792A JP34349792A JPH06168339A JP H06168339 A JPH06168339 A JP H06168339A JP 34349792 A JP34349792 A JP 34349792A JP 34349792 A JP34349792 A JP 34349792A JP H06168339 A JPH06168339 A JP H06168339A
Authority
JP
Japan
Prior art keywords
vector
outline
line
data
straight 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.)
Granted
Application number
JP34349792A
Other languages
Japanese (ja)
Other versions
JP3060761B2 (en
Inventor
Yuji Onozawa
雄二 小野澤
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP34349792A priority Critical patent/JP3060761B2/en
Publication of JPH06168339A publication Critical patent/JPH06168339A/en
Application granted granted Critical
Publication of JP3060761B2 publication Critical patent/JP3060761B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To provide a plotting device capable of rapidly obtaining a plotting graphics of high quality filling a gap generated on a connecting point even at the time of plotting a line having line width. CONSTITUTION:An input command is interpreted by an input control part 1 and a stroke vector, a fill vector and a parameter are respectively sent to a curved line approximating part 5, a vector storing part 3 and a parameter storing part 2. The approximating part 5 approximates a curved line with plural straight lines based upon the stroke vector and then an outline generating part 4 generates an outline vector for the stroke vector and a vector for filling a space part and sends the generated vectors to the storing part 3. The approximating part 5 approximates a curved line with plural straight lines based upon the vectors in the storing part 3 and then a paint-out processing part 6 executes paint-out processing and outputs the processed result. Paint-out for the stroke vector is executed by a non-zero turns rule.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、入力されたデータをラ
スターデータに変換し、画像を描画する描画装置に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a drawing device for converting input data into raster data and drawing an image.

【0002】[0002]

【従来の技術】従来より、コンピュータグラフィックス
やDTPなどの分野では、入力されたグラフィックデー
タやコードデータなどから、ビットマップなどのラスタ
ー情報に変換して、ディスプレイやプリンタ等の出力装
置に出力するための装置が開発されている。例えば、特
開平4−15771号公報に記載されているものがあ
る。近年、このような装置においては、太さ情報を有す
るベクター情報をラスター情報に変換することが多く行
なわれ、さらに接続点、終端点の形状などにさまざまな
ものが指定できるようになった。太さ情報を有するベク
ター情報をラスター情報に変換する1つの方法として
は、特開昭61−180284号公報や、特開平4−4
9474号公報に記載されているような方法がある。こ
の方法では、ベクターデータを上下または左右にずらし
た複数のベクターを生成し、太線を描画している。しか
し、この方法のように、単にベクターデータを上下、左
右にずらして太くしただけでは、ベクターの接続点にお
いて、隙間ができてしまい、描画された図形の品質は低
下する。図10は線の接続点付近の拡大図である。図1
0に示すように、接続点の外側では、Aの部分で隙間が
でき、Bの部分でオーバーラップ部ができる。特に、線
の太さが太くなるほど、この隙間は顕著となる。
2. Description of the Related Art Conventionally, in the fields of computer graphics, DTP, etc., input graphic data, code data, etc. are converted into raster information such as bitmaps and output to output devices such as displays and printers. Devices have been developed. For example, there is one described in JP-A-4-15771. In recent years, in such an apparatus, vector information having thickness information is often converted into raster information, and various shapes such as connection points and termination points can be specified. One method for converting vector information having thickness information into raster information is JP-A-61-180284 and JP-A-4-4.
There is a method described in Japanese Patent No. 9474. In this method, a plurality of vectors are generated by shifting the vector data vertically or horizontally, and a thick line is drawn. However, like this method, if the vector data is simply shifted vertically and left and right to be thick, a gap is created at the connection point of the vector, and the quality of the drawn figure is deteriorated. FIG. 10 is an enlarged view of the vicinity of a line connection point. Figure 1
As shown in 0, outside the connection point, a gap is formed at the portion A and an overlap portion is formed at the portion B. In particular, the thicker the line, the more remarkable this gap becomes.

【0003】そのため、ベクターの接続点で発生する隙
間を埋め、良好な描画図形を得る技術も開発されてい
る。例えば、特公昭61−8434号公報には、中心ベ
クターから線幅情報を用いて輪郭線の交点を求め、この
交点をもとに描画処理を行なう旨の記載がある。また、
特公昭63−67220号公報には、ベクターから輪郭
線を生成し、ベクターの接続点においては、接続点を中
心とし線幅を直径とする円を発生させ、これを多角形近
似して隙間を埋める旨の記載がある。これらの技術によ
れば、線幅を有するベクターの接続はなめらかに行なわ
れ、接続点において隙間ができることはないが、前者の
例では、ベクターの輪郭線の外側と内側の両側につい
て、交点の計算を行なっている。また、後者において
は、円を直線近似したベクターを発生させるため、計算
量が多くなるとともに、隙間以外の部分における近似直
線のベクターを計算しており、どちらも計算量が多く、
高速な描画処理が行なえないという欠点があった。
Therefore, there has been developed a technique for filling a gap generated at a vector connection point to obtain a good drawing figure. For example, Japanese Examined Patent Publication No. 61-8434 describes that an intersection of contour lines is obtained from a central vector using line width information, and drawing processing is performed based on this intersection. Also,
In Japanese Examined Patent Publication No. 63-67220, a contour line is generated from a vector, and at a connection point of the vector, a circle having a line width as a diameter with a center at the connection point is generated, and a polygon is approximated to form a gap. There is a statement to fill. According to these techniques, a vector having a line width is smoothly connected, and no gap is created at the connection point.However, in the former example, the calculation of the intersection point is performed on both the outer side and the inner side of the vector contour line. Are doing. Also, in the latter, since a vector that approximates a circle to a straight line is generated, the amount of calculation increases, and the vector of the approximate straight line in the portion other than the gap is calculated.
There was a drawback that high-speed drawing processing could not be performed.

【0004】[0004]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、線幅を有する線を描画する
ときにも、接続点で発生する隙間を埋めた、高品位の描
画図形を、高速に得ることのできる描画装置を提供する
ことを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described circumstances, and when drawing a line having a line width, a high-quality drawing in which a gap generated at a connection point is filled up. It is an object of the present invention to provide a drawing device that can obtain a figure at high speed.

【0005】[0005]

【課題を解決するための手段】本発明は、描画すべきデ
ータをラスターデータに変換し図形を描画する描画装置
において、直線、曲線等からなる図形のベクターデータ
を受け取り、ベクターデータおよび線の太さ等の描画パ
ラメータを用いて描画する線の輪郭を示すアウトライン
ベクターを作成するとともに、選択された接続形状のパ
ラメータに基づき、線の接続部に発生する隙間を埋める
輪郭を示すアウトラインベクターを作成するアウトライ
ン生成手段と、作成されたアウトラインベクターを基に
非ゼロ巻数規則により塗り潰し処理を行なう塗り潰し手
段とを有することを特徴とするものである。
According to the present invention, in a drawing apparatus for converting data to be drawn into raster data and drawing a figure, vector data of a figure consisting of straight lines, curves, etc. is received, and the vector data and the line weight are drawn. Create an outline vector that shows the outline of the line to be drawn using drawing parameters such as Sa, and also create an outline vector that shows the outline that fills the gaps that occur at the connection part of the line, based on the parameters of the selected connection shape. It is characterized by having an outline generating means and a filling means for performing a filling process based on the created outline vector according to a non-zero winding number rule.

【0006】曲線のベクターデータに対しては、該曲線
のベクターデータを複数の直線ベクターに分割して近似
する曲線近似手段をさらに有し、近似した直線ベクター
を用いてアウトライン生成手段により直線ベクターおよ
び接続部のアウトラインベクターの作成を行なうように
構成することもできる。
[0006] For vector data of a curve, the vector data of the curve is further divided into a plurality of straight line vectors, and a curve approximating means for approximating is further provided. It can also be configured to create an outline vector of the connection.

【0007】また、アウトライン生成手段における線の
接続部の輪郭を示すアウトラインベクターの作成を、接
続する2つの線の外積の符号により決定された領域に対
して行なうように構成することもできる。
Further, the outline vector indicating the contour of the connecting portion of the lines in the outline generating means may be created for the area determined by the sign of the cross product of the two connecting lines.

【0008】さらに、塗り潰し手段として、アウトライ
ンベクターを受け取り、該アウトラインベクターよりエ
ッジリストを作成し、このエッジリストを用いて非ゼロ
巻数規則により塗りつぶし処理を行なうように構成する
こともできる。
Further, as the filling means, an outline vector may be received, an edge list may be created from the outline vector, and the filling process may be performed using the edge list according to the non-zero winding number rule.

【0009】[0009]

【作用】本発明によれば、アウトライン生成手段におい
て、直線、曲線等からなる図形のベクターデータを受け
取り、ベクターデータおよび線の太さ等の描画パラメー
タを用いて描画する線の輪郭を示すアウトラインベクタ
ーを作成するとともに、ベクターの接続部においては、
選択された接続形状のパラメータに基づき、線の接続部
に発生する隙間部分を埋める輪郭を示すアウトラインベ
クターを作成するだけなので、従来のように、図10の
Bのようなオーバーラップ部の処理や、Aの領域以外の
部分まで円を近似した直線を発生するような、無駄な計
算を行なうことがなく、高速にアウトラインベクターを
発生することができる。また、アウトライン生成手段
と、作成されたアウトラインベクターを基に非ゼロ巻数
規則により塗り潰し処理を行なう塗り潰し手段を有する
ことにより、オーバーラップ部があっても、確実に塗り
潰しを行ない、高品質の描画を行なうことができる。
According to the present invention, the outline generation means receives the vector data of a figure consisting of a straight line, a curved line, etc., and uses the vector data and drawing parameters such as the thickness of the line to draw the outline vector of the line. In addition to creating the
Based on the parameters of the selected connection shape, it is only necessary to create an outline vector showing a contour that fills a gap portion generated in the connection portion of the line. , A can be generated at high speed without performing unnecessary calculation such as generating a straight line that approximates a circle to a portion other than the area A. Further, by having an outline generation means and a filling means for performing a filling process based on the created outline vector according to a non-zero winding number rule, even if there is an overlapping portion, it is possible to surely perform filling and to perform high-quality drawing. Can be done.

【0010】曲線のベクターデータに対しては、該曲線
のベクターデータを複数の直線ベクターに分割して近似
する曲線近似手段をさらに有し、近似した直線ベクター
を用いてアウトライン生成手段により直線ベクターおよ
び接続部のアウトラインベクターの作成を行なうように
構成することにより、以降の処理を直線のみの操作で行
なうことができ、処理を簡単化するとともに、高速化す
ることができる。
[0010] For vector data of a curve, the vector data of the curve is further divided into a plurality of straight line vectors, and a curve approximating means for approximating is further provided. By constructing the outline vector of the connecting portion, the subsequent processing can be performed only by the operation of the straight line, and the processing can be simplified and speeded up.

【0011】また、アウトライン生成手段において、ア
ウトラインベクターを作成する領域の検出を、接続する
2つの線の外積の符号により決定することにより、隙間
の発生している領域を簡単に検出し、アウトラインベク
ターを作成することができる。
Further, in the outline generating means, the detection of the area for creating the outline vector is determined by the sign of the cross product of the two connecting lines, so that the area in which the gap is generated can be easily detected, and the outline vector can be detected. Can be created.

【0012】さらに、塗り潰し手段で、アウトラインベ
クターよりエッジリストを作成し、このエッジリストを
用いて非ゼロ巻数規則により塗りつぶし処理を行なうこ
とにより、ラスターデータに対する塗り潰し処理に比
べ、高速に塗り潰し処理を行なうことができる。
Further, the filling means creates an edge list from the outline vector and performs the filling processing according to the non-zero winding number rule using this edge list, so that the filling processing is performed faster than the filling processing for raster data. be able to.

【0013】[0013]

【実施例】図1は、本発明の描画装置の一実施例を示す
ブロック図である。図中、1は入力制御部、2はパラメ
ータ記憶部、3はベクター記憶部、4はアウトライン生
成部、5は曲線近似部、6は塗り潰し処理部、7は出力
制御部、8は出力装置である。
1 is a block diagram showing an embodiment of a drawing apparatus of the present invention. In the figure, 1 is an input control unit, 2 is a parameter storage unit, 3 is a vector storage unit, 4 is an outline generation unit, 5 is a curve approximation unit, 6 is a fill processing unit, 7 is an output control unit, and 8 is an output device. is there.

【0014】入力制御部1は、入力コマンドを受け付
け、各入力コマンドの属性に応じてデータを振り分け
る。入力コマンドとしては、直線とベジエ曲線からなる
fillベクターコマンド、strokeベクターコマ
ンドおよび描画パラメータコマンド等がある。fill
ベクターコマンドは、指定された直線およびベジエ曲線
のベクターで囲まれる領域を塗り潰すコマンドである。
また、strokeベクターコマンドは、指定されたベ
クターにより、直線およびベジエ曲線を描画するコマン
ドである。曲線はベジエ曲線に限らず、スプライン曲線
など他の曲線であってもよい。入力コマンドがfill
ベクターコマンドの場合には、fillベクターを拡大
率処理し、ベクター記憶部3へ書き込む。また、入力コ
マンドがstrokeベクターコマンドの場合には、s
trokeベクターを拡大率処理し、曲線近似部5へ送
る。さらに、入力コマンドが描画パラメータコマンドの
場合には、描画パラメータをパラメータ記憶部2へ書き
込む。パラメータ記憶部2は、入力制御部1から書き込
まれる描画パラメータを記憶し、記憶している描画パラ
メータを入力制御部1、アウトライン生成部4、曲線近
似部5、塗り潰し処理部6に供給する。ベクター記憶部
3は、入力制御部1から書き込まれるfillベクタ
ー、および、アウトライン生成部4で生成されたアウト
ラインベクターを格納し、これらのベクターデータを曲
線近似部5に送る。曲線近似部5では、入力制御部1か
ら送られたstrokeベクター、および、ベクター記
憶部3から送られてきたベクターデータのうち、ベジエ
曲線の部分を、描画パラメータ内の閾値に従い、複数の
直線で近似する。入力制御部1から送られたstrok
eベクターを直線のデータに近似した場合には、ベクタ
ーデータはアウトライン生成部4に送られる。ベクター
記憶部3から送られてきたベクターに対して直線に近似
した場合には、ベクターデータは塗り潰し処理部6に送
られる。アウトライン生成部4は、直線の太さと接続形
状、終端形状などの描画パラメータに基づき、交点にお
ける接続処理などを行なって、直線とベジエ曲線からな
るアウトラインベクターを生成し、ベクター記憶部3へ
書き込む。このとき、アウトラインベクター内を非ゼロ
巻数規則により塗り潰すようなベクターコマンドとし
て、ベクター記憶部3へ送る。塗り潰し処理部6では、
曲線近似部5からベクターデータを受け取り、奇偶規則
(Even−Odd rule 以下EOFILLと略
す)による方法と、非ゼロ巻数規則(Non−zero
Winding rule以下NZWFILLと略
す)による方法のどちらか指定された方法により、スキ
ャンラインごとに塗りつぶされる位置を示すデータ、す
なわち、エッジリストデータを出力する。入力されたデ
ータがstrokeベクターの場合には、自動的にNZ
WFILLが適用される。エッジリストデータは、出力
制御部7へ送られる。出力制御部7は、塗り潰し処理部
6からエッジリストデータを受け取り、出力装置8に応
じた処理を行ない、出力命令を出力装置8へ送る。出力
装置8は画像を出力する。
The input control unit 1 receives an input command and sorts data according to the attribute of each input command. Input commands include a fill vector command consisting of a straight line and a Bezier curve, a stroke vector command, and a drawing parameter command. fill
The vector command is a command for filling the area enclosed by the vectors of the specified straight line and Bezier curve.
The stroke vector command is a command that draws a straight line and a Bezier curve with a designated vector. The curve is not limited to a Bezier curve, and may be another curve such as a spline curve. Input command is fill
In the case of a vector command, the fill vector is subjected to magnification processing and written in the vector storage unit 3. If the input command is a stroke vector command, s
The stroke vector is subjected to magnification processing and sent to the curve approximation unit 5. Further, when the input command is the drawing parameter command, the drawing parameter is written in the parameter storage unit 2. The parameter storage unit 2 stores the drawing parameters written from the input control unit 1, and supplies the stored drawing parameters to the input control unit 1, the outline generation unit 4, the curve approximation unit 5, and the filling processing unit 6. The vector storage unit 3 stores the fill vector written from the input control unit 1 and the outline vector generated by the outline generation unit 4, and sends these vector data to the curve approximation unit 5. In the curve approximation unit 5, the Bezier curve portion of the stroke vector sent from the input control unit 1 and the vector data sent from the vector storage unit 3 is converted into a plurality of straight lines according to the threshold value in the drawing parameter. To approximate. Strok sent from the input control unit 1
When the e vector is approximated to linear data, the vector data is sent to the outline generation unit 4. When the vector sent from the vector storage unit 3 is approximated to a straight line, the vector data is sent to the filling processing unit 6. The outline generation unit 4 performs connection processing at intersections based on drawing parameters such as the thickness of the straight line, the connection shape, and the end shape to generate an outline vector composed of the straight line and the Bezier curve, and writes the outline vector in the vector storage unit 3. At this time, the outline vector is sent to the vector storage unit 3 as a vector command for filling the outline vector according to the non-zero winding number rule. In the filling processing unit 6,
Vector data is received from the curve approximation unit 5, and a method using an even-odd rule (abbreviated as EOFILL hereinafter) and a non-zero winding number rule (Non-zero) are used.
Data indicating a position to be filled for each scan line, that is, edge list data is output by a designated method, which is one of the following methods (hereinafter referred to as NZWFILL). If the input data is a stroke vector, NZ is automatically
WFILL applies. The edge list data is sent to the output control unit 7. The output control unit 7 receives the edge list data from the filling processing unit 6, performs processing according to the output device 8, and sends an output command to the output device 8. The output device 8 outputs an image.

【0015】以下、本発明の描画装置の一実施例の動作
を図2乃至図6を用いて説明する。まず、入力制御部1
に入力データが入力される。上述したように、入力デー
タとしては、直線とベジエ曲線からなるfillベクタ
ーデータ、strokeベクターデータおよび描画パラ
メータ等がある。図2は、描画パラメータコマンドの一
例の説明図である。変換マトリックスコマンドは、入力
されるベクターデータの座標変換に用いられる。コマン
ド“setmatrix”に続き、a1乃至a6の6つ
のパラメータが指定される。これらのパラメータは、図
中のコマンド表記の右側に示すような一次式の係数とな
る。式中、X,Yは変換前の座標、X’,Y’は変換後
の座標である。線幅コマンドは、線の幅を指定するコマ
ンドである。コマンド“setlinewidth”に
続くパラメータwにより指定される。接続形状コマンド
は、後述する直線相互の接続点におけるアウトラインの
形状を指定するコマンドである。コマンド“setli
nejoin”に続くパラメータにより指定される。指
定できる接続形状は、斜接型(miter),丸型(r
ound),そぎ接型(bevel)の3種類であり、
それぞれm,r,bで指定する。これらの接続形状につ
いては、図6を用いて後述する。線端形状コマンドは、
線の端部の形状を指定するコマンドである。コマンド
“setlinecap”に続くパラメータにより指定
される。指定できる接続形状は、切り株型(but
t),丸型(round),四角形(square)の
3種類であり、それぞれb,r,sで指定する。曲線分
割閾値コマンドは、曲線近似部5においてベジエ曲線を
直線に近似する際に用いる閾値を与える。コマンド“s
etflatness”に続くパラメータdで指定す
る。これらの描画コマンドが入力制御部1に入力される
と、入力制御部1では各コマンドを認識して、コマンド
により指定されるパラメータをパラメータ記憶部2に書
き込む。
The operation of one embodiment of the drawing apparatus of the present invention will be described below with reference to FIGS. First, the input control unit 1
Input data is input to. As described above, the input data includes fill vector data including straight lines and Bezier curves, stroke vector data, drawing parameters, and the like. FIG. 2 is an explanatory diagram of an example of the drawing parameter command. The transformation matrix command is used for coordinate transformation of input vector data. Following the command "setmatrix", six parameters a1 to a6 are designated. These parameters are coefficients of a linear equation as shown on the right side of the command notation in the figure. In the formula, X and Y are coordinates before conversion, and X ′ and Y ′ are coordinates after conversion. The line width command is a command for specifying the line width. It is specified by the parameter w following the command "setlinewidth". The connection shape command is a command that specifies the shape of the outline at the connection points of straight lines described later. Command "setli
It is specified by the parameter following "nejoin". The connectable shapes that can be specified are oblique type (miter) and round type (r
There are three types, one is a sound type, and the other is a contact type.
Specify with m, r, and b, respectively. These connection shapes will be described later with reference to FIG. The line shape command is
It is a command that specifies the shape of the end of the line. It is designated by the parameter following the command "setlinecap". The connection shape that can be specified is a stump type (but
t), round type, and square type, which are designated by b, r, and s, respectively. The curve division threshold command gives a threshold used when the Bezier curve is approximated to a straight line by the curve approximation unit 5. Command "s
It is designated by a parameter d following "etflatness". When these drawing commands are input to the input control unit 1, the input control unit 1 recognizes each command and writes the parameter designated by the command in the parameter storage unit 2. .

【0016】図3は、ベクターコマンドデータの一例の
説明図である。図3(A)はfillベクターコマンド
を示し、図3(B)はstrokeベクターコマンドを
示している。それぞれ右側にコマンドの一例を示し、左
側にコマンドによって描画される画像の一例を示してい
る。fillベクターコマンドは、指定する領域内を塗
り潰すことを指示するコマンドである。図3(A)に示
すように、塗り潰し処理を行なう際の方式を示すコマン
ドと、セグメント数、線種データおよび座標データが並
べられる。線種としては、直線及びベジエ曲線が指定さ
れる。この他の線種を許容してももちろんよい。この例
では、EOFILLにより塗り潰し処理を行なうことが
指定され、5つの点を直線で結ぶ領域内を塗り潰すこと
が指示されている。例えば、図3(A)左側に示すよう
な5角形内が塗り潰された画像を得ることができる。
FIG. 3 is an illustration of an example of vector command data. FIG. 3 (A) shows the fill vector command, and FIG. 3 (B) shows the stroke vector command. An example of a command is shown on the right side, and an example of an image drawn by the command is shown on the left side. The fill vector command is a command for instructing to fill the specified area. As shown in FIG. 3A, a command indicating the method for performing the filling process, the number of segments, line type data, and coordinate data are arranged. A straight line and a Bezier curve are designated as the line type. Of course, other line types may be allowed. In this example, EOFILL is designated to perform the filling process, and it is instructed to fill the area connecting the five points with a straight line. For example, an image in which the inside of a pentagon is filled can be obtained as shown on the left side of FIG.

【0017】strokeベクターコマンドは、直線や
ベジエ曲線等の線を描画するためのコマンドである。図
3(B)に示すように、strokeベクターである旨
を示すコマンドと、セグメント数、線種データと座標デ
ータの組が並べられる。この例では、2つの直線と1つ
のベジエ曲線の、3つのstrokeベクターが指示さ
れている。例えば、図3(B)左側に示すような、直線
および曲線の画像を得ることができる。
The stroke vector command is a command for drawing a line such as a straight line or a Bezier curve. As shown in FIG. 3B, a command indicating that the vector is a stroke vector, the number of segments, and a set of line type data and coordinate data are arranged. In this example, three stroke vectors, two straight lines and one Bezier curve, are indicated. For example, an image of a straight line and a curved line as shown on the left side of FIG. 3B can be obtained.

【0018】これらのベクターコマンドデータが入力制
御部1に入力されると、入力制御部1では、パラメータ
記憶部2から変換マトリックスコマンドで指定された変
換係数パラメータa1乃至a6を読み出して、各ベクタ
ーに対して一次式による座標変換を施し、結果を、fi
llベクターならばベクター記憶部3へ書き出し、st
rokeベクターならば曲線近似部5へ送る。
When these vector command data are input to the input control unit 1, the input control unit 1 reads the conversion coefficient parameters a1 to a6 designated by the conversion matrix command from the parameter storage unit 2 and writes them into each vector. On the other hand, the coordinate transformation by the linear equation is performed, and the result is fi
If it is an ll vector, it is written to the vector storage unit 3, st
If it is a roke vector, it is sent to the curve approximation unit 5.

【0019】以下、fillベクターとstrokeベ
クターとに分けて、動作を説明する。ベクター記憶部3
に書き出されたfillベクターは、曲線近似部5に送
られ、曲線分割閾値コマンドで指定された閾値パラメー
タdに達するまで再帰的に分割され、直線で近似され
る。図4は、ベジエ曲線を再帰的に直線に分割する処理
の説明図である。図4(A)は、分割処理のフローチャ
ート、図4(B)は分割されるベジエ曲線の一例におけ
る各点の関係を示す図である。いま、P0,P1,P
2,P3の4点が与えられ、ベジエ曲線が定義されてい
るものとする。このとき、P0をP0’、P0とP1の
中点をP1’、P1とP2との中点とP1’を結ぶ線分
の中点をP2’、P2とP3の中点をP2”、P1とP
2との中点とP2”を結ぶ線分の中点をP1”、P2’
とP1”の中点をP3’およびP0”、P3をP3”と
する。これらの点の座標をS11で計算する。そして、
S12において、P0とP3の中点とP3’との距離T
dを計算し、この距離Tdが予め定められた終了条件値
flatnessよりも大きいか、または、閾値パラメ
ータdよりも大きい場合には、さらに分割する必要があ
ると判断し、S13において、P0’,P1’,P
2’,P3’の4点、および、P0”,P1”,P
2”,P3”の4点をそれぞれ新たなベジエ曲線の定義
している点、すなわち、P0,P1,P2,P3とした
2つのベジエ曲線に分割し、分割処理を再帰的に行な
う。再帰的な分割処理においては、終了条件は、閾値パ
ラメータdに代わって距離Tdが用いられる。再帰的に
分割処理を行なう場合には、さらに小さい直線を発生さ
せる必要がある場合であり、この段階では直線を発生さ
せる必要はない。そのため、直線を発生させないための
フラグを立てておく。S12において、P0とP3の中
点とP3’との距離が、値flatness以下とな
り、さらに、閾値パラメータd以下となると、分割処理
はもはや行なわれず、S14においてフラグを確認した
後、S15において、P0,P3’を結ぶ直線として、
座標値が出力される。S14のフラグの確認は、S13
において再帰的に分割処理ルーチンを呼んだ場合には、
直線ベクターを発生させないようにするために行なわれ
る。上述の分割及び近似直線の発生処理が終了した時点
では、P3を端点とする近似直線が発生されないので、
最後にP3’とP3を接続する近似直線を発生させて近
似処理を終わる。なお、ベクター記憶部3に記憶されて
いるベクターが、全て直線の場合には、曲線近似部5に
よる近似処理は行なわれない。このようにして直線によ
り近似処理されたfillベクターは、塗り潰し処理部
6へ送られる。
The operation of the fill vector and the stroke vector will be described below separately. Vector memory 3
The fill vector written in is sent to the curve approximation unit 5 and recursively divided until it reaches the threshold parameter d designated by the curve division threshold command, and is approximated by a straight line. FIG. 4 is an explanatory diagram of a process of recursively dividing a Bezier curve into straight lines. FIG. 4A is a flowchart of the division process, and FIG. 4B is a diagram showing the relationship between points in an example of the Bezier curve to be divided. Now P0, P1, P
4 points of 2 and P3 are given, and the Bezier curve is defined. At this time, P0 is P0 ', the midpoint of P0 and P1 is P1', the midpoint of the line segment connecting the midpoints of P1 and P2 and P1 'is P2', the midpoint of P2 and P3 is P2 ", P1 And P
The midpoint of the line segment connecting the midpoint with 2 and P2 "is P1", P2 '
Let P3 'and P0 "be the middle points of P1" and P1 ", and P3" be P3 ". The coordinates of these points are calculated in S11.
In S12, the distance T between the midpoint of P0 and P3 and P3 '
d is calculated, and if this distance Td is larger than a predetermined end condition value flatness or larger than a threshold parameter d, it is determined that further division is necessary, and in S13, P0 ′, P1 ', P
4 points of 2 ', P3' and P0 ", P1", P
The 4 points of 2 "and P3" are divided into points each of which defines a new Bezier curve, that is, two Bezier curves defined as P0, P1, P2, and P3, and the dividing process is recursively performed. In the recursive division process, the distance Td is used as the termination condition instead of the threshold parameter d. When the recursive division processing is performed, it is necessary to generate a smaller straight line, and it is not necessary to generate a straight line at this stage. Therefore, a flag is set to prevent the straight line from being generated. In S12, when the distance between the midpoint of P0 and P3 and P3 'becomes equal to or less than the value flatness and further becomes equal to or less than the threshold parameter d, the division processing is no longer performed, and after confirming the flag in S14, P0 is obtained in S15. , P3 'as a straight line connecting
The coordinate value is output. To confirm the flag in S14, see S13
When the split processing routine is called recursively in
This is done so as not to generate a linear vector. At the time when the above division and generation processing of the approximate straight line is finished, the approximate straight line having P3 as an end point is not generated.
Finally, an approximate straight line connecting P3 'and P3 is generated, and the approximation process ends. When all the vectors stored in the vector storage unit 3 are straight lines, the approximation processing by the curve approximation unit 5 is not performed. The fill vector thus approximated by the straight line is sent to the filling processing unit 6.

【0020】塗り潰し処理部6では、曲線近似部5より
送られてきたベクターを、ベクターの開始点と終了点の
Y座標のうち、小さいほうの値で並べ換え、ベクターテ
ーブルを作成する。図5は、ベクターテーブルの説明図
である。ベクターテーブルは、スキャンライン数分のベ
クターテーブル本体へのポインタを保持するバケット
と、各ベクターの情報が登録されるベクターテーブル本
体から構成される。ベクターテーブル本体に登録される
各ベクターの情報としては、ベクターのY座標軸から見
た向きflag、ベクターのY座標方向の長さ△y、始
点または終点のX座標値sx、ベクターのY座標軸から
見た傾き△x/△y、他のベクターテーブル本体のデー
タへのポインタ等である。初期状態において、バケット
のポインタは全てNULLとなっており、また、ベクタ
ーテーブルは空である。図2に示した例の場合には、図
5に示すように、バケットは16個のポインタで構成さ
れる。
The fill processing section 6 rearranges the vectors sent from the curve approximation section 5 by the smaller value of the Y coordinates of the start point and the end point of the vector to create a vector table. FIG. 5 is an explanatory diagram of the vector table. The vector table is composed of a bucket that holds pointers to vector table bodies for the number of scan lines and a vector table body in which information of each vector is registered. The information of each vector registered in the vector table body includes the direction flag viewed from the Y coordinate axis of the vector, the length Δy in the Y coordinate direction of the vector, the X coordinate value sx of the start point or the end point, and the Y coordinate axis of the vector. The gradient Δx / Δy, pointers to other vector table data, and the like. In the initial state, all bucket pointers are NULL, and the vector table is empty. In the case of the example shown in FIG. 2, the bucket is composed of 16 pointers as shown in FIG.

【0021】塗り潰し処理部6に直線ベクターが入力さ
れると、まず、直線ベクターの両端点のY座標値を比較
し、小さい側の端点を検出する。検出した端点のY座標
値に対応するバケットのポインタに、このベクターの情
報が登録されるベクターテーブル本体のアドレスがセッ
トされる。Y座標値は整数でない場合も考えられるが、
例えば四捨五入し、近い値のバケットのスキャンライン
値のポインタをセットする。バケットにアドレスがセッ
トされる前の値は、pointerに格納される。その
ため、既にアドレスが格納されているバケットに対して
登録を行なうと、バケットには新たなベクターの情報を
指すポインタが格納され、ベクターテーブル本体のpo
interには、以前に登録されているベクターテーブ
ル本体内のベクター情報を指すポインタが格納されるこ
とになる。入力された直線ベクターから、さらに、Y座
標軸からみたベクターの向きflag、Y座標方向の長
さ△y、検出した端点でのX座標値sx、ベクターのY
座標軸から見た傾き△x/△yを求め、これらの値をそ
れぞれflag,△y,sx,△x/△yの欄に登録す
る。ベクターの向きflagは、例えば、Y座標軸に対
して同方向、すなわち、上向きであれば+1、下向きで
あれば−1、Y座標軸と直角、すなわち水平線であれば
0の値が登録される。
When a straight line vector is input to the filling processing section 6, first, the Y coordinate values of both end points of the straight line vector are compared to detect the smaller end point. The address of the vector table body in which the information of this vector is registered is set in the pointer of the bucket corresponding to the detected Y coordinate value of the end point. The Y coordinate value may not be an integer,
For example, rounding is done and the pointer of the scanline value of the bucket with a similar value is set. The value before the address is set in the bucket is stored in pointer. Therefore, if registration is performed for a bucket that already stores an address, a pointer that points to new vector information is stored in the bucket, and the po of the vector table body is stored.
In inter, a pointer that points to vector information in the previously registered vector table body is stored. From the input straight line vector, the direction flag of the vector as seen from the Y coordinate axis, the length Δy in the Y coordinate direction, the X coordinate value sx at the detected end point, the Y of the vector
The inclinations Δx / Δy viewed from the coordinate axes are obtained, and these values are registered in the columns of flag, Δy, sx, and Δx / Δy, respectively. The vector direction flag is registered in the same direction with respect to the Y coordinate axis, that is, +1 if it is upward, -1 if it is downward, and a value perpendicular to the Y coordinate axis, that is, 0 if it is a horizontal line.

【0022】ベクターデータ本体の各セルは、ベクター
の入力順に使われるが、ベクターの両端のY座標値のう
ち、小さい方の端点のY座標値が同じベクターは、その
Y座標値を有するバケットから自動的にリスト構造でつ
ながれ、Y座標値でソートした状態となる。また、Y座
標値のうちの小さい方が、バケットの最大値を越える場
合には、登録しない。また、Y座標の大きい方の端点の
Y座標値が、バケットの最大値を越える場合には、Y座
標の大きい方の端点のY座標値が、バケットの最大値に
なるように、すなわち、△yを変更して登録する。さら
に、水平線の場合には、sxに最小のX座標値、△x/
△yに最大のX座標値を入れる。
Each cell of the vector data body is used in the order in which the vectors are input. Of the Y coordinate values at both ends of the vector, the vector having the same Y coordinate value at the smaller endpoint is from the bucket having that Y coordinate value. They are automatically linked by a list structure and sorted by the Y coordinate value. If the smaller of the Y coordinate values exceeds the maximum value of the bucket, it is not registered. Further, when the Y coordinate value of the end point having the larger Y coordinate exceeds the maximum value of the bucket, the Y coordinate value of the end point having the larger Y coordinate becomes the maximum value of the bucket, that is, Δ Change y and register. Furthermore, in the case of a horizontal line, the minimum X coordinate value for sx, Δx /
Put the maximum X coordinate value in Δy.

【0023】このようにして作成されたベクターテーブ
ルを基に、各スキャンラインごとに、スキャンラインと
ベクターとの交点のX座標を求め、小さい順にソートす
る。小さい順にソートされたX座標をもとに、エッジリ
ストを作成する。このエッジリストは、EOFILLで
塗り潰す場合には、小さい順にソートされたX座標の奇
数番目と偶数番目の間を塗り潰すように、奇数番目を塗
り潰しの始点に、偶数番目を終点にしたエッジリストを
作成して出力制御部7へ送る。NZWFILLで塗り潰
す場合には、小さい順にソートされたX座標の順に、ベ
クターのflagの値を加算して行く。加算の場合の初
期値は0になっている。そして、加算した値を順に参照
しながら、0から0以外、0以外から0に変化する間を
塗り潰すように、0から0以外に変化する点を始点、0
以外から0に変化する点を終点とするエッジリストを作
成して出力制御部7へ送る。両方とも、水平線の場合に
は、上記処理をせずエッジリストとして出力する。
Based on the vector table created in this way, the X coordinate of the intersection of the scan line and the vector is obtained for each scan line and sorted in ascending order. An edge list is created based on the X coordinates sorted in ascending order. When filling with EOFILL, this edge list fills the odd-numbered and even-numbered X-coordinates sorted in ascending order so that the odd-numbered start point is the filling start point and the even-numbered end point is the end point list. Is generated and sent to the output control unit 7. When painting with NZWFILL, the value of the flag of the vector is added in the order of the X coordinates sorted in ascending order. The initial value in the case of addition is 0. Then, referring to the added values in order, the start point is the point that changes from 0 to a value other than 0 so as to fill in the transitions from 0 to other than 0 and from 0 to 0.
An edge list whose end point is a point changing from other than 0 is created and sent to the output control unit 7. In both cases, in the case of a horizontal line, the above processing is not performed and the edge list is output.

【0024】図8、図9は、各塗り潰し方法による塗り
潰し結果の違いの説明図である。上述のように、塗り潰
し処理部6では、2つの方法によって塗り潰し処理を行
なうことができるが、各方法によって、図形が重なって
いる場合は塗り潰し処理の結果が相違する。図8はEO
FILLにより塗り潰し処理を行なった場合の結果であ
り、図9はNZWFILLにより塗り潰し処理を行なっ
た場合の結果である。このように、EOFILLでは、
重なった部分が白く抜けるが、NZWFILLでは、ベ
クターの方向によっては、塗り潰される。後述するが、
strokeベクターの場合には、NZWFILLを用
いて塗り潰し処理を行なうことにより、塗り潰し領域が
重なっている部分の白抜けを防止し、確実な塗り潰しを
実現している。
FIG. 8 and FIG. 9 are explanatory views of the difference in the filling result by each filling method. As described above, the filling processing unit 6 can perform the filling processing by two methods, but the results of the filling processing differ depending on the method when the figures overlap. Figure 8 is EO
FIG. 9 shows the result when the filling process was performed by FILL, and FIG. 9 shows the result when the filling process was performed by NZWFILL. Thus, with EOFILL,
The overlapped portion is white, but in NZWFILL, it is filled depending on the direction of the vector. As will be described later,
In the case of the stroke vector, by performing the filling process using NZWFILL, it is possible to prevent white spots in a portion where the filled regions overlap each other and to realize reliable filling.

【0025】出力制御部7では、塗り潰し処理部6から
送られてくるエッジリストを基に、これらをプレーンマ
ップに展開して出力装置部8に同期させて出力する。出
力装置部8では、プレーンマップに展開されたスキャン
ラインごとのデータを出力装置に出力する。
The output control section 7 develops these into a plane map based on the edge list sent from the painting processing section 6 and outputs them in synchronization with the output device section 8. The output device section 8 outputs the data for each scan line expanded on the plane map to the output device.

【0026】strokeコマンドの場合について説明
する。入力制御部1から曲線近似部5へ送られた各ベク
ターは、fillコマンドの時と同様に、図4に示した
手法により、曲線ベクターは直線ベクターで近似処理さ
れた後、アウトライン生成部4へ送られる。図6は、ア
ウトライン生成部の処理の説明図である。アウトライン
生成部4では、各直線ベクターの接続部分の処理を行な
う。上述のように、太い線を接続する場合には、図6に
示すように、接続した直線の外側部分に空白部ができて
しまう。そのため、この空白部を埋めるような処理を行
なう。
The case of the stroke command will be described. Each vector sent from the input control unit 1 to the curve approximating unit 5 is approximated to the curve vector by a straight line vector by the method shown in FIG. 4 as in the case of the fill command, and then to the outline generating unit 4. Sent. FIG. 6 is an explanatory diagram of processing of the outline generation unit. The outline generation unit 4 processes the connecting portion of each straight line vector. As described above, when connecting a thick line, a blank portion is formed on the outer side of the connected straight line as shown in FIG. Therefore, processing is performed to fill this blank portion.

【0027】図6では、直線ベクター(P0,P1)と
(P1,P2)を接続する場合を考える。それぞれの直
線ベクターは、線幅dを有するものとする。まず、直線
ベクター(P0,P1)について垂直方向に距離1/2
dにある点P0’,P0”,P01’,P01”を求め
る。また、直線ベクター(P1,P2)について垂直方
向に距離1/2dにある点P21’,P21”,P
2’,P2”を求める。この場合、接続点P1では、各
直線ベクターについて垂直方向にある点が2つずつ求め
られ、それらを区別するためにP01’,P01”,P
21’,P21”と表している。そして、各直線ベクタ
ーごとに、求めた各点を反時計方向になるように直線で
結び、長方形型のベクターを求める。すなわち、ベクタ
ー(P0’,P0”),(P0”,P01”),(P0
1”,P01’),(P01’,P0’)、および、ベ
クター(P21’,P21”),(P21”,P
2”),(P2”,P2’),(P2’,P21’)求
める。また、直線ベクター(P0,P1)と直線ベクタ
ー(P1,P2)の外積の符号を求める。この外積の符
号が負の場合には、P01’,P21’の側が、正の場
合にはP01”,P21”の側が空白部となっているこ
とを検知する。図6の例では、外積は負となり、P0
1’,P21’の側に空白部が存在することがわかる。
In FIG. 6, consider the case where the linear vectors (P0, P1) and (P1, P2) are connected. Each linear vector has a line width d. First, the distance of 1/2 in the vertical direction for the straight line vector (P0, P1)
The points P0 ′, P0 ″, P01 ′, P01 ″ at d are obtained. In addition, points P21 ′, P21 ″, P at a distance 1 / 2d in the vertical direction with respect to the straight line vector (P1, P2)
2 ′, P2 ″ is obtained. In this case, at the connection point P1, two points in the vertical direction are obtained for each straight line vector, and P01 ′, P01 ″, P are used to distinguish them.
21 ', P21 ". Then, for each straight line vector, the obtained points are connected by straight lines so as to be in a counterclockwise direction to obtain a rectangular vector. That is, the vector (P0', P0" ), (P0 ", P01"), (P0
1 ", P01 '), (P01', P0 '), and vectors (P21', P21"), (P21 ", P
2 "), (P2", P2 '), (P2', P21 '). Also, the sign of the outer product of the linear vector (P0, P1) and the linear vector (P1, P2) is obtained. When the sign of the cross product is negative, it is detected that the P01 ′ and P21 ′ sides are blank, and when the sign of the cross product is positive, the P01 ″ and P21 ″ sides are blank. In the example of FIG. 6, the outer product becomes negative, and P0
It can be seen that there is a blank part on the side of 1 ', P21'.

【0028】空白部の処理方法は、接続形状コマンドで
指定されたパラメータにより決定される。このバラメー
タはユーザが指定可能である。まず、接続形状として、
miterが指定されている場合には、直線P0’−P
01’の延長と、直線P2’−P21’の延長の交点P
Mを求める。そして、PM,P01’,P1’,P2
1’,PMを結ぶ四角形ベクターを生成する。接続形状
として、bevelが指定されている場合には、P0
1’,P1’,P21’,P01’の三角形ベクターを
生成する。接続形状として、roundが指定されてい
る場合には、直線P0’−P01’、直線P2’−P2
1’上に、それぞれBezier曲線の制御点となる点
PR0,PR1を求めて、P01’,P1’P21’を
結ぶベクターと、PR0,PR1を制御点とするP2
1’,P01’を結ぶベジエ曲線ベクターからなる略扇
形ベクターを生成する。この3種類の内、bevelの
場合が最も計算量も少なく、高速に処理することができ
る。
The processing method of the blank portion is determined by the parameter specified by the connection shape command. This parameter can be specified by the user. First, as the connection shape,
If miter is specified, the straight line P0'-P
The intersection point P of the extension of 01 'and the extension of the straight line P2'-P21'
Find M. And PM, P01 ', P1', P2
Generate a quadrangle vector connecting 1'and PM. If bevel is specified as the connection shape, P0
A triangular vector of 1 ', P1', P21 ', P01' is generated. When round is specified as the connection shape, straight line P0'-P01 ', straight line P2'-P2
The points PR0 and PR1 which are the control points of the Bezier curve are obtained on 1 ', and the vector connecting P01' and P1'P21 'and P2 having the control points PR0 and PR1.
A substantially fan-shaped vector composed of Bezier curve vectors connecting 1'and P01 'is generated. Among the three types, the case of bevel has the smallest calculation amount and can be processed at high speed.

【0029】図7は、接続点付近におけるベジエ曲線の
発生の説明図である。接続形状としてroundが指定
された場合に生成するベジエ曲線の制御点PR0,PR
1は、次のようにして求めることができる。図7では、
図6のように2本の直線が接続された場合について考え
る。また、簡単のために、円弧に近似した曲線を発生さ
せるものとする。図中、点Cは図6におけるP1に、点
q0,点q3はそれぞれ図6におけるP0’,P21’
に対応する。半径rは、直線の線幅の1/2dに対応す
る。さらに、∠q0,C,PMおよび∠q3,C,PM
をθとする。発生させたい円弧状のベジエ曲線と、直線
C−PMとの交点をq4とすれば、線分C−q4の長さ
は、rである。点q0と点q3を結ぶ直線と、点Cと点
PMを結ぶ直線の交点をq5とすれば、線分C−q5の
長さは、rcosθである。q4をベジエ曲線が通過す
るためには、q5−q4の4/3の位置に、直線PR0
−PR1と直線C−PMの交点q6を設ければよいの
で、線分q5−q6の長さは、 4/3r(1−cosθ) となる。一方、線分q0−q5の長さは、rsinθで
あるから、線分q0−PMの長さは、 (rsinθ)/cosθ である。これより、線分q5−PMの長さは、 ((rsinθ)/cosθ)sinθ=rsinθs
inθ/cosθ となる。点q6による線分q5−PMの分割比、すなわ
ち、 (線分q5−q6の長さ)/(線分q5−PM) をRとすれば、 R=(4/3)(1−cosθ)cosθ/sinθsinθ =4(1−cosθ)cosθ/3(1+cosθ)(1−cosθ) =4cosθ/3(1+cosθ) となり、線分q0−PMおよび線分q3−PMを割合R
で分割した点をPR0,PR1とすればよい。この例で
は、円弧に近似したベジエ曲線を発生させる例を示した
が、これに限らず、他の設定方法によりPR0,PR1
を設定し、曲線を発生させてもよい。また、制御点は2
点に限らず、1点または3点以上を用いるように構成し
てもよい。
FIG. 7 is an explanatory diagram of generation of a Bezier curve near the connection point. Control points PR0 and PR of the Bezier curve generated when round is specified as the connection shape
1 can be obtained as follows. In Figure 7,
Consider a case where two straight lines are connected as shown in FIG. Further, for the sake of simplicity, it is assumed that a curve similar to a circular arc is generated. In the figure, point C is P1 in FIG. 6, and points q0 and q3 are P0 ′ and P21 ′ in FIG. 6, respectively.
Corresponding to. The radius r corresponds to 1 / 2d of the line width of the straight line. Furthermore, ∠q0, C, PM and ∠q3, C, PM
Be θ. If the intersection point of the arc-shaped Bezier curve to be generated and the straight line C-PM is q4, the length of the line segment C-q4 is r. If the intersection of the straight line connecting the points q0 and q3 and the straight line connecting the points C and PM is q5, the length of the line segment C-q5 is rcos θ. In order for the Bezier curve to pass through q4, the straight line PR0 is placed at the position of 4/3 of q5-q4.
Since the intersection point q6 between -PR1 and the straight line C-PM may be provided, the length of the line segment q5-q6 is 4 / 3r (1-cos?). On the other hand, since the length of the line segment q0-q5 is rsinθ, the length of the line segment q0-PM is (rsinθ) / cosθ. From this, the length of the line segment q5-PM is ((rsin θ) / cos θ) sin θ = r sin θs
in θ / cos θ. If R is the division ratio of the line segment q5-PM by the point q6, that is, (length of line segment q5-q6) / (line segment q5-PM), R = (4/3) (1-cos θ) cos θ / sin θ sin θ = 4 (1-cos θ) cos θ / 3 (1 + cos θ) (1-cos θ) = 4 cos θ / 3 (1 + cos θ), and the line segment q0-PM and the line segment q3-PM are ratios R
The points divided by are set as PR0 and PR1. In this example, an example in which a Bezier curve that approximates an arc is generated is shown, but the present invention is not limited to this, and PR0, PR1 can be set by another setting method.
May be set to generate a curve. The control point is 2
The number of points is not limited to one, and three or more points may be used.

【0030】このようにしてアウトライン生成部4で生
成された直線のアウトラインのベクターは、fillベ
クターとして、ベクター記憶部3に格納される。その
後、曲線近似部5で処理を行ない、塗り潰し処理部6で
NZWFILLで塗り潰す。これらの処理は、fill
ベクターの時に説明した処理と同様に処理され、線幅内
が塗り潰された、太さのある線が出力されることとな
る。このとき、接続される直線の矩形ベクターが、図6
のP01”,P21”の側のように重なり合っていて
も、確実に塗り潰しを行なうことができる。
The vector of the linear outline generated by the outline generating unit 4 in this way is stored in the vector storage unit 3 as a fill vector. After that, the curve approximation unit 5 performs processing, and the filling processing unit 6 fills with NZWFILL. These processes are fill
The same processing as that described for the vector is performed, and a thick line with the line width filled in is output. At this time, the linear rectangular vector to be connected is shown in FIG.
Even if they overlap with each other like P01 ″ and P21 ″, it is possible to surely perform the filling.

【0031】[0031]

【発明の効果】以上の説明から明らかなように、本発明
によれば、直線や曲線に対応したベクターから太さを持
った線を描く場合でも、その接続点における隙間部分を
埋めた高品質の描画画像を、高速に得ることができると
いう効果がある。
As is apparent from the above description, according to the present invention, even when a line having a thickness is drawn from a vector corresponding to a straight line or a curved line, it is possible to obtain a high quality by filling the gap portion at the connection point. There is an effect that the drawn image of can be obtained at high speed.

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

【図1】 本発明の描画装置の一実施例を示すブロック
図である。
FIG. 1 is a block diagram showing an embodiment of a drawing apparatus of the present invention.

【図2】 描画パラメータコマンドの一例の説明図であ
る。
FIG. 2 is an explanatory diagram of an example of a drawing parameter command.

【図3】 ベクターコマンドデータの一例の説明図であ
る。
FIG. 3 is an explanatory diagram of an example of vector command data.

【図4】 ベジエ曲線を再帰的に直線に分割する処理の
説明図である。
FIG. 4 is an explanatory diagram of a process of recursively dividing a Bezier curve into straight lines.

【図5】 ベクターテーブルの説明図である。FIG. 5 is an explanatory diagram of a vector table.

【図6】 アウトライン生成部の処理の説明図である。FIG. 6 is an explanatory diagram of processing of an outline generation unit.

【図7】 接続点付近におけるベジエ曲線の発生の説明
図である。
FIG. 7 is an explanatory diagram of generation of a Bezier curve near a connection point.

【図8】〜[Figure 8]

【図9】 各塗り潰し方法による塗り潰し結果の違いの
説明図である。
FIG. 9 is an explanatory diagram of a difference in a filling result by each filling method.

【図10】 線の接続点付近の拡大図である。FIG. 10 is an enlarged view of the vicinity of a line connection point.

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

1 入力制御部、2 パラメータ記憶部、3 ベクター
記憶部、4 アウトライン生成部、5 曲線近似部、6
塗り潰し処理部、7 出力制御部、8 出力装置。
1 input control unit, 2 parameter storage unit, 3 vector storage unit, 4 outline generation unit, 5 curve approximation unit, 6
Fill processing unit, 7 output control unit, 8 output device.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 描画すべきデータをラスターデータに変
換し図形を描画する描画装置において、直線、曲線等か
らなる図形のベクターデータを受け取り、ベクターデー
タおよび線の太さ等の描画パラメータを用いて描画する
線の輪郭を示すアウトラインベクターを作成するととも
に、選択された接続形状のパラメータに基づき、線の接
続部に発生する隙間を埋める輪郭を示すアウトラインベ
クターを作成するアウトライン生成手段と、作成された
アウトラインベクターを基に非ゼロ巻数規則により塗り
潰し処理を行なう塗り潰し手段とを有することを特徴と
する描画装置。
1. A drawing apparatus which converts data to be drawn into raster data and draws a figure, receives vector data of a figure composed of straight lines, curves, etc., and uses the drawing parameters such as the vector data and line thickness. An outline vector is created, which creates an outline vector showing the outline of the line to be drawn, and also creates an outline vector showing the outline that fills the gaps that occur at the connecting parts of the line, based on the selected connection shape parameters. A drawing device comprising: a filling unit that performs a filling process according to a non-zero winding number rule based on an outline vector.
【請求項2】 請求項1に記載の描画装置において、曲
線のベクターデータを複数の直線ベクターに分割して近
似する曲線近似手段をさらに有し、近似した直線ベクタ
ーを用いてアウトライン生成手段により直線ベクターお
よび接続部のアウトラインベクターの作成を行なうこと
を特徴とする描画装置。
2. The drawing apparatus according to claim 1, further comprising a curve approximation means for approximating by dividing the vector data of the curve into a plurality of straight line vectors, and using the approximated straight line vector to draw a straight line by the outline generating means. A drawing device for creating an outline vector of a vector and a connecting portion.
【請求項3】 請求項1または2に記載の描画装置にお
いて、アウトライン生成手段における線の接続部の輪郭
を示すアウトラインベクターの作成は、接続する2つの
線の外積の符号により決定された領域に対して行なうこ
とを特徴とする描画装置。
3. The drawing apparatus according to claim 1, wherein the outline vector indicating the outline of the connecting portion of the lines in the outline generating means is created in an area determined by the sign of the cross product of the two connecting lines. A drawing device characterized by performing the same.
【請求項4】 請求項1または2または3に記載の描画
装置において、塗り潰し手段は、アウトラインベクター
を受け取り、該アウトラインベクターよりエッジリスト
を作成し、このエッジリストを用いて非ゼロ巻数規則に
より塗りつぶし処理を行なうことを特徴とする描画装
置。
4. The drawing apparatus according to claim 1, wherein the filling means receives the outline vector, creates an edge list from the outline vector, and uses the edge list to fill by a non-zero winding number rule. A drawing device characterized by performing processing.
JP34349792A 1992-11-30 1992-11-30 Drawing equipment Expired - Fee Related JP3060761B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34349792A JP3060761B2 (en) 1992-11-30 1992-11-30 Drawing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34349792A JP3060761B2 (en) 1992-11-30 1992-11-30 Drawing equipment

Publications (2)

Publication Number Publication Date
JPH06168339A true JPH06168339A (en) 1994-06-14
JP3060761B2 JP3060761B2 (en) 2000-07-10

Family

ID=18361975

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34349792A Expired - Fee Related JP3060761B2 (en) 1992-11-30 1992-11-30 Drawing equipment

Country Status (1)

Country Link
JP (1) JP3060761B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005586A (en) * 1996-02-17 1999-12-21 Fuji Xerox Co., Ltd. Drawing processing apparatus
JP2010009277A (en) * 2008-06-26 2010-01-14 Celsys:Kk Coloring method and program for line drawing
US7821514B2 (en) 2006-05-11 2010-10-26 Kabushiki Kaisha Toshiba Image processing apparatus, image processing method, and image processing program
WO2010131689A1 (en) * 2009-05-15 2010-11-18 Ricoh Company, Ltd. Information processing apparatus, laser radiation device, render information generating method, control system, program, recording medium, and render information storage device
US8237717B2 (en) 2007-06-27 2012-08-07 Nec System Technologies, Ltd. Vector image drawing device, method for vector image drawing, and computer readable recording medium
US8847981B2 (en) 2004-11-02 2014-09-30 Samsung Electronics Co., Ltd. Method and apparatus for accumulative vector drawing using buffering
JP2015087809A (en) * 2013-10-28 2015-05-07 キヤノン株式会社 Plotting device, method, and program
US9202148B2 (en) 2013-08-27 2015-12-01 Canon Kabushiki Kaisha Image processing apparatus and method for generating stencil data of a stroke based on shape information, connection-point information, and end-point information

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6005586A (en) * 1996-02-17 1999-12-21 Fuji Xerox Co., Ltd. Drawing processing apparatus
US8847981B2 (en) 2004-11-02 2014-09-30 Samsung Electronics Co., Ltd. Method and apparatus for accumulative vector drawing using buffering
US7821514B2 (en) 2006-05-11 2010-10-26 Kabushiki Kaisha Toshiba Image processing apparatus, image processing method, and image processing program
US8237717B2 (en) 2007-06-27 2012-08-07 Nec System Technologies, Ltd. Vector image drawing device, method for vector image drawing, and computer readable recording medium
JP2010009277A (en) * 2008-06-26 2010-01-14 Celsys:Kk Coloring method and program for line drawing
WO2010131689A1 (en) * 2009-05-15 2010-11-18 Ricoh Company, Ltd. Information processing apparatus, laser radiation device, render information generating method, control system, program, recording medium, and render information storage device
CN102421603A (en) * 2009-05-15 2012-04-18 株式会社理光 Information processing apparatus, laser radiation device, render information generating method, control system, program, recording medium, and render information storage device
US8581948B2 (en) 2009-05-15 2013-11-12 Ricoh Company, Ltd. Information processing apparatus, laser radiation device, render information generating method, control system, recording medium, and render information storage device
KR101396638B1 (en) * 2009-05-15 2014-05-19 가부시키가이샤 리코 Information processing apparatus, laser radiation device, render information generating method, control system, recording medium, and render information storage device
US9202148B2 (en) 2013-08-27 2015-12-01 Canon Kabushiki Kaisha Image processing apparatus and method for generating stencil data of a stroke based on shape information, connection-point information, and end-point information
JP2015087809A (en) * 2013-10-28 2015-05-07 キヤノン株式会社 Plotting device, method, and program

Also Published As

Publication number Publication date
JP3060761B2 (en) 2000-07-10

Similar Documents

Publication Publication Date Title
JPH06168339A (en) Plotting device
JP3547250B2 (en) Drawing method
JPH07105394A (en) Method, system and device for painting out polygon
JPH08272984A (en) Description method of pixel position
KR0147440B1 (en) Method and system for drawing lines of width
JPH0350686A (en) Graphic processing system
JP2002056395A (en) Pattern plotting device
JPH02245886A (en) Pattern plotting method, pattern processor and pattern processing system using the same processor
JP3485055B2 (en) Trapezoidal drawing method and trapezoidal drawing device
JPH10198811A (en) Line segment approximating method for tertiary bezier curve
JPH0280267A (en) Processing of system of vector characters
JPH0259871A (en) Image processor
JP2002208028A (en) Geometry clipping device for polygon
JP2782904B2 (en) Polygon fill method
JP3089906B2 (en) Drawing equipment
JPH0896148A (en) Graphic plotting device
JPH0721397A (en) Paint-out plotting method for polygon
JPS62285188A (en) Display method for segment
JP2002073001A (en) Quadrangle plotting method and apparatus
JP2007286942A (en) Method for generating drawing data and data processor
JP2000067254A (en) Graphic painting-out device
JPH10154237A (en) Graphic processor and graphic processing method
JPS61267096A (en) Smear drawing display unit for polygonal graphic
JP2000348190A (en) Picture processor
JPS62235690A (en) Painting method for graphic

Legal Events

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

Free format text: PAYMENT UNTIL: 20080428

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090428

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110428

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees