JP3496381B2 - Line drawing device - Google Patents

Line drawing device

Info

Publication number
JP3496381B2
JP3496381B2 JP1732696A JP1732696A JP3496381B2 JP 3496381 B2 JP3496381 B2 JP 3496381B2 JP 1732696 A JP1732696 A JP 1732696A JP 1732696 A JP1732696 A JP 1732696A JP 3496381 B2 JP3496381 B2 JP 3496381B2
Authority
JP
Japan
Prior art keywords
unit
line
holding unit
data
holding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP1732696A
Other languages
Japanese (ja)
Other versions
JPH09212665A (en
Inventor
一憲 宋
深二郎 稲畑
豊 植田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP1732696A priority Critical patent/JP3496381B2/en
Publication of JPH09212665A publication Critical patent/JPH09212665A/en
Application granted granted Critical
Publication of JP3496381B2 publication Critical patent/JP3496381B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プリンタ装置やプ
ロッター装置等を用いて線分を描画したり、CAD(C
omputer Aided Design)システム
やコンピュータグラフィックス等において線分を描画す
る線分描画装置に関するものであり、特に、太線の描画
に用いて好適な線分描画装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention draws a line segment using a printer device, a plotter device, or the like, and CAD (C
The present invention relates to a line segment drawing device that draws a line segment in an computer aided design) system, computer graphics, and the like, and particularly to a line segment drawing device that is suitable for drawing thick lines.

【0002】[0002]

【従来の技術】図23は、従来の線分描画方法の一例の
説明図である。まず、図23(A)に示す線分描画方法
は、目的の線幅を直径とする円形の画素パターンを線分
の始点から終点まで公知のDDA(Digital D
ifferential Analyzer:ディジタ
ル微分解析機)アルゴリズムに基づいて重ね合わせて描
画する。また、例えば、平4−23179号公報に記載
されているように、始点において円形の画素パターンが
描画された後は、円形の画素パターンに基づく矩形パタ
ーンを用いて複数回アクセスされる画素数を低減させる
方法も提案されている。次に、図23(B)に示す線分
描画方法では、公知のDDAアルゴリズムによって線幅
1画素の直線は高速に発生することができるため、この
直線を数本重ねることによって所望の線幅の線分を描画
する。この方法は、例えば、特開平5−233821号
公報等に記載されている。さらに、図23(C)に示す
線分描画方法は、描画したい太線の輪郭線を予め描画し
て、その後一般的な塗りつぶし処理を用いて線分を描画
する。この方法は、例えば、特開平4−205575号
公報、特開平5−67215号公報、特開平4−779
77号公報等に記載されている。また、特願平7−82
432号に記載されているように、法線方向に線幅分の
線分をを生成し、この線分を重ねることによって線分を
描画する方法も開発した。
2. Description of the Related Art FIG. 23 is an explanatory diagram of an example of a conventional line segment drawing method. First, according to the line segment drawing method shown in FIG. 23A, a circular pixel pattern having a diameter of a target line width is used as a known DDA (Digital D) from the start point to the end point of the line segment.
The image is overlaid and drawn based on an differential analyzer (digital differential analyzer) algorithm. Further, for example, as described in Japanese Patent Application Laid-Open No. 4-23179, after the circular pixel pattern is drawn at the starting point, the number of pixels to be accessed multiple times using a rectangular pattern based on the circular pixel pattern is set. A method of reducing the amount is also proposed. Next, in the line segment drawing method shown in FIG. 23 (B), a straight line having a line width of 1 pixel can be generated at high speed by a known DDA algorithm. Draw a line segment. This method is described, for example, in JP-A-5-233821. Further, in the line segment drawing method shown in FIG. 23C, the outline of the thick line to be drawn is drawn in advance, and then the line segment is drawn by using a general filling process. This method is disclosed in, for example, JP-A-4-205575, JP-A-5-67215, and JP-A-4-779.
No. 77, etc. Also, Japanese Patent Application No. 7-82
As described in No. 432, a method has also been developed in which a line segment for a line width is generated in the normal direction and the line segment is drawn by overlapping the line segments.

【0003】ところで、例えば、フレームメモリがバイ
ト構成やワード構成であり、1バイト、1ワードに複数
の画素を割り当てている場合、1画素分のデータをフレ
ームメモリに書き込む際には、ワード境界やバイト境界
のアライメント処理が必要となり、書き込み速度が低下
する。さらに、発生した複数の描画画素が同一のワード
やバイトに存在する場合でも、順次書き込むためにその
たびにアクセスが発生することとなり、処理速度はさら
に低下することとなる。そのため、直線を描画する際に
は、直接フレームメモリに書き込まずに、一度バッファ
に書き込んでからフレームメモリへ転送する方法が一般
的に採用されている。さらに、バッファからフレームメ
モリへの転送を効率よく行なうことによって、フレーム
メモリに直線が描画されるまでに要する時間を短縮する
ことが望まれている。
By the way, for example, when the frame memory has a byte structure or a word structure and a plurality of pixels are assigned to one byte and one word, when writing data for one pixel into the frame memory, word boundaries and Byte boundary alignment processing is required, and the writing speed decreases. Further, even if a plurality of generated drawing pixels are present in the same word or byte, access is generated each time because of sequential writing, and the processing speed is further reduced. Therefore, when drawing a straight line, a method of writing in a buffer once and then transferring to a frame memory is generally adopted, instead of directly writing in the frame memory. Further, it is desired to reduce the time required for drawing a straight line in the frame memory by efficiently performing the transfer from the buffer to the frame memory.

【0004】しかし、任意の方向に任意の線幅で発生し
た直線全体をバッファに一時的に記憶させるためには、
バッファとして膨大なメモリ容量が必要となるという問
題がある。特に、図23(C)に示すような塗りつぶし
処理を行なう方法では、輪郭線の座標をすべて保持して
からでないと塗りつぶし処理を行なえないため、大容量
のバッファは必須である。例えば、上述の特開平5−6
7215号公報では、直線画像記憶部を設け、この直線
画像記憶部に発生した直線を一時記憶し、二値画像記憶
部に転送しているが、直線画像記憶部は大容量とならざ
るを得ない。
However, in order to temporarily store the entire straight line generated with an arbitrary line width in an arbitrary direction in a buffer,
There is a problem that a huge memory capacity is required as a buffer. In particular, in the method of performing the filling process as shown in FIG. 23C, the filling process cannot be performed until all the coordinates of the contour line are held, and thus a large capacity buffer is essential. For example, the above-mentioned JP-A-5-6
In Japanese Patent No. 7215, a straight line image storage unit is provided, and a straight line generated in this straight line image storage unit is temporarily stored and transferred to the binary image storage unit. However, the straight line image storage unit must have a large capacity. Absent.

【0005】[0005]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、少ないバッファを用い、効
率よくフレームメモリに転送し、描画処理速度を向上さ
せた線分描画装置を提供することを目的とするものであ
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and provides a line segment drawing apparatus which uses a small number of buffers, efficiently transfers the data to a frame memory, and improves the drawing processing speed. The purpose is to do.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の発明
は、線分描画装置において、入力された情報から描画す
る線分の始点および終点と該線分の線幅とを出力する初
期値設定手段と、該初期値設定手段から出力された始点
と終点とを結ぶ直線上の座標を生成する基準線発生手段
と、該基準線発生手段で生成された座標と前記始点との
間の距離を演算する距離演算手段と、該距離演算手段で
の演算結果と前記基準線発生手段で生成した座標とを基
に前記始点と終点とを結ぶ直線に直交しかつ前記初期値
設定手段から出力された線分の線幅と等しい長さを有す
る画素列を生成する法線ベクトル生成手段と、前記基準
線発生手段で生成された座標ごとに前記法線ベクトル生
成手段で生成された画素列を発生させる描画手段と、該
描画手段によって発生した画素列を一時保持するための
複数の保持部を有するデータ保持手段と、描画された画
像を格納するフレームメモリと、前記保持部が対応する
前記フレームメモリ上の位置を演算する保持部座標演算
手段と、前記描画手段によって得られた画素列の座標と
前記保持部座標演算手段による前記保持部の位置情報か
ら前記保持部を設定または選択する保持部制御手段と、
データを格納し終えた前記保持部から前記フレームメモ
リに順に転送するデータ転送手段と、該データ転送手段
によって転送し終えた前記保持部をクリアするデータ保
持部初期化手段を有することを特徴とするものである。
According to a first aspect of the present invention, in a line segment drawing device, an initial value for outputting a start point and an end point of a line segment drawn from input information and a line width of the line segment. Setting means, reference line generating means for generating coordinates on a straight line connecting the start point and the end point output from the initial value setting means, and a distance between the coordinates generated by the reference line generating means and the starting point Based on the calculation result of the distance calculation means and the coordinates generated by the reference line generation means, and is orthogonal to a straight line connecting the start point and the end point and is output from the initial value setting means. And a normal vector generation means for generating a pixel row having a length equal to the line width of the line segment, and a pixel row generated by the normal vector generation means for each coordinate generated by the reference line generation means. And a drawing means for Data holding means having a plurality of holding portions for temporarily holding the formed pixel row, a frame memory for storing the drawn image, and a holding portion coordinate calculation for calculating the corresponding position on the frame memory by the holding portion. Means, holding section control means for setting or selecting the holding section from coordinates of the pixel column obtained by the drawing section and position information of the holding section by the holding section coordinate calculation means,
It is characterized by further comprising data transfer means for sequentially transferring the data from the holding unit after storing the data to the frame memory, and data holding unit initialization means for clearing the holding unit after the data is transferred by the data transferring unit. It is a thing.

【0007】請求項2に記載の発明は、請求項1に記載
の線分描画装置において、前記フレームメモリは1ワー
ドに複数画素を格納するように構成されており、前記保
持部は前記フレームメモリのワード境界に基づいてその
位置が設定され、前記データ転送手段はワードごとに転
送を行なうことを特徴とするものである。
According to a second aspect of the present invention, in the line segment drawing apparatus according to the first aspect, the frame memory is configured to store a plurality of pixels in one word, and the holding unit is the frame memory. The position is set on the basis of the word boundary of, and the data transfer means performs the transfer for each word.

【0008】請求項3に記載の発明は、線分描画装置に
おいて、入力された情報から描画する線分の始点および
終点と該線分の線幅とを出力する初期値設定手段と、該
初期値設定手段から出力された始点と終点とを結ぶ直線
上の座標を生成する基準線発生手段と、該基準線発生手
段で生成された座標と前記始点との間の距離を演算する
距離演算手段と、該距離演算手段での演算結果と前記基
準線発生手段で生成した座標とを基に前記始点と終点と
を結ぶ直線に直交しかつ前記初期値設定手段から出力さ
れた線分の線幅と等しい長さを有する画素列を生成する
法線ベクトル生成手段と、前記基準線発生手段で生成さ
れた座標ごとに前記法線ベクトル生成手段で生成された
画素列を発生させる描画手段と、該描画手段によって発
生した画素列を一時格納するデータ保持手段と、描画さ
れた画像を格納するフレームメモリと、前記データ保持
手段が対応する前記フレームメモリ上の位置を演算する
保持部座標演算手段と、新たに描画しようとする画素列
の座標とすでに前記データ保持手段に格納している画素
列の座標を比較及び修正して新たに描画しようとする画
素列と等しくさせる描画画素修正手段と、前記描画手段
で発生した画素列に基づいて前記データ保持手段へのデ
ータの格納または格納データの修正の終了判定を行なう
保持部制御手段と、前記データ保持手段に格納または修
正し終えたデータを前記フレームメモリに転送するデー
タ転送手段を有することを特徴とするものである。
According to a third aspect of the present invention, in the line segment drawing device, an initial value setting means for outputting a start point and an end point of the line segment to be drawn from the input information and a line width of the line segment, and the initial value setting means. Reference line generating means for generating coordinates on a straight line connecting the start point and the end point output from the value setting means, and distance calculating means for calculating the distance between the coordinates generated by the reference line generating means and the start point. And a line width of a line segment that is orthogonal to a straight line connecting the start point and the end point based on the calculation result of the distance calculation means and the coordinates generated by the reference line generation means and that is output from the initial value setting means. A normal vector generating means for generating a pixel row having a length equal to, a drawing means for generating a pixel row generated by the normal vector generating means for each coordinate generated by the reference line generating means, The pixel row generated by the drawing means A data holding means for storing, a frame memory for storing the drawn image, a holding unit coordinate calculating means for calculating a position on the frame memory corresponding to the data holding means, and a pixel row to be newly drawn. On the basis of the drawing pixel correction means for comparing and correcting the coordinates and the coordinates of the pixel row already stored in the data holding means to make it equal to the pixel row to be newly drawn, and the pixel row generated by the drawing means. A holding unit control unit that determines whether to end the storage of the data in the data holding unit or the correction of the stored data, and a data transfer unit that transfers the data stored or modified in the data holding unit to the frame memory. It is characterized by.

【0009】[0009]

【発明の実施の形態】図1は、本発明の線分描画装置の
第1の実施の形態を示すブロック図である。図中、1は
初期値認識部、2は基準線走査部、3は距離演算部、4
は法線ベクトル生成部、5は線分描画部、6は演算デー
タ転送部、7はフレームメモリ、11は保持部制御部、
12はデータ保持部、13は保持部座標演算部、14は
データ転送部、15はデータ保持部初期化部である。
1 is a block diagram showing a first embodiment of a line segment drawing apparatus of the present invention. In the figure, 1 is an initial value recognition unit, 2 is a reference line scanning unit, 3 is a distance calculation unit, 4
Is a normal vector generation unit, 5 is a line segment drawing unit, 6 is a calculation data transfer unit, 7 is a frame memory, 11 is a holding unit control unit,
Reference numeral 12 is a data holding unit, 13 is a holding unit coordinate calculation unit, 14 is a data transfer unit, and 15 is a data holding unit initialization unit.

【0010】初期値認識部1は、入力された情報から描
画する線分の始点及び終点とこの線分の線幅とを認識す
る。基準線走査部2は、初期値認識部1で認識された始
点と終点とを結ぶ直線上にある座標を生成する。距離演
算部3は、基準線走査部2で生成された座標と始点との
間の距離を演算する。法線ベクトル生成部4は、距離演
算部3での演算結果と基準線走査部2で生成された座標
とを基に、始点と終点とを結ぶ直線に直交し、かつ初期
値認識部1で認識された線分の線幅と等しい長さを有す
る画素列を生成する。線分描画部5は、法線ベクトル生
成部4で生成された画素列を基準線走査部2で生成され
た座標毎に発生させる。描画データ転送部6は、線分描
画部5からの描画データを一時的に保持して効率的にフ
レームメモリ7へ転送する。フレームメモリ7には、描
画された画像が展開される。
The initial value recognition unit 1 recognizes the starting point and the ending point of a line segment to be drawn and the line width of this line segment from the input information. The reference line scanning unit 2 generates coordinates on the straight line connecting the start point and the end point recognized by the initial value recognition unit 1. The distance calculation unit 3 calculates the distance between the coordinates generated by the reference line scanning unit 2 and the start point. The normal vector generation unit 4 is orthogonal to the straight line connecting the start point and the end point based on the calculation result of the distance calculation unit 3 and the coordinates generated by the reference line scanning unit 2, and the initial value recognition unit 1 A pixel column having a length equal to the line width of the recognized line segment is generated. The line segment drawing unit 5 causes the pixel array generated by the normal vector generation unit 4 to be generated for each coordinate generated by the reference line scanning unit 2. The drawing data transfer unit 6 temporarily holds the drawing data from the line segment drawing unit 5 and efficiently transfers it to the frame memory 7. The drawn image is developed in the frame memory 7.

【0011】描画データ転送部6は、保持部制御部1
1、データ保持部12、保持部座標演算部13、データ
転送部14、データ保持部初期化部15を有している。
保持部制御部11は、データ保持部12内部の保持部を
線分描画部5で演算された描画座標を含むフレームメモ
リ7上の領域に設定して、フレームメモリ7に描画する
代わりにこのデータ保持部12内に描画させ、設定され
ている保持部にこれ以上描画されないと判断した場合
は、その保持部内のデータとフレームメモリ7上での座
標を表わすオフセット値をデータ転送部14へ渡す。
The drawing data transfer unit 6 includes a holding unit control unit 1.
1, a data holding unit 12, a holding unit coordinate calculation unit 13, a data transfer unit 14, and a data holding unit initialization unit 15.
The holding unit control unit 11 sets the holding unit inside the data holding unit 12 to an area on the frame memory 7 that includes the drawing coordinates calculated by the line segment drawing unit 5, and instead of drawing in the frame memory 7, this data is stored. When it is determined that the data is to be drawn in the holding unit 12 and no more is drawn in the set holding unit, the data in the holding unit and the offset value indicating the coordinates on the frame memory 7 are passed to the data transfer unit 14.

【0012】データ保持部12は、フレームメモリ7へ
の転送単位に応じた大きさの小領域のデータを保持する
複数の保持部を有している。例えば、フレームメモリ7
が1つのアドレスに対応する1ワードや1バイトのデー
タ単位で読み書きされるいわゆるワード構成、バイト構
成のメモリの場合、このワード長、バイト長の整数倍の
レジスタを幾つか集めて1ブロックとして1つの保持部
とし、この保持部を4つ以上集めて構成することができ
る。図1では4つの保持部を示している。
The data holding unit 12 has a plurality of holding units for holding data in a small area having a size corresponding to a transfer unit to the frame memory 7. For example, the frame memory 7
In the case of a so-called word-structured or byte-structured memory in which 1 word or 1 byte of data corresponding to one address is read and written, several registers each having an integer multiple of this word length and byte length are collected to form one block as one block. It is possible to configure one holding unit and collect four or more holding units. In FIG. 1, four holding parts are shown.

【0013】保持部座標演算部13は、データ保持部1
2中の保持部のいずれかが描画座標を必ず含むように、
また互いが重ならないように、フレームメモリ7上での
保持部の位置を演算する。例えば、フレームメモリ7が
ワード構成やバイト構成のメモリの場合には、1ワード
単位の区切り(ワード境界)や1バイト単位の区切り
(バイト境界)に合わせて保持部の位置を設定する。
The holding unit coordinate calculation unit 13 is a data holding unit 1.
Make sure that one of the holding parts in 2 always includes drawing coordinates,
Further, the position of the holding unit on the frame memory 7 is calculated so as not to overlap each other. For example, when the frame memory 7 is a memory having a word structure or a byte structure, the position of the holding unit is set in accordance with a 1-word unit delimiter (word boundary) or a 1-byte unit delimiter (byte boundary).

【0014】データ転送部14は、保持部制御部11が
指定したデータ保持部12内部の保持部に描画されたデ
ータを、保持部制御部11から渡される保持部のフレー
ムメモリ7上でのオフセット値に基づいてフレームメモ
リ7へ転送する。
The data transfer unit 14 offsets the data drawn in the holding unit inside the data holding unit 12 specified by the holding unit control unit 11 from the holding unit passed from the holding unit control unit 11 on the frame memory 7. Transfer to the frame memory 7 based on the value.

【0015】データ保持部初期化部15は、データ保持
部12内部の保持部に描画された全データが転送された
後に、その保持部内を初期化する。
The data holding unit initialization unit 15 initializes the inside of the holding unit after all the drawn data is transferred to the holding unit inside the data holding unit 12.

【0016】図2は、本発明の線分描画装置の第1の実
施の形態における基準線走査部2、距離演算部3、法線
ベクトル生成部4、線分描画部5の具体例を示すブロッ
ク図である。図中、図1と対応する部分には同じ符号を
付してある。21は座標発生部、22は走査座標格納
部、23は移動距離演算部、24は線幅走査判定部、2
5は90゜回転部、26は法線ベクトル格納部、27は
基準線移動処理部、28は画素抜け判定部、29は描画
部、30は終了条件判定部である。
FIG. 2 shows a concrete example of the reference line scanning unit 2, the distance calculation unit 3, the normal vector generation unit 4, and the line segment drawing unit 5 in the first embodiment of the line segment drawing apparatus of the present invention. It is a block diagram. In the figure, parts corresponding to those in FIG. 1 are designated by the same reference numerals. Reference numeral 21 is a coordinate generation unit, 22 is a scanning coordinate storage unit, 23 is a movement distance calculation unit, 24 is a line width scanning determination unit, 2
5 is a 90 ° rotation unit, 26 is a normal vector storage unit, 27 is a reference line movement processing unit, 28 is a pixel omission determination unit, 29 is a drawing unit, and 30 is an end condition determination unit.

【0017】基準線走査部2は、座標発生部21、走査
座標格納部22を有する。座標発生部21は、初期値認
識部1が設定した初期値に基づいて始点から終点までの
直線上の点の座標を発生する。座標発生部21は、例え
ばDDAによって構成することができる。発生した座標
は走査座標格納部22に格納されるとともに、移動距離
演算部23へ渡される。走査座標格納部22に格納され
た座標で構成される線を以下基準線と呼ぶことにする。
The reference line scanning section 2 has a coordinate generating section 21 and a scanning coordinate storing section 22. The coordinate generator 21 generates the coordinates of a point on the straight line from the start point to the end point based on the initial value set by the initial value recognition unit 1. The coordinate generation unit 21 can be configured by DDA, for example. The generated coordinates are stored in the scanning coordinate storage unit 22 and passed to the movement distance calculation unit 23. The line formed by the coordinates stored in the scanning coordinate storage unit 22 will be referred to as a reference line below.

【0018】距離演算部3は、移動距離演算部23、線
幅走査判定部24を有する。移動距離演算部23は、始
点から座標発生部21で発生した画素までの移動距離を
演算し、演算結果が線幅走査判定部24に渡される。線
幅走査判定部24は、移動距離演算部23が演算した移
動距離が、初期値認識部1が認識した線幅を上回るかま
たは両者が等しいか否かを判断し、座標発生部21によ
る座標の発生を中断させる。これにより、線幅分の座標
が生成されたところで中断される。
The distance calculating section 3 has a moving distance calculating section 23 and a line width scanning determining section 24. The movement distance calculation unit 23 calculates the movement distance from the start point to the pixel generated in the coordinate generation unit 21, and the calculation result is passed to the line width scanning determination unit 24. The line width scanning determination unit 24 determines whether the movement distance calculated by the movement distance calculation unit 23 exceeds the line width recognized by the initial value recognition unit 1 or both are equal, and the coordinates generated by the coordinate generation unit 21 are coordinated. Interrupt the occurrence of. As a result, the process is interrupted when the line width coordinates are generated.

【0019】法線ベクトル生成部4は、90゜回転部2
5、法線ベクトル格納部26を有している。90°回転
部25は、走査座標格納部22に格納された座標をもと
に、始点を中心として時計方向へ90°回転した座標を
作り出し、それらを法線ベクトル情報として法線ベクト
ル格納部26へ格納する。ただし、90゜回転部25
は、線幅走査判定部24で判定された座標と始点との間
にある座標だけを回転させ、線幅分の法線方向の線分
(以下、法線ベクトルと呼ぶ)を発生させる。
The normal vector generating unit 4 includes a 90 ° rotating unit 2
5. It has a normal vector storage unit 26. The 90 ° rotation unit 25 creates coordinates that are rotated 90 ° clockwise around the start point based on the coordinates stored in the scanning coordinate storage unit 22, and uses them as normal vector information to store the normal vector storage unit 26. Store to. However, the 90 ° rotating part 25
Rotates only the coordinates between the coordinates determined by the line width scanning determination unit 24 and the start point to generate a line segment in the normal direction of the line width (hereinafter referred to as a normal vector).

【0020】線分描画部5は、基準線移動処理部27、
画素抜け判定部28、描画部29、終了条件判定部30
を有する。基準線移動処理部27は、描画部29が基準
線上の座標に法線ベクトルを発生させる際に、この法線
ベクトルを基準線上の座標に対してどの位置に発生させ
るかを設定する。すなわち、基準線移動処理部27は、
法線ベクトル格納部26に格納されている法線ベクトル
を、例えば、基準線の始点から終点に向かう方向に対し
て基準線の右側か左側かまたは両側に振り分けて発生さ
せるかを設定する。基準線の各点における振り分け量を
適宜変化させることによって、波線や鋸歯状の線を描画
することも可能である。また、法線ベクトルの画素を適
宜抜くことによって、二重線などのn重線や白抜き線な
どを描画することもできる。
The line segment drawing section 5 includes a reference line movement processing section 27,
Pixel missing determination unit 28, drawing unit 29, end condition determination unit 30
Have. When the drawing unit 29 generates a normal vector at the coordinates on the reference line, the reference line movement processing unit 27 sets a position at which the normal vector is generated with respect to the coordinates on the reference line. That is, the reference line movement processing unit 27
For example, it is set whether the normal vector stored in the normal vector storage unit 26 is generated on the right side, the left side, or both sides of the reference line with respect to the direction from the starting point to the ending point of the reference line. It is also possible to draw a wavy line or a sawtooth line by appropriately changing the distribution amount at each point of the reference line. Further, it is possible to draw an n-fold line such as a double line or an outline line by appropriately extracting pixels of the normal vector.

【0021】画素抜け判定部28は、画素抜けの有無を
判定し、画素抜けの位置を描画部29に知らせる。画素
抜けは、基準線上の画素のy座標が変わるとき、法線ベ
クトルを構成する隣り合う画素がななめの位置にある部
分で発生する。画素抜け判定部28ではこれを検出し
て、画素抜けを判定すればよい。
The pixel omission determination unit 28 determines the presence or absence of pixel omission and notifies the drawing unit 29 of the position of pixel omission. Pixel omission occurs in a portion where adjacent pixels forming a normal vector are at a licked position when the y coordinate of the pixel on the reference line changes. The pixel omission determination unit 28 may detect this and determine the pixel omission.

【0022】描画部29は、基準線移動処理部27によ
る移動量に従って、法線ベクトル格納部26に格納され
ている法線ベクトルに基づいて、走査座標格納部22中
の座標ごとに法線方向に描画する。また、画素抜け判定
部28で画素抜けを判定したとき、抜けた画素の修復も
行なう。
The drawing unit 29 determines the normal direction for each coordinate in the scanning coordinate storage unit 22 based on the normal vector stored in the normal vector storage unit 26 according to the movement amount by the reference line movement processing unit 27. Draw on. Further, when the pixel omission determination unit 28 determines pixel omission, the missing pixel is also repaired.

【0023】終了条件判定部30は、座標発生部21で
発生した座標が終点となる条件を判定し、処理を終わら
せる。
The end condition judging unit 30 judges the condition that the coordinate generated by the coordinate generating unit 21 becomes the end point, and terminates the process.

【0024】次に、上述の線分描画装置の第1の実施の
形態における動作の一例について説明する。図3は、本
発明の線分描画装置の第1の実施の形態における基本的
な線分描画動作の説明図である。線分を描画する際に
は、まず初期値認識部1によって描画しようとする線分
の始点及び終点とその線幅が認識される。続いて、基準
線走査部2では、初期値認識部1で認識された始点と終
点とを結ぶ直線上にある座標を、前記始点から順に生成
する。例えば、図3(A)に黒丸で示す点の座標を順に
生成する。このとき、距離演算部3では、基準線走査部
2で生成された座標と始点との間の距離を演算により求
める。
Next, an example of the operation of the above-described line segment drawing apparatus in the first embodiment will be described. FIG. 3 is an explanatory diagram of a basic line segment drawing operation in the first embodiment of the line segment drawing apparatus of the present invention. When drawing a line segment, the initial value recognition unit 1 first recognizes the start point and end point of the line segment to be drawn and the line width thereof. Subsequently, the reference line scanning unit 2 sequentially generates coordinates on the straight line connecting the starting point and the ending point recognized by the initial value recognizing unit 1 from the starting point. For example, the coordinates of points indicated by black circles in FIG. 3A are sequentially generated. At this time, the distance calculation unit 3 calculates the distance between the coordinates generated by the reference line scanning unit 2 and the starting point.

【0025】そして、距離演算部3による演算結果と、
初期値認識部1で認識された線幅とが等しくなる座標ま
で基準線走査部2が座標を生成すると、法線ベクトル生
成部4では、例えば、その座標と始点との間で生成され
た全ての座標を90°回転させ、回転後の座標上に線分
の描画に必要な線幅方向の画素を発生させる。つまり、
法線ベクトル生成部4では、図3(B)に示すように、
初期値認識部1で認識された始点と終点とを結ぶ直線に
直交し、かつ線分の線幅と等しい長さを有する画素列を
生成する。
Then, the calculation result by the distance calculation unit 3 and
When the reference line scanning unit 2 generates the coordinates up to the coordinates at which the line width recognized by the initial value recognition unit 1 becomes equal, the normal vector generation unit 4 calculates all the coordinates generated between the coordinates and the start point. The coordinate of is rotated by 90 °, and pixels in the line width direction necessary for drawing the line segment are generated on the rotated coordinate. That is,
In the normal vector generation unit 4, as shown in FIG.
A pixel row that is orthogonal to the straight line connecting the start point and the end point recognized by the initial value recognition unit 1 and has a length equal to the line width of the line segment is generated.

【0026】法線ベクトル生成部4で画素列が生成され
ると、線分描画部5では、図3(C)に示すように、こ
の画素列を初期値認識部1で認識された始点から終点ま
で、基準線走査部2で生成された座標毎に発生させる。
描画データ転送部6は、この発生されたある区間の画素
列のデータを一時的に保持して、効率よくフレームメモ
リへ転送する。これにより、所望する線幅の線分が始点
から終点まで描画される。
When the normal vector generation unit 4 generates a pixel row, the line segment drawing unit 5 starts this pixel row from the starting point recognized by the initial value recognition unit 1 as shown in FIG. Up to the end point, it is generated for each coordinate generated by the reference line scanning unit 2.
The drawing data transfer unit 6 temporarily holds the generated data of the pixel column in a certain section and efficiently transfers the data to the frame memory. As a result, a line segment having a desired line width is drawn from the start point to the end point.

【0027】上述の線分描画動作をさらに具体的に説明
する。図4は、法線ベクトル生成までの動作の一例の説
明図である。初期値認識部1は描画する線分の始点と終
点の座標および線幅を認識する。ここで、図4(A)に
示す格子の交点が画素の中心位置となる画像上におい
て、始点p0と終点peおよび線幅から決まる四角形で
表わした線分を描画するものとする。
The above line segment drawing operation will be described more specifically. FIG. 4 is an explanatory diagram of an example of an operation up to normal vector generation. The initial value recognition unit 1 recognizes the coordinates and line widths of the start point and end point of the line segment to be drawn. Here, it is assumed that a line segment represented by a quadrangle determined from the start point p0 and the end point pe and the line width is drawn on the image in which the intersection of the grid shown in FIG. 4A is the center position of the pixel.

【0028】座標発生部21は、DDAにより初期値認
識部1が設定した初期値に基づいて始点p0から終点p
eまでの直線上の点の座標p1,p2,p3,...を
発生し、発生した座標が走査座標格納部22および移動
距離演算部23へ渡される。移動距離演算部23は始点
p0から発生した座標までの移動距離を絶えず演算し、
演算結果が線幅走査判定部24に渡される。
The coordinate generation unit 21 determines the start point p0 to the end point p based on the initial value set by the initial value recognition unit 1 by DDA.
Coordinates p1, p2, p3 ,. . . And the generated coordinates are passed to the scanning coordinate storage unit 22 and the moving distance calculation unit 23. The moving distance calculation unit 23 constantly calculates the moving distance from the starting point p0 to the generated coordinates,
The calculation result is passed to the line width scanning determination unit 24.

【0029】図5は、移動距離演算部の動作の一例の説
明図である。この例では、移動距離の演算誤差を低減す
るために、移動距離演算部23は、過去に発生した2画
素の座標までさかのぼり、これら2つの座標間の距離を
用いて演算を行なう。図5に示すように、現時点で最後
に発生した画素(以下現画素と呼ぶ)Pnからの次に新
しく発生する画素(以下次画素と呼ぶ)Pn+1が発生
されると、移動距離演算部23はまず次画素までの暫定
移動距離Pn〜Pn+1を演算する。このとき、隣接す
る座標間の単位距離をx軸方向、y軸方法ともに1とす
ると、画像は格子状に画素が存在するため暫定移動距離
は1.0または√2のいずれかである。さらに移動距離
演算部23が保持している現画素の前に発生した画素
(以下前画素と呼ぶ)からの移動距離Pn−1〜Pnお
よび先の暫定移動距離Pn〜Pn+1に基づいて新たに
次画素までの移動距離Pn〜Pn+1を算出する。すな
わち、連続する画素の移動距離の値が1.0および√2
または√2および1.0の場合のみ、これらをまとめて
ピタゴラスの定理により√5とする。
FIG. 5 is an explanatory diagram of an example of the operation of the moving distance calculating section. In this example, in order to reduce the calculation error of the moving distance, the moving distance calculating unit 23 traces back to the coordinates of two pixels generated in the past and performs the calculation using the distance between these two coordinates. As shown in FIG. 5, when a pixel (next pixel to be referred to below) Pn + 1 which is newly generated from a pixel (next pixel to be referred to below) Pn generated last at the present time is generated, the movement distance calculation unit 23 First, the provisional movement distances Pn to Pn + 1 to the next pixel are calculated. At this time, if the unit distance between adjacent coordinates is 1 in both the x-axis direction and the y-axis method, the provisional movement distance is either 1.0 or √2 because the image has pixels in a grid pattern. Further, based on the moving distances Pn-1 to Pn from the pixel generated before the current pixel (hereinafter referred to as the previous pixel) held by the moving distance calculation unit 23 and the previous provisional moving distances Pn to Pn + 1, The moving distances Pn to Pn + 1 to the pixels are calculated. That is, the moving distance values of consecutive pixels are 1.0 and √2.
Alternatively, only in the case of √2 and 1.0, these are collectively set to √5 by the Pythagorean theorem.

【0030】図5に示す例では、Pn−1〜Pn=1.
0、Pn〜Pn+1=√2よりPn−1〜Pn+1=√
5となるように、新たにPn〜Pn+1=(√5−1.
0)を移動距離として出力する。移動距離の演算後、P
n〜Pn+1の値(√5−1.0)は、Pn+1からP
n+2までの移動距離の算出のために、移動距離演算部
23内に保持される。
In the example shown in FIG. 5, Pn-1 to Pn = 1.
0, Pn to Pn + 1 = √2, and Pn-1 to Pn + 1 = √2
5 so that Pn to Pn + 1 = (√5-1.
0) is output as the movement distance. After calculating the moving distance, P
The values of n to Pn + 1 (√5-1.0) are from Pn + 1 to P
It is held in the moving distance calculation unit 23 for calculating the moving distance up to n + 2.

【0031】図6は、移動距離演算部の動作の一例を示
すフローチャートである。S51において、座標発生部
21が発生した次画素までの暫定移動距離を入力する。
以下この暫定移動距離の値をDnとする。また、移動距
離演算部23内で保持している前画素からの移動距離を
入力する。以下、この移動距離の値をDpとする。
FIG. 6 is a flow chart showing an example of the operation of the moving distance calculating section. In S51, the provisional movement distance to the next pixel generated by the coordinate generation unit 21 is input.
Hereinafter, the value of this provisional movement distance is Dn. Further, the movement distance from the previous pixel held in the movement distance calculation unit 23 is input. Hereinafter, the value of this moving distance is defined as Dp.

【0032】S52において暫定移動距離Dnが1であ
るか否かを判定する。暫定移動距離Dnが1である場合
には、さらにS53において移動距離Dpが√2である
か否かを判定する。移動距離Dpが√2でなければ、S
54において、現座標Pnから次座標Pn+1までの加
算距離を1として、累積距離に加算する。また、移動距
離Dpが√2である場合には、S55において、現座標
Pnから次座標Pn+1までの加算距離を√5−√2と
して、累積距離に加算する。
In S52, it is determined whether or not the provisional movement distance Dn is 1. When the provisional movement distance Dn is 1, it is further determined in S53 whether the movement distance Dp is √2. If the moving distance Dp is not √2, S
At 54, the addition distance from the current coordinate Pn to the next coordinate Pn + 1 is set to 1 and added to the cumulative distance. When the moving distance Dp is √2, in S55, the added distance from the current coordinate Pn to the next coordinate Pn + 1 is set to √5-√2 and added to the cumulative distance.

【0033】S52において暫定移動距離Dnが1でな
いと判定された場合には、さらにS56において移動距
離Dpが1であるか否かを判定する。移動距離Dpが1
であれば、S57において、現座標Pnから次座標Pn
+1までの加算距離を√5−1として、累積距離に加算
する。また、移動距離Dpが1でない場合には、S58
において、現座標Pnから次座標Pn+1までの加算距
離を√2として、累積距離に加算する。
When it is determined in S52 that the provisional movement distance Dn is not 1, it is further determined in S56 whether the movement distance Dp is 1. Moving distance Dp is 1
If so, in S57, the current coordinate Pn to the next coordinate Pn
The addition distance up to +1 is set to √5-1 and added to the cumulative distance. If the movement distance Dp is not 1, S58
In, the addition distance from the current coordinate Pn to the next coordinate Pn + 1 is set to √2 and added to the cumulative distance.

【0034】一方、90°回転部25は走査座標格納部
22に格納された図4(A)における座標p1,p2,
p3,...から、始点p0を中心として時計方向へ9
0°回転した座標p1’,p2’,p3’,...を作
り出し、それらを法線ベクトル情報として法線ベクトル
格納部26へ格納する。これと同時に線幅走査判定部2
4は初期値認識部1が認識した線幅を移動距離が上回る
かまたは両者が等しいか否かを判断する。移動距離が線
幅に等しいか上回ったときに座標発生部21の座標発生
を中断させる。これにより、法線ベクトル格納部26に
は、線幅分の法線ベクトルが格納されることになる。図
4(A)では直線p0p3が線幅に最も近いため、座標
p3まで生成された時点で座標発生部21の座標の発生
を一時中断する。これまでに発生した座標p1,p2,
p3は90°回転部25で回転され、座標p1’,p
2’,p3’となる。これにより、図4(B)に示すよ
うな法線ベクトルv0〜v3が得られる。
On the other hand, the 90 ° rotation unit 25 stores the coordinates p1, p2 and the coordinates p1, p2 in FIG.
p3 ,. . . From the start point p0 in the clockwise direction 9
Coordinates p1 ′, p2 ′, p3 ′ ,. . . Are stored in the normal vector storage unit 26 as normal vector information. At the same time, the line width scanning determination unit 2
4 determines whether the moving distance exceeds the line width recognized by the initial value recognizing unit 1 or both are equal. When the moving distance is equal to or exceeds the line width, the coordinate generation of the coordinate generating unit 21 is stopped. As a result, the normal vector storage unit 26 stores the normal vector for the line width. Since the straight line p0p3 is closest to the line width in FIG. 4A, the coordinate generation of the coordinate generation unit 21 is temporarily stopped at the time when the coordinate p3 is generated. Coordinates p1, p2 generated so far
p3 is rotated by the 90 ° rotation unit 25, and coordinates p1 ′, p
2 ', p3'. As a result, normal vectors v0 to v3 as shown in FIG. 4 (B) are obtained.

【0035】次に、法線ベクトル生成部4から法線ベク
トルが作成されたと判断された後は、法線ベクトルに基
づいて線分描画が行なわれる。図7は、法線ベクトル生
成から線分描画までの動作の一例の説明図である。座標
発生部21は、図7に示すように始点a0から終点f0
まで、順に座標を発生し、走査座標格納部22へ格納す
る。基準線上の画素a0〜f0が発生されるごとに、基
準線移動処理部27によって基準線を平行移動させ、線
分を描画する領域を始点から終点に向かう方向の線の右
側か左側かまたは中心に法線ベクトルを設定する。次に
描画部29が図4(B)に示す法線ベクトルv0〜v3
に基づいて、図7に示すように法線方向に1ラインごと
に描画する。すなわち、画素a0が発生されると、画素
a0から法線方向のラインとして画素a1,a2,a3
を生成する。同様にして、画素b0が発生されると画素
b1,b2,b3が、画素c0が発生されると画素c
1,c2,c3が、画素d0が発生されると画素d1,
d2,d3が、画素e0が発生されると画素e1,e
2,e3が、画素f0が発生されると画素f1,f2,
f3が、それぞれ生成される。このようにして生成され
た画素は、描画データ転送部6のデータ保持部12に渡
され、データ保持部12中のいずれかの保持部に保持さ
れる。
Next, after it is determined from the normal vector generation unit 4 that a normal vector has been created, line segment drawing is performed based on the normal vector. FIG. 7 is an explanatory diagram of an example of operation from normal vector generation to line segment drawing. As shown in FIG. 7, the coordinate generation unit 21 uses the start point a0 to the end point f0.
Up to the above, coordinates are sequentially generated and stored in the scanning coordinate storage unit 22. Each time the pixels a0 to f0 on the reference line are generated, the reference line movement processing unit 27 moves the reference line in parallel, and the area in which the line segment is drawn is located on the right or left side or the center of the line in the direction from the start point to the end point. Set the normal vector to. Next, the drawing unit 29 causes the normal vectors v0 to v3 shown in FIG.
Based on the above, each line is drawn in the normal direction as shown in FIG. That is, when the pixel a0 is generated, the pixels a1, a2, and a3 are formed as lines in the normal direction from the pixel a0.
To generate. Similarly, when the pixel b0 is generated, the pixels b1, b2, and b3 are generated, and when the pixel c0 is generated, the pixel c is generated.
1, c2, c3, when pixel d0 is generated, pixel d1,
When the pixel e0 is generated, the pixels d1 and d2
2, e3, when pixel f0 is generated, pixels f1, f2,
f3 is generated respectively. The pixels generated in this way are passed to the data holding unit 12 of the drawing data transfer unit 6 and held in any one of the data holding units 12.

【0036】図7の画素c0およびd0のように基準線
上の画素のy座標が変わると、法線ベクトルを構成する
隣り合う画素がななめの位置にあるとき、すなわちこの
例では法線ベクトルv0〜v3の中でv2およびv3の
間に画素抜けを起こす。そこで、画素抜け判定部28が
画素抜けの有無を判定し、画素抜けの位置を描画部29
に知らせ、画素抜けの位置に画素を挿入して抜けを除去
する。
When the y-coordinates of the pixels on the reference line change like the pixels c0 and d0 in FIG. 7, when the adjacent pixels forming the normal vector are at the licked position, that is, in this example, the normal vectors v0 to v0. A pixel omission occurs between v2 and v3 in v3. Therefore, the pixel omission determination unit 28 determines whether there is a pixel omission, and the pixel omission position is determined by the drawing unit 29.
Then, the pixel is inserted at the position where the pixel is missing and the pixel is removed.

【0037】そして、終了条件判定部30が座標発生部
21で発生した座標が終点となる条件を判定し、処理を
終わらせる。このような処理によって、任意の描画角度
の任意の線幅の線分を、ほぼ理想的に近い画質で高速に
描画することができる。
Then, the end condition judging unit 30 judges the condition that the coordinate generated by the coordinate generating unit 21 becomes the end point, and the process is ended. By such processing, it is possible to draw a line segment having an arbitrary line width at an arbitrary drawing angle at a high speed with an image quality that is almost ideal.

【0038】なお、破線や点線、鎖線など、途中で途切
れる線分を描画する際には、基準線上の画素を線種に応
じて発生させるか、あるいは所定間隔で所定長さだけ基
準線上の画素に対して法線ベクトルによる描画を行なわ
ないようにすることによって、任意の線幅の破線や点線
などを描画することが可能である。例えば、図7に示し
た例において、基準線上の画素として画素c0,d0に
ついて法線方向のラインを形成しないように制御するこ
とにより、2ドット間隔の点線を描画することが可能で
ある。このように、種々の線種に簡単に対応することが
できる。
When a line segment such as a broken line, a dotted line, or a chain line that is interrupted in the middle is drawn, pixels on the reference line are generated according to the line type, or pixels on the reference line for a predetermined length at a predetermined interval are drawn. It is possible to draw a broken line, a dotted line, or the like having an arbitrary line width by not drawing the normal vector with respect to. For example, in the example shown in FIG. 7, it is possible to draw a dotted line with a 2-dot interval by controlling the pixels c0 and d0 as pixels on the reference line so as not to form a line in the normal direction. In this way, various line types can be easily accommodated.

【0039】また、上述の線分描画処理では、法線ベク
トルとして法線方向の1ライン分のみの画素しか発生さ
せなかったが、例えば隣接する法線ベクトルを複数発生
させ、発生した複数の法線ベクトルのデータを用いて描
画してもよい。
Further, in the above-described line segment drawing process, only pixels for one line in the normal direction are generated as normal vectors, but for example, a plurality of adjacent normal vectors are generated and a plurality of generated normal vectors are generated. You may draw using the data of a line vector.

【0040】次に、本発明の線分描画装置の第1の実施
の形態における描画された線分の転送動作について説明
する。図8は、描画する線分の具体例の説明図である。
以下の説明では、具体例として、図8に右上がりのハッ
チングで示す太線を描画する場合について説明する。上
述のように、線分描画部5では、始点と終点を結ぶ基準
線に直交する法線ベクトルを、基準線を構成する画素ご
とに発生させて線分を生成する。図8では、法線ベクト
ルを矢印によって間欠的に示している。
Next, the transfer operation of the drawn line segment in the first embodiment of the line segment drawing apparatus of the present invention will be described. FIG. 8 is an explanatory diagram of a specific example of the line segment to be drawn.
In the following description, as a specific example, a case where a thick line shown by hatching in the upper right direction in FIG. 8 is drawn will be described. As described above, the line segment drawing section 5 generates a line segment by generating a normal vector orthogonal to the reference line connecting the start point and the end point for each pixel forming the reference line. In FIG. 8, normal vectors are intermittently shown by arrows.

【0041】例えば、フレームメモリ7がワード構成で
ある場合を考える。図8において縦線はワード境界であ
る。このようなワード構成のフレームメモリ7に線分を
描画する場合、各法線ベクトルの画素は各ワードのある
ビットに対応する。このようなフレームメモリ7に直接
画素を描画する場合には、画素の位置を元にフレームメ
モリ7のワードのアドレスとビット位置を計算し、計算
されたアドレスによってワードを読み出し、さらに計算
されたビット位置をもとにワード中のビットの値を変更
して、ワードを書き戻す処理が必要となる。このような
処理には時間がかかり、描画速度が低下してしまう。さ
らに、複数の画素が同じワード内に書き込まれる場合で
も、各画素ごとにフレームメモリ7をアクセスするた
め、アクセス回数が多くなり、描画速度は低下する。
For example, consider a case where the frame memory 7 has a word structure. Vertical lines in FIG. 8 are word boundaries. When a line segment is drawn in the frame memory 7 having such a word structure, the pixel of each normal vector corresponds to a certain bit of each word. When a pixel is directly drawn in such a frame memory 7, the address and bit position of the word of the frame memory 7 are calculated based on the pixel position, the word is read out by the calculated address, and the calculated bit is further calculated. It is necessary to change the value of the bit in the word based on the position and write the word back. Such processing takes time and the drawing speed decreases. Further, even when a plurality of pixels are written in the same word, since the frame memory 7 is accessed for each pixel, the number of accesses increases and the drawing speed decreases.

【0042】この第1の実施の形態では、比較的高速に
アクセス可能なデータ保持部12を設け、ワード単位に
フレームメモリ7へ転送を行なうことによってアライメ
ント処理をなくすとともにアクセス回数を減少させ、描
画速度を向上させている。さらに、データ保持部12中
の保持部を有効に利用することによって、少量のメモリ
容量で構成することが可能である。そのために、データ
保持部12中の保持部の領域は、フレームメモリ7のワ
ード境界に沿って割り当てる。例えば、図8(B)に示
す例では、保持部は1ワード×1ワードの領域を有して
いる。一般に描画する線分の始点や終点は、図8(A)
に示すように常にワード境界に存在するわけではないの
で、保持部の領域を描画する線分に合わせずにフレーム
メモリ7のワード境界に合わせて設定することによっ
て、データ転送部14によるフレームメモリ7への転送
を高速に行なうことができる。保持部のフレームメモリ
7上の位置は、保持部座標演算部13によって演算され
る。例えば、図8(B)に示すように保持部の左上の位
置の座標を演算して設定することができる。
In the first embodiment, the data holding unit 12 which can be accessed at a relatively high speed is provided, and the alignment process is eliminated by transferring data to the frame memory 7 in units of words, and the number of accesses is reduced to perform drawing. It is improving the speed. Further, by effectively using the holding unit in the data holding unit 12, it is possible to configure with a small memory capacity. Therefore, the area of the holding unit in the data holding unit 12 is allocated along the word boundary of the frame memory 7. For example, in the example shown in FIG. 8B, the holding unit has an area of 1 word × 1 word. Generally, the start point and the end point of a line segment to be drawn are shown in FIG.
Since it does not always exist on the word boundary as shown in FIG. 3, the area of the holding unit is set not on the drawing line segment but on the word boundary of the frame memory 7 so that the data transfer unit 14 sets the frame memory 7 Can be transferred at high speed. The position of the holding unit on the frame memory 7 is calculated by the holding unit coordinate calculation unit 13. For example, the coordinates of the upper left position of the holding unit can be calculated and set as shown in FIG.

【0043】図9は、本発明の第1の実施の形態におけ
る描画された画素の格納および転送処理の一例を示すフ
ローチャートである。線分描画部5で画素が生成される
と、S61からS62に移り、S62において生成され
た画素の描画座標を受け取る。S63において、保持部
制御部11は、受け取った描画座標が4つの保持部の中
ですでに設定された保持部内に入るか否かを判定する。
いずれかの保持部に保持可能な場合は、S64におい
て、その保持部を選択し、描画座標に基づいて保持部に
画素を描画する。設定されているどの保持部内にも入ら
ない場合は、S65において、空いている保持部を選択
し、保持部座標演算部13によってその保持部が対応す
るフレームメモリ7上の座標を演算し、設定する。そし
て、その保持部に画素を描画する。
FIG. 9 is a flow chart showing an example of the storage and transfer processing of the drawn pixels in the first embodiment of the present invention. When pixels are generated in the line segment drawing unit 5, the process proceeds from S61 to S62, and the drawing coordinates of the pixels generated in S62 are received. In S63, the holding unit control unit 11 determines whether or not the received drawing coordinates fall within the already set holding unit among the four holding units.
If it can be held in any of the holding units, in S64, the holding unit is selected and a pixel is drawn in the holding unit based on the drawing coordinates. If it does not fit into any of the set holding units, in S65, a free holding unit is selected, the holding unit coordinate calculation unit 13 calculates the coordinates on the frame memory 7 corresponding to the holding unit, and the setting is performed. To do. Then, a pixel is drawn in the holding unit.

【0044】S66において、保持部制御部11は描画
が終了した保持部が存在するか否かを判定し、描画が終
了した保持部がない場合には、S61へ戻る。描画が終
了した保持部が存在する場合には、S67において、デ
ータ転送部14に描画が終了した保持部の設定位置を与
え、内部のデータを設定されたフレームメモリ7上の位
置に転送させる。フレームメモリ7へ保持部のデータを
転送する際には、データ転送部14は保持部を見ながら
描画されたデータのみをワード単位ごとにフレームメモ
リ7に転送する。転送終了後、S68において、データ
保持部初期化部15は転送された保持部の描画されたデ
ータのみをワード単位に初期化、あるいは転送された保
持部の全領域を初期化する。初期化された保持部はS6
5で新たに保持部が必要となったときに再設定される。
初期化終了後、S61へ戻る。
In S66, the holding unit control unit 11 determines whether or not there is a holding unit for which drawing has been completed. If there is no holding unit for which drawing has been completed, the process returns to S61. If there is a holding unit for which drawing has been completed, the setting position of the holding unit for which drawing has been completed is given to the data transfer unit 14 in S67, and the internal data is transferred to the set position on the frame memory 7. When transferring the data in the holding unit to the frame memory 7, the data transfer unit 14 transfers only the drawn data while looking at the holding unit to the frame memory 7 word by word. After the transfer is completed, in S68, the data holding unit initialization unit 15 initializes only the drawn data of the transferred holding unit in units of words, or initializes the entire area of the transferred holding unit. The initialized holding unit is S6
It is reset when a new holding unit is required in 5.
After the initialization is completed, the process returns to S61.

【0045】このような処理を線分描画部5で画素が生
成されるごとに行ない、S61で描画が終了したと判定
すると、S69においてその時点で設定されている保持
部の内容をデータ転送部14によってフレームメモリ7
へ転送して処理を終了する。
Such processing is performed every time a pixel is generated in the line segment drawing section 5, and when it is determined in S61 that the drawing is completed, the contents of the holding section set at that time in S69 are transferred to the data transfer section. 14 by the frame memory 7
To end the process.

【0046】図10ないし図17は、本発明の第1の実
施の形態における描画された画素の格納および転送処理
の具体的な過程の説明図である。以下の説明では、デー
タ保持部12には4つの保持部が設けられているものと
し、それぞれ第1の保持部、第2の保持部第3の保持
部、第4の保持部とする。図中では、それぞれの保持部
の番号のみを示している。また、フレームメモリ7はワ
ード構成であり、各保持部は、フレームメモリ7のワー
ドに対応して、1ワード×1ワードの容量を有している
ものとする。
FIGS. 10 to 17 are explanatory diagrams of a specific process of storing and transferring the drawn pixels in the first embodiment of the present invention. In the following description, it is assumed that the data holding unit 12 is provided with four holding units, which are a first holding unit, a second holding unit, a third holding unit, and a fourth holding unit, respectively. In the figure, only the number of each holding unit is shown. The frame memory 7 has a word structure, and each holding unit has a capacity of 1 word × 1 word corresponding to the word of the frame memory 7.

【0047】まず、線分描画部5から始点に対応する画
素の描画座標が描画データ転送部6に送られてくる。こ
の時点ではまだ保持部の設定が行なわれていないので、
保持部の設定を行なう。図10〜図17において、設定
された保持部の領域には右下がりのハッチングを施して
示している。図10においてフレームメモリ7上のワー
ド境界に沿い、かつ、線分描画部5で発生した法線ベク
トルの始点が入るように、第1の保持部を割り当てる。
そして、保持部座標演算部13によって、第1の保持部
の左上の画素のフレームメモリ上に割り当てられる座標
を計算する。そして、線分の始点の画素を第1の保持部
に描画する。
First, the line drawing unit 5 sends the drawing coordinates of the pixel corresponding to the starting point to the drawing data transfer unit 6. At this point, the holding unit has not been set, so
Set the holding unit. In FIG. 10 to FIG. 17, the set area of the holding portion is shown by hatching to the lower right. In FIG. 10, the first holding unit is assigned so as to be along the word boundary on the frame memory 7 and to enter the starting point of the normal vector generated by the line segment drawing unit 5.
Then, the holding unit coordinate calculation unit 13 calculates the coordinates assigned to the upper left pixel of the first holding unit on the frame memory. Then, the pixel at the starting point of the line segment is drawn in the first holding unit.

【0048】続いて線分描画部5は始点の画素に対応し
た法線ベクトルの各画素の描画座標を順次発生する。こ
れらの描画座標は第1の保持部に含まれるので、順次、
第1の保持部に描画して行く。さらに、基準線に沿って
発生される画素と、その画素に対応した法線ベクトルの
各画素も、描画座標が第1の保持部に含まれる間は、順
次第1の保持部に描画される。
Then, the line segment drawing section 5 sequentially generates drawing coordinates of each pixel of the normal vector corresponding to the starting point pixel. Since these drawing coordinates are included in the first holding unit,
Drawing on the first holding unit. Further, the pixel generated along the reference line and each pixel of the normal vector corresponding to the pixel are sequentially drawn in the first holding unit while the drawing coordinates are included in the first holding unit. .

【0049】法線ベクトルの始点とワード境界の位置関
係によっては法線ベクトルの終点が同じ保持部に入らな
い場合がある。しかし、線幅が1つの保持部に入りきる
大きさ、すなわちこの例では1ワード以下であれば、以
下に説明するように新たに保持部を割り当てて行くこと
によって描画可能である。
Depending on the positional relationship between the start point of the normal vector and the word boundary, the end point of the normal vector may not be in the same holding section. However, if the line width is large enough to fit in one holding unit, that is, one word or less in this example, drawing can be performed by newly allocating a holding unit as described below.

【0050】保持部制御部11は、常に基準線と法線ベ
クトルに基づいて算出した描画座標が、現在使用してい
るどの保持部に入るかを判断する。図11に示すよう
に、法線ベクトルがbの位置に来たとき、法線ベクトル
bの始点の画素の描画座標は第1の保持部に入らなくな
る。このとき、保持部制御部11は法線ベクトルbの始
点を保持部の範囲外と判断する。そこで、保持部制御部
11は範囲外となった画素の座標が入るように、第2の
保持部をフレームメモリ7のワード境界に沿って新たに
割り当て、法線ベクトルbの始点の画素を第2の保持部
へ描画する。このとき、法線ベクトルが2つの保持部に
割り当てられた描画領域に跨っても、保持部制御部11
は画素ごとにどの保持部かを判断するため、問題なく描
画できる。
The holding unit control unit 11 always determines to which holding unit currently used the drawing coordinates calculated based on the reference line and the normal vector belong. As shown in FIG. 11, when the normal vector reaches the position of b, the drawing coordinates of the pixel at the starting point of the normal vector b cannot be stored in the first holding unit. At this time, the holding unit control unit 11 determines that the starting point of the normal vector b is outside the range of the holding unit. Therefore, the holding unit control unit 11 newly allocates the second holding unit along the word boundary of the frame memory 7 so that the coordinates of the pixels that are out of the range are included, and the pixel at the starting point of the normal vector b is set to the first pixel. Draw to the second holding unit. At this time, even if the normal vector spans the drawing areas assigned to the two holding units, the holding unit control unit 11
Can determine the holding unit for each pixel, and thus can be drawn without any problem.

【0051】さらに描画が進んで、図12に示すように
法線ベクトルがcの位置に来たとき、法線ベクトルに従
って描画する画素は第1の保持部に書き込まれなくな
る。直線を描画している場合、これ以上描画が進んでも
第1の保持部には描画されないので、データ保持部12
内の第1の保持部は描画完了となる。保持部制御部11
は、データ転送部14に対して第1の保持部の内容をフ
レームメモリ7へ転送するように依頼するとともに、第
1の保持部の位置を示す座標を送る。
When the drawing further proceeds and the normal vector reaches the position of c as shown in FIG. 12, the pixel drawn according to the normal vector is not written in the first holding unit. When a straight line is drawn, the data is not drawn in the first holding unit even if drawing is further progressed.
Drawing of the first holding unit in the drawing is completed. Holding unit control unit 11
Requests the data transfer unit 14 to transfer the contents of the first holding unit to the frame memory 7, and sends the coordinates indicating the position of the first holding unit.

【0052】図13に示すように、法線ベクトルがdの
位置に達したとき、第2の保持部から法線ベクトルdの
終点がはみ出る。そのため、新たに第3の保持部を第2
の保持部の下の位置に割り当て、法線ベクトルdの終点
の画素を描画する。もちろん、第1の保持部は内容を転
送済みであるので、この時点では第1の保持部を割り当
てることも可能である。第3の保持部の割り当て以降
は、図13に示したように第2の保持部と第3の保持部
を用いることになる。
As shown in FIG. 13, when the normal vector reaches the position of d, the end point of the normal vector d protrudes from the second holding unit. Therefore, the third holding unit is newly added to the second holding unit.
The pixel at the end point of the normal vector d is drawn by allocating it to a position below the holding part of the. Of course, since the first holding unit has already transferred the contents, it is possible to assign the first holding unit at this point. After the allocation of the third holding unit, the second holding unit and the third holding unit are used as shown in FIG.

【0053】さらに描画が進んで、図14に示すよう
に、法線ベクトルがeの位置に来たとき、法線ベクトル
eの始点の画素の描画座標が、使用されている第2の保
持部または第3の保持部の範囲外となる。このため、範
囲外となった画素の座標が入るように新たに第4の保持
部を設定し、法線ベクトルeの始点の画素の描画を行な
う。
When the drawing further progresses and the normal vector reaches the position of e as shown in FIG. 14, the drawing coordinates of the pixel at the starting point of the normal vector e are used by the second holding unit. Or it is outside the range of the third holding unit. Therefore, the fourth holding unit is newly set so that the coordinates of the pixels that are out of the range are included, and the pixel at the starting point of the normal vector e is drawn.

【0054】図15において、法線ベクトルがfの位置
に来たときに、法線ベクトルに沿って描画する途中で第
2、第3、第4の保持部の範囲外に画素が現われる。こ
のため、この画素の座標が入るように、現在使用してい
ない第1の保持部の内容をデータ保持部初期化部15に
よってクリアし、新たに割り当てる。データ保持部初期
化部15による保持部のクリアは、保持部の内容の転送
後、新たに割り当てられて描画されるまでの間で行なえ
ばよい。
In FIG. 15, when the normal vector reaches the position of f, a pixel appears outside the range of the second, third, and fourth holding units during drawing along the normal vector. Therefore, the contents of the first holding unit which is not currently used are cleared by the data holding unit initializing unit 15 so that the coordinates of this pixel can be entered, and new allocation is performed. The clearing of the holding unit by the data holding unit initializing unit 15 may be performed after the contents of the holding unit are transferred and before newly allocated and drawn.

【0055】また、このとき第2の保持部には1画素も
描画しなくなるため、データ転送部14に対し、第2の
保持部の内容を転送するように依頼するとともに、フレ
ームメモリ7上での第2の保持部の位置を示す座標を送
る。第2の保持部の内容を転送後は、第1、第3、第4
の保持部を用いて描画を行なうことになる。
At this time, no more pixels are drawn in the second holding unit. Therefore, the data transfer unit 14 is requested to transfer the contents of the second holding unit, and at the same time, on the frame memory 7. The coordinates indicating the position of the second holding unit of the are sent. After transferring the contents of the second holding unit, the first, third and fourth contents are transferred.
Drawing will be performed using the holding unit.

【0056】図16に示すように、法線ベクトルがgの
位置に来たとき、法線ベクトルに沿って描画する画素が
第3の保持部に書き込まれなくなるため、第3の保持部
が描画完了となる。保持部制御部11はデータ転送部1
4に対し、第3の保持部の内容を転送するように依頼す
るとともに、フレームメモリ7上での第3の保持部の位
置を示す座標を送る。
As shown in FIG. 16, when the normal vector reaches the position of g, the pixels to be drawn along the normal vector are no longer written in the third holding unit, so the third holding unit draws. It will be completed. The holding unit control unit 11 is the data transfer unit 1.
4 is requested to transfer the contents of the third holding unit, and the coordinates indicating the position of the third holding unit on the frame memory 7 are sent.

【0057】図17に示すように、法線ベクトルがhの
位置に来たとき、すなわち終点まで描画を完了した場
合、保持部制御部11はデータ転送部14に対し、現在
用いているすべての保持部の内容をフレームメモリ7へ
転送するように依頼するとともに、内容の転送を行なう
各保持部のフレームメモリ上での位置を示す座標を送
る。図17では第1、第4の保持部が使用されているた
め、これらの保持部の内容が転送される。これにより、
図8(A)に示す線分の描画データがフレームメモリ7
上に格納される。
As shown in FIG. 17, when the normal vector reaches the position of h, that is, when the drawing is completed up to the end point, the holding unit control unit 11 instructs the data transfer unit 14 to use all the currently used data. A request is made to transfer the contents of the holding unit to the frame memory 7, and the coordinates indicating the position on the frame memory of each holding unit for transferring the contents are sent. Since the first and fourth holding units are used in FIG. 17, the contents of these holding units are transferred. This allows
The drawing data of the line segment shown in FIG.
Stored on top.

【0058】以上のように、線分の線幅が1ワードに対
応する画素数以下の場合、4つの保持部を順次用いるこ
とにより、線分の描画が可能となる。また、フレームメ
モリ7への描画データの転送がワード単位に行なわれる
ため、フレームメモリ7へのアクセス回数が減り、描画
処理時間をより短縮できる。
As described above, when the line width of the line segment is less than the number of pixels corresponding to one word, the line segment can be drawn by sequentially using the four holding units. Further, since the drawing data is transferred to the frame memory 7 in units of words, the number of accesses to the frame memory 7 is reduced and the drawing processing time can be further shortened.

【0059】なお、上述の例では、左右に隣接して設定
する保持部のx座標を同じにして保持部の座標を設定し
ているが、ワード境界に沿って配置すれば左右に隣接す
る保持部のx座標は揃える必要はない。例えば、図11
において第2の保持部を割り当てる際に、法線ベクトル
bの始点のx座標に第2の保持部の上辺を合わせるよう
に領域を設定してもよい。また、この例では保持部の大
きさを1ワード×1ワードとしたが、これに限らず、幅
が1ワード以上であればどのような大きさであってもよ
い。このとき、保持部の幅は1ワードの整数倍にするこ
とによって、効率よくメモリを利用することができる。
In the above example, the x-coordinates of the holding units set adjacent to each other on the left and right are set to be the same, and the coordinates of the holding units are set. The x-coordinates of the parts need not be aligned. For example, in FIG.
When assigning the second holding unit in, the area may be set such that the upper side of the second holding unit is aligned with the x coordinate of the starting point of the normal vector b. Further, in this example, the size of the holding unit is set to 1 word × 1 word, but the size is not limited to this, and any size may be used as long as the width is 1 word or more. At this time, the memory can be efficiently used by making the width of the holding unit an integral multiple of 1 word.

【0060】図18、図19は、本発明の第1の実施の
形態において線幅が1つの保持部に入りきらない場合の
描画および転送処理の一例の説明図である。図18に示
すように、描画する線分の線幅が1つの保持部に入りき
らない場合は、上述のように4つの保持部だけでは保持
部が不足する。これを解消する1つの方法として、線分
を数回に分けて描画する方法がある。すなわち、1つの
保持部内に入りきるように線分の法線ベクトルを分け
て、その分けた法線ベクトルに基づいて終点方向へ描画
する。そして続けて、始点から終点方向へ次に分けられ
た法線ベクトルに基づいて描画を行なう。以上を太線の
線幅になるまで分けて行なう。このように処理すること
によって、上述のように最低4つの保持部を用いて効率
的にフレームメモリ7に描画データを転送することがで
きる。
FIG. 18 and FIG. 19 are explanatory views of an example of the drawing and transfer processing when the line width does not fit into one holding unit in the first embodiment of the present invention. As shown in FIG. 18, when the line width of the line segment to be drawn does not fit into one holding portion, the holding portions are insufficient with only four holding portions as described above. As one method of solving this, there is a method of drawing the line segment in several times. That is, the normal vector of the line segment is divided so as to fit into one holding unit, and drawing is performed toward the end point based on the divided normal vector. Then, subsequently, drawing is performed based on the normal vector divided next from the start point to the end point. The above process is repeated until the line width becomes thick. By processing in this way, drawing data can be efficiently transferred to the frame memory 7 using at least four holding units as described above.

【0061】具体的な描画処理および転送処理を、図1
9を用いて説明する。ここでは、図18にハッチングを
施して示すような、線幅が2ワード以上の線分を描画す
る場合を考える。このように1つの保持部に入りきらな
い線幅の線分を描画するときに、そのまま上述のように
線幅分の法線ベクトルを用意して描画しようとすると、
データ保持部12中の4つの保持部だけでは足りなくな
る。そのため、図19に示すように、線幅を描画領域単
位で分け、法線ベクトルをサブ法線ベクトル〜に分
割する。図19では、分割して描画を行なうそれぞれの
領域を、ハッチングを変えて示している。
Specific drawing processing and transfer processing are shown in FIG.
This will be described using 9. Here, consider a case where a line segment having a line width of 2 words or more is drawn, as shown by hatching in FIG. When a line segment having a line width that does not fit in one holding unit is drawn in this way, if a normal vector for the line width is prepared and drawn as it is as described above,
The four holding units in the data holding unit 12 are insufficient. Therefore, as shown in FIG. 19, the line width is divided for each drawing area, and the normal vector is divided into sub-normal vectors to. In FIG. 19, each area in which drawing is divided and shown is shown with different hatching.

【0062】サブ法線ベクトルを作成する際には、法線
ベクトルの始点およびワード境界に沿って割り当てた保
持部の有する領域によって法線ベクトルをクリップす
る。図19において、保持部制御部11は法線ベクトル
からサブ法線ベクトルを作成し、このサブ法線ベクト
ルに基づいて上述の線幅が1つの保持部に入る場合と同
様にして、順次保持部を割り当てて描画する。図19で
は保持部を割り当てる過程も示しており、割り当てられ
た保持部の番号を数字により示している。
When the sub-normal vector is created, the normal vector is clipped by the starting point of the normal vector and the area of the holding unit allocated along the word boundary. In FIG. 19, the holding unit control unit 11 creates a sub-normal vector from the normal vector, and sequentially holds the sub-normal vectors in the same manner as in the case where the above-mentioned line width enters one holding unit based on the sub-normal vector. And draw. FIG. 19 also shows the process of assigning the holding units, and the numbers of the assigned holding units are indicated by numbers.

【0063】サブ法線ベクトルによって直線の終点ま
で描画を行なった後、以下同様にサブ法線ベクトル、
サブ法線ベクトルをそれぞれ作成しながら描画を行な
う。このように、線幅が1つの保持部に入りきらない場
合は、法線ベクトルを保持部の大きさでクリップして用
いることにより、4つの保持部を利用して線分の描画を
行なうことができる。
After drawing to the end point of the straight line by the sub-normal vector, the sub-normal vector,
Draw while creating each sub-normal vector. As described above, when the line width does not fit into one holding unit, the normal vector is clipped to the size of the holding unit and used to draw the line segment using the four holding units. You can

【0064】上述の例では、最低4つの保持部を有効に
利用して、1つの保持部に入りきらない線幅の線分を描
画する例を示したが、例えば、保持部の個数が5つ以上
確保できる場合には、分割するサブ法線ベクトルの長さ
を1つの保持部に入りきる長さ以上とすることが可能で
ある。これによりサブ法線ベクトルの分割数を減少させ
ることができ、高速に描画することができる。また、必
要な個数だけ保持部を確保できる場合、サブ法線ベクト
ルへの分割を行なわずに、法線ベクトルのまま描画する
こともできる。
In the above-mentioned example, an example in which at least four holding units are effectively used to draw a line segment having a line width that does not fit in one holding unit has been shown. However, for example, the number of holding units is five. When it is possible to secure one or more, it is possible to make the length of the sub-normal vector to be divided more than the length that can fit into one holding unit. As a result, the number of sub-normal vector divisions can be reduced, and high-speed drawing can be performed. Further, when the required number of holding units can be secured, it is possible to draw the normal vector as it is without dividing it into sub-normal vectors.

【0065】なお、上述の第1の実施の形態では、特願
平7−82432号に記載されているような法線ベクト
ルを重ねることによって線分を描画する方法を用いて、
データ保持手段を介してフレームメモリに描画データを
転送する構成を示した。しかし、この第1の実施の形態
で示した描画データの転送の手法は、これに限らず、例
えば、始点と終点を結ぶ線分を重ねることによって線分
を描画する方法にも応用することが可能である。この場
合、線分の長さが保持部の大きさより長いのが一般的で
あるので、図18に示すように分割して描画する方法を
用いることができる。
In the first embodiment described above, a method of drawing a line segment by overlapping normal vectors as described in Japanese Patent Application No. 7-82432 is used.
The configuration has been shown in which drawing data is transferred to the frame memory via the data holding means. However, the method of transferring the drawing data shown in the first embodiment is not limited to this, and can be applied to, for example, a method of drawing a line segment by overlapping line segments connecting a start point and an end point. It is possible. In this case, since the length of the line segment is generally longer than the size of the holding portion, it is possible to use a method of dividing and drawing as shown in FIG.

【0066】図20は、本発明の線分描画装置の第2の
実施の形態を示すブロック図である。図中、図1と同様
の部分には同じ符号を付して説明を省略する。41は描
画画素修正部、42は保持部座標演算部、43は保持部
制御部、44はデータ保持部、45はデータ転送部であ
る。この実施の形態では、描画画素転送部6には、描画
画素修正部41と、保持部座標演算部42と、保持部制
御部43と、データ保持部44と、データ転送部45と
が設けられている。描画画素修正部41は、基準線走査
部2において演算される基準線の座標とデータ保持部内
にすでに描画されている基準線の座標を比較して、異な
る画素を見つけた場合は法線ベクトルに基づいてデータ
保持部内のデータを変更する。
FIG. 20 is a block diagram showing a second embodiment of the line segment drawing apparatus of the present invention. In the figure, the same parts as those in FIG. 41 is a drawing pixel correction unit, 42 is a holding unit coordinate calculation unit, 43 is a holding unit control unit, 44 is a data holding unit, and 45 is a data transfer unit. In this embodiment, the drawing pixel transfer unit 6 is provided with a drawing pixel correction unit 41, a holding unit coordinate calculation unit 42, a holding unit control unit 43, a data holding unit 44, and a data transfer unit 45. ing. The drawing pixel correction unit 41 compares the coordinates of the reference line calculated in the reference line scanning unit 2 with the coordinates of the reference line already drawn in the data holding unit, and if a different pixel is found, the drawing pixel correction unit 41 sets the normal vector. The data in the data holding unit is changed based on the above.

【0067】保持部座標演算部42は、基準線の座標お
よび法線ベクトルに基づいてデータ保持部がなるべく多
くの線分描画画素を保持できるように、データ保持部4
4の設定座標を演算する。
The holding unit coordinate calculation unit 42 uses the data holding unit 4 so that the data holding unit can hold as many line segment drawing pixels as possible based on the coordinates of the reference line and the normal vector.
The setting coordinates of 4 are calculated.

【0068】保持部制御部43は、線分描画部5が初め
てデータ保持部44に線分を描画するとき、または描画
画素修正部41がデータ保持部44に保持されたデータ
を修正するときに、DDAの演算結果に基づいてその終
了判定を行ない、どちらかの処理が終了した後にデータ
転送部45にデータの転送を行なわせるように制御す
る。
When the line drawing unit 5 draws a line segment in the data holding unit 44 for the first time, or when the drawing pixel correction unit 41 corrects the data held in the data holding unit 44, the holding unit control unit 43 corrects the data. , DDA is determined based on the operation result of DDA, and the data transfer unit 45 is controlled to transfer the data after either processing is completed.

【0069】データ保持部44は、n×m画素の矩形領
域の描画データを保持する。このとき、転送単位に合わ
せて大きさを設定することにより、効率のよい転送を行
なうことができる。具体例としては、8×8画素の矩形
領域とすることができ、1bit/画素の場合、8ビッ
ト×8バイトにより構成することができる。
The data holding unit 44 holds drawing data of a rectangular area of n × m pixels. At this time, efficient transfer can be performed by setting the size according to the transfer unit. As a specific example, a rectangular area of 8 × 8 pixels can be used, and in the case of 1 bit / pixel, it can be configured by 8 bits × 8 bytes.

【0070】データ転送部45は、保持部制御部43に
よってデータ保持部44へのアクセスが終了したと判断
された後に、データ保持部44に描画されたデータを保
持部座標演算部42で演算されたフレームメモリ上での
位置に転送する。
The data transfer unit 45 calculates the data drawn in the data holding unit 44 by the holding unit coordinate calculation unit 42 after the holding unit control unit 43 determines that the access to the data holding unit 44 is completed. Transfer to the position on the frame memory.

【0071】図21、図22は、本発明の線分描画装置
の第2の実施の形態における具体的な動作の一例の説明
図である。図21はデータ保持部44の内容の変遷を示
し、図22はフレームメモリ7の内容を示している。こ
の第2の実施の形態においても、上述の第1の実施の形
態と同様に、法線ベクトル(図4におけるv0〜v3に
相当)を生成した後、基準線上の画素ごとにこれを起点
として線分描画部5によって線分の描画座標を算出す
る。このとき、フレームメモリ7上に直接描画するので
なく、データ保持部44に描画をするか、または、すで
に描画されたデータを修正利用する。
FIG. 21 and FIG. 22 are explanatory views of an example of a concrete operation in the second embodiment of the line segment drawing apparatus of the present invention. 21 shows the transition of the contents of the data holding unit 44, and FIG. 22 shows the contents of the frame memory 7. Also in the second embodiment, similarly to the first embodiment described above, after generating the normal vector (corresponding to v0 to v3 in FIG. 4), this is used as a starting point for each pixel on the reference line. The line segment drawing unit 5 calculates the drawing coordinates of the line segment. At this time, the data is not directly drawn on the frame memory 7, but is drawn on the data holding unit 44 or the already drawn data is corrected and used.

【0072】初めてデータ保持部44へ描画する場合
は、線分描画部5で演算された描画座標に基づいて、デ
ータ保持部43がなるべく多くの線分描画画素を保持で
きるように保持部座標演算部42がデータ保持部44の
設定座標を演算し、設定する。例えば、法線ベクトルの
始点と終点がデータ保持部44の縁の部分に来るように
設定すればよい。データ保持部44の領域は、図22に
太線で示すようにフレームメモリ7上の領域に対応して
設定される。
When drawing in the data holding unit 44 for the first time, based on the drawing coordinates calculated in the line segment drawing unit 5, the holding unit coordinate calculation is performed so that the data holding unit 43 can hold as many line segment drawing pixels as possible. The unit 42 calculates and sets the set coordinates of the data holding unit 44. For example, the start point and the end point of the normal vector may be set so as to come to the edge portion of the data holding unit 44. The area of the data holding unit 44 is set corresponding to the area on the frame memory 7 as shown by the thick line in FIG.

【0073】図21(A)に示すように、線分の基準線
上の画素が画素ア’から順次発生され、その画素を始点
として法線ベクトルがデータ保持部44に描画されてゆ
く。このとき、図2の画素抜け判定部28による判定結
果に基づき、画素抜け部分の修正も行なわれて行く。保
持部制御部43は、データ保持部44内の基準線の始点
(図21(A)では画素ア’)でのDDAによる演算時
の残差とある程度近い残差になるまでデータ保持部44
の範囲内で描画を行なう。図21(A)では画素イ’の
時に画素ア’の残差と最も近くなる。これにより基準線
上の次の画素からの描画パターンが、データ保持部44
に描画された現在のパターンから大きく変わらなくな
る。基準線上の画素イ’まで生成され、法線ベクトルに
基づいて画素がデータ保持部44に描画された後、デー
タ転送部45によってフレームメモリ7上に設定された
位置に転送される。これにより、図22において基準線
上の画素アから画素イまでの部分の線分がフレームメモ
リ7に描画されたことになる。
As shown in FIG. 21A, pixels on the reference line of the line segment are sequentially generated from the pixel A ', and a normal vector is drawn in the data holding unit 44 starting from the pixel. At this time, the pixel missing portion is also corrected based on the determination result by the pixel missing determination unit 28 in FIG. The holding unit control unit 43 keeps the data holding unit 44 until the residuals at the start point of the reference line in the data holding unit 44 (pixel A'in FIG.
Draw within the range. In FIG. 21A, the pixel A'is closest to the residual of the pixel A '. As a result, the drawing pattern from the next pixel on the reference line is changed to the data holding unit 44.
It does not change much from the current pattern drawn in. Pixels a'on the reference line are generated, pixels are drawn in the data holding unit 44 based on the normal vector, and then transferred to the position set in the frame memory 7 by the data transfer unit 45. As a result, the line segment of the portion from the pixel A to the pixel B on the reference line in FIG. 22 is drawn in the frame memory 7.

【0074】次に、描画画素修正部41は、図21
(B)に示すように、保持部座標演算部42がデータ保
持部44内の基準線が図21(A)の描画部分とうまく
つながるようにデータ保持部44の位置を演算する。そ
して、基準線上の画素ウ’から、順次、基準線上の画素
と、先に描画したデータ保持部44内の基準線の座標を
比較する。異なる画素が見つかると、その部分の修正を
行なう。すなわち、基準線上の画素が1画素ずれると、
法線ベクトルも1画素ずれるため、法線ベクトルの始点
と終点の2画素を修正する。図21(B)に示した例で
は、画素オ’と画素カ’の2画素を修正する。このよう
な処理を、画素ウと近い残差となる画素エまでの基準線
上の画素について行なう。そして、修正後のデータ保持
部44の内容をデータ転送部45によってフレームメモ
リ7上の設定された位置に転送する。これにより、図2
2において基準線上の画素ウから画素エまでの部分の線
分がフレームメモリ7に描画されたことになる。
Next, the drawing pixel correction unit 41 is operated by the drawing pixel correction unit 41 shown in FIG.
As shown in (B), the holding unit coordinate calculation unit 42 calculates the position of the data holding unit 44 so that the reference line in the data holding unit 44 is well connected to the drawing portion of FIG. 21 (A). The pixels on the reference line are sequentially compared with the pixels on the reference line and the coordinates of the previously drawn reference line in the data holding unit 44. If a different pixel is found, that part is modified. That is, if the pixel on the reference line is shifted by one pixel,
Since the normal vector also shifts by one pixel, the two pixels at the start point and the end point of the normal vector are corrected. In the example shown in FIG. 21B, two pixels of pixel o'and pixel power 'are corrected. Such processing is performed for the pixels on the reference line up to the pixel d having a residual close to that of the pixel c. Then, the contents of the corrected data holding unit 44 are transferred to the set position on the frame memory 7 by the data transfer unit 45. As a result, FIG.
In FIG. 2, the line segment of the portion from the pixel C to the pixel D on the reference line is drawn in the frame memory 7.

【0075】同様に、図21(C)においても、まず保
持部座標演算部42が図21(B)で修正し用いたデー
タ保持部44内の基準線が図21(C)とうまくつなが
るようにデータ保持部44の位置を演算し、描画画素修
正部41が画素ケ’と画素コ’を修正して、データ転送
部45がフレームメモリ7への転送を行なう。これによ
り、図22において基準線上の画素キから画素クまでの
部分の線分がフレームメモリ7に描画されたことにな
る。このようにして、線分全体がフレームメモリ7に描
画される。
Similarly, also in FIG. 21C, first, the reference line in the data holding unit 44 corrected and used by the holding unit coordinate calculation unit 42 in FIG. 21B is well connected to that in FIG. 21C. Then, the position of the data holding unit 44 is calculated, the drawing pixel correction unit 41 corrects the pixel K ′ and the pixel K ′, and the data transfer unit 45 transfers the data to the frame memory 7. As a result, the line segment of the portion from the pixel K to the pixel K on the reference line in FIG. 22 is drawn in the frame memory 7. In this way, the entire line segment is drawn in the frame memory 7.

【0076】このようにしてデータ保持部44に描画さ
れたデータを修正しながら用いることによって、描画処
理を高速化することができる。また、データ保持部44
をバイト単位やワード単位とすることによって、高速な
転送を行なうことができる。フレームメモリ7がワード
構成やバイト構成の場合、データ保持部44からワード
やバイト単位で転送しても、ワード境界やバイト境界に
一致しないこともある。しかし、データ保持部44から
転送される1ワードあるいは1バイトにつき2回のフレ
ームメモリ7のアクセスで済み、各画素ごとにフレーム
メモリ7をアクセスする場合と比べ格段にアクセス回数
を減少させることができる。そのため、転送に要する時
間を削減でき、高速な描画処理を実現することができ
る。
By using the data thus drawn in the data holding unit 44 while correcting it, the drawing process can be speeded up. In addition, the data holding unit 44
High-speed transfer can be performed by using the byte unit or the word unit. When the frame memory 7 has a word structure or a byte structure, even if the frame memory 7 is transferred in units of words or bytes from the data holding unit 44, it may not match the word boundaries or the byte boundaries. However, it is sufficient to access the frame memory 7 twice for each word or byte transferred from the data holding unit 44, and the access frequency can be significantly reduced as compared with the case where the frame memory 7 is accessed for each pixel. . Therefore, the time required for transfer can be reduced, and high-speed drawing processing can be realized.

【0077】上述の例えば図21、図22に示す例で
は、連続した線分を描画する場合を示したが、この実施
の形態においてもこれに限らず、点線や破線、その他の
線種であっても同様に描画することができる。また、線
幅がデータ保持部44の大きさ以上の場合には、例えば
上述の図18で説明したように、いくつかに分割して描
画すればよい。
In the above-mentioned examples shown in FIGS. 21 and 22, for example, continuous line segments are drawn, but this embodiment is not limited to this and may be dotted lines, broken lines, or other line types. However, it can be drawn similarly. If the line width is equal to or larger than the size of the data holding unit 44, it may be divided into several parts and drawn as described above with reference to FIG.

【0078】[0078]

【発明の効果】以上の説明から明らかなように、本発明
によれば、転送単位に合わせて少容量のデータ保持手段
に描画データを一時的に保持し、フレームメモリへ転送
することによって、フレームメモリへのアクセス回数を
減少させることができる。これにより、転送時間を短縮
して、描画処理の高速化を達成することができるという
効果がある。
As is apparent from the above description, according to the present invention, the drawing data is temporarily held in the small-capacity data holding means in accordance with the transfer unit and is transferred to the frame memory. The number of accesses to the memory can be reduced. Thereby, there is an effect that the transfer time can be shortened and the drawing processing can be speeded up.

【0079】特に、請求項1に記載の発明によれば、少
容量の保持部を4つ以上設け、必要に応じて割り当てて
行くことにより、少容量のメモリを効率的に用いて描画
データをフレームメモリへ転送することができ、少容量
のメモリで高速な描画処理を行なうことができる。請求
項2に記載の発明のように保持部に対する領域の割り当
てをワード境界に合わせることによって、ワードごとの
転送が可能になり、高速な描画データの転送を行なうこ
とができる。
In particular, according to the invention described in claim 1, by providing four or more holding units each having a small capacity and allocating the holding units as needed, the drawing data can be efficiently used by using the memory having a small capacity. It can be transferred to the frame memory, and high-speed drawing processing can be performed with a small capacity memory. According to the second aspect of the present invention, by allocating the area to the holding unit at the word boundary, word-by-word transfer becomes possible and high-speed drawing data transfer can be performed.

【0080】また、請求項3に記載の発明によれば、先
にデータ保持手段に描画された描画データを用い、適宜
修正してフレームメモリへの転送を行なうことによっ
て、データ保持手段への描画速度を向上させるととも
に、データ保持手段から転送単位ごとにフレームメモリ
へ描画データを転送することによって、画素ごとにフレ
ームメモリをアクセスする場合に比べて格段にアクセス
回数を減少させることができ、高速な描画処理を実現す
ることができる。
According to the third aspect of the invention, the drawing data previously drawn in the data holding means is used, and the drawing data is drawn into the data holding means by appropriately modifying and transferring to the frame memory. By improving the speed and transferring the drawing data from the data holding unit to the frame memory for each transfer unit, the number of accesses can be markedly reduced as compared with the case of accessing the frame memory for each pixel. Drawing processing can be realized.

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

【図1】 本発明の線分描画装置の第1の実施の形態を
示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a line segment drawing apparatus of the present invention.

【図2】 本発明の線分描画装置の第1の実施の形態に
おける基準線走査部2、距離演算部3、法線ベクトル生
成部4、線分描画部5の具体例を示すブロック図であ
る。
FIG. 2 is a block diagram showing a specific example of a reference line scanning unit 2, a distance calculation unit 3, a normal vector generation unit 4, and a line segment drawing unit 5 in the first embodiment of the line drawing apparatus of the present invention. is there.

【図3】 本発明の線分描画装置の第1の実施の形態に
おける基本的な線分描画動作の説明図である。
FIG. 3 is an explanatory diagram of a basic line segment drawing operation in the first embodiment of the line segment drawing apparatus of the present invention.

【図4】 法線ベクトル生成までの動作の一例の説明図
である。
FIG. 4 is an explanatory diagram of an example of an operation up to generation of a normal vector.

【図5】 移動距離演算部の動作の一例の説明図であ
る。
FIG. 5 is an explanatory diagram of an example of an operation of a movement distance calculation unit.

【図6】 移動距離演算部の動作の一例を示すフローチ
ャートである。
FIG. 6 is a flowchart showing an example of the operation of a moving distance calculation unit.

【図7】 法線ベクトル生成から線分描画までの動作の
一例の説明図である。
FIG. 7 is an explanatory diagram of an example of an operation from normal vector generation to line segment drawing.

【図8】 描画する線分の具体例の説明図である。FIG. 8 is an explanatory diagram of a specific example of a line segment to be drawn.

【図9】 本発明の第1の実施の形態における描画され
た画素の格納および転送処理の一例を示すフローチャー
トである。
FIG. 9 is a flowchart showing an example of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図10】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
である。
FIG. 10 is an explanatory diagram of a specific process of storing and transferring drawn pixels according to the first embodiment of the present invention.

【図11】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 11 is an explanatory diagram (continuation) of a specific process of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図12】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 12 is an explanatory diagram (continuation) of a specific process of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図13】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 13 is an explanatory diagram (continuation) of a specific process of storing and transferring a drawn pixel in the first embodiment of the present invention.

【図14】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 14 is an explanatory diagram (continuation) of a specific process of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図15】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 15 is an explanatory diagram (continuation) of a specific process of storing and transferring a drawn pixel in the first embodiment of the present invention.

【図16】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 16 is an explanatory diagram (continuation) of a specific process of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図17】 本発明の第1の実施の形態における描画さ
れた画素の格納および転送処理の具体的な過程の説明図
(続き)である。
FIG. 17 is an explanatory diagram (continuation) of a specific process of storage and transfer processing of drawn pixels according to the first embodiment of the present invention.

【図18】 本発明の第1の実施の形態において線幅が
1つの保持部に入りきらない場合の線分の一例の説明図
である。
FIG. 18 is an explanatory diagram of an example of a line segment when the line width does not fit into one holding unit according to the first embodiment of the present invention.

【図19】 本発明の第1の実施の形態において線幅が
1つの保持部に入りきらない場合の描画および転送処理
の一例の説明図である。
FIG. 19 is an explanatory diagram of an example of drawing and transfer processing when the line width does not fit into one holding unit according to the first embodiment of the present invention.

【図20】 本発明の線分描画装置の第2の実施の形態
を示すブロック図である。
FIG. 20 is a block diagram showing a second embodiment of a line segment drawing device of the present invention.

【図21】 本発明の線分描画装置の第2の実施の形態
における具体的な動作の一例の説明図である。
FIG. 21 is an explanatory diagram of an example of a specific operation in the second embodiment of the line segment drawing device of the present invention.

【図22】 本発明の線分描画装置の第2の実施の形態
における具体的な動作の一例の説明図(続き)である。
FIG. 22 is an explanatory diagram (continuation) of an example of a specific operation in the second embodiment of the line segment drawing device of the present invention.

【図23】 従来の線分描画方法の一例の説明図であ
る。
FIG. 23 is an explanatory diagram of an example of a conventional line segment drawing method.

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

1…初期値認識部、2…基準線走査部、3…距離演算
部、4…法線ベクトル生成部、5…線分描画部、6…演
算データ転送部、7…フレームメモリ、11…保持部制
御部、12…データ保持部、13…保持部座標演算部、
14…データ転送部、15…データ保持部初期化部、2
1…座標発生部、22…走査座標格納部、23…移動距
離演算部、24…線幅走査判定部、25…90゜回転
部、26…法線ベクトル格納部、27…基準線移動処理
部、28…画素抜け判定部、29…描画部、30…終了
条件判定部、41…描画画素修正部、42…保持部座標
演算部、43…保持部制御部、44…データ保持部、4
5…データ転送部。
1 ... Initial value recognition unit, 2 ... Reference line scanning unit, 3 ... Distance calculation unit, 4 ... Normal vector generation unit, 5 ... Line segment drawing unit, 6 ... Calculation data transfer unit, 7 ... Frame memory, 11 ... Hold Control unit, 12 ... data holding unit, 13 ... holding unit coordinate calculation unit,
14 ... Data transfer unit, 15 ... Data holding unit initialization unit, 2
DESCRIPTION OF SYMBOLS 1 ... Coordinate generation unit, 22 ... Scanning coordinate storage unit, 23 ... Moving distance calculation unit, 24 ... Line width scanning determination unit, 25 ... 90 ° rotation unit, 26 ... Normal vector storage unit, 27 ... Reference line movement processing unit , 28 ... Pixel missing determination unit, 29 ... Drawing unit, 30 ... End condition determination unit, 41 ... Drawing pixel correction unit, 42 ... Holding unit coordinate calculation unit, 43 ... Holding unit control unit, 44 ... Data holding unit, 4
5 ... Data transfer unit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平4−163677(JP,A) 特開 平2−208694(JP,A) 特開 平4−117583(JP,A) 特開 昭57−159389(JP,A) 特開 平1−166177(JP,A) 特開 昭63−195696(JP,A) 特開 昭60−227292(JP,A) 特開 平4−117582(JP,A) 実開 平1−111358(JP,U) (58)調査した分野(Int.Cl.7,DB名) G06T 11/20 G09G 5/36 ─────────────────────────────────────────────────── --- Continuation of the front page (56) References JP-A-4-163677 (JP, A) JP-A-2-208694 (JP, A) JP-A-4-117583 (JP, A) JP-A-57- 159389 (JP, A) JP-A 1-166177 (JP, A) JP-A 63-195696 (JP, A) JP-A 60-227292 (JP, A) JP-A 4-117582 (JP, A) Actual Kaihei 1-111358 (JP, U) (58) Fields investigated (Int.Cl. 7 , DB name) G06T 11/20 G09G 5/36

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力された情報から描画する線分の始点
および終点と該線分の線幅とを出力する初期値設定手段
と、該初期値設定手段から出力された始点と終点とを結
ぶ直線上の座標を生成する基準線発生手段と、該基準線
発生手段で生成された座標と前記始点との間の距離を演
算する距離演算手段と、該距離演算手段での演算結果と
前記基準線発生手段で生成した座標とを基に前記始点と
終点とを結ぶ直線に直交しかつ前記初期値設定手段から
出力された線分の線幅と等しい長さを有する画素列を生
成する法線ベクトル生成手段と、前記基準線発生手段で
生成された座標ごとに前記法線ベクトル生成手段で生成
された画素列を発生させる描画手段と、該描画手段によ
って発生した画素列を一時保持するための複数の保持部
を有するデータ保持手段と、描画された画像を格納する
フレームメモリと、前記保持部が対応する前記フレーム
メモリ上の位置を演算する保持部座標演算手段と、前記
描画手段によって得られた画素列の座標と前記保持部座
標演算手段による前記保持部の位置情報から前記保持部
を設定または選択する保持部制御手段と、データを格納
し終えた前記保持部から前記フレームメモリに順に転送
するデータ転送手段と、該データ転送手段によって転送
し終えた前記保持部をクリアするデータ保持部初期化手
段を有することを特徴とする線分描画装置。
1. An initial value setting means for outputting a start point and an end point of a line segment drawn from the input information and a line width of the line segment, and a start point and an end point output from the initial value setting means. Reference line generating means for generating coordinates on a straight line, distance calculating means for calculating a distance between the coordinates generated by the reference line generating means and the starting point, a calculation result by the distance calculating means and the reference A normal line that is orthogonal to a straight line connecting the start point and the end point based on the coordinates generated by the line generation means and that generates a pixel column having a length equal to the line width of the line segment output from the initial value setting means Vector generation means, drawing means for generating the pixel row generated by the normal vector generation means for each coordinate generated by the reference line generation means, and temporarily holding the pixel row generated by the drawing means Data holding with multiple holding units Means, a frame memory for storing the drawn image, a holding portion coordinate calculating means for calculating the corresponding position on the frame memory by the holding portion, the coordinates of the pixel row obtained by the drawing means, and the holding A holding unit control unit that sets or selects the holding unit based on positional information of the holding unit by the partial coordinate calculation unit, a data transfer unit that sequentially transfers data from the holding unit that has stored data to the frame memory, and the data. A line segment drawing apparatus having a data holding unit initialization unit that clears the holding unit that has been transferred by the transfer unit.
【請求項2】 前記フレームメモリは1ワードに複数画
素を格納するように構成されており、前記保持部は前記
フレームメモリのワード境界に基づいてその位置が設定
され、前記データ転送手段はワードごとに転送を行なう
ことを特徴とする請求項1に記載の線分描画装置。
2. The frame memory is configured to store a plurality of pixels in one word, the holding unit has its position set based on a word boundary of the frame memory, and the data transfer unit sets each word. The line segment drawing device according to claim 1, wherein the line segment drawing device transfers the data to the line segment.
【請求項3】 入力された情報から描画する線分の始点
および終点と該線分の線幅とを出力する初期値設定手段
と、該初期値設定手段から出力された始点と終点とを結
ぶ直線上の座標を生成する基準線発生手段と、該基準線
発生手段で生成された座標と前記始点との間の距離を演
算する距離演算手段と、該距離演算手段での演算結果と
前記基準線発生手段で生成した座標とを基に前記始点と
終点とを結ぶ直線に直交しかつ前記初期値設定手段から
出力された線分の線幅と等しい長さを有する画素列を生
成する法線ベクトル生成手段と、前記基準線発生手段で
生成された座標ごとに前記法線ベクトル生成手段で生成
された画素列を発生させる描画手段と、該描画手段によ
って発生した画素列を一時格納するデータ保持手段と、
描画された画像を格納するフレームメモリと、前記デー
タ保持手段が対応する前記フレームメモリ上の位置を演
算する保持部座標演算手段と、新たに描画しようとする
画素列の座標とすでに前記データ保持手段に格納してい
る画素列の座標を比較及び修正して新たに描画しようと
する画素列と等しくさせる描画画素修正手段と、前記描
画手段で発生した画素列に基づいて前記データ保持手段
へのデータの格納または格納データの修正の終了判定を
行なう保持部制御手段と、前記データ保持手段に格納ま
たは修正し終えたデータを前記フレームメモリに転送す
るデータ転送手段を有することを特徴とする線分描画装
置。
3. An initial value setting means for outputting a start point and an end point of a line segment drawn from the input information and a line width of the line segment, and a start point and an end point output from the initial value setting means. Reference line generating means for generating coordinates on a straight line, distance calculating means for calculating a distance between the coordinates generated by the reference line generating means and the starting point, a calculation result by the distance calculating means and the reference A normal line that is orthogonal to a straight line connecting the start point and the end point based on the coordinates generated by the line generation means and that generates a pixel column having a length equal to the line width of the line segment output from the initial value setting means Vector generation means, drawing means for generating the pixel row generated by the normal vector generation means for each coordinate generated by the reference line generation means, and data holding for temporarily storing the pixel row generated by the drawing means Means and
A frame memory that stores a drawn image, a holding unit coordinate calculation unit that calculates a position on the frame memory corresponding to the data holding unit, a coordinate of a pixel row to be newly drawn, and the data holding unit. Drawing pixel correction means for comparing and correcting the coordinates of the pixel row stored in the pixel row to be newly drawn and data to the data holding means based on the pixel row generated by the drawing means Holding section control means for determining the end of storage or correction of stored data, and data transfer means for transferring data stored or modified in the data holding means to the frame memory. apparatus.
JP1732696A 1996-02-02 1996-02-02 Line drawing device Expired - Fee Related JP3496381B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1732696A JP3496381B2 (en) 1996-02-02 1996-02-02 Line drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1732696A JP3496381B2 (en) 1996-02-02 1996-02-02 Line drawing device

Publications (2)

Publication Number Publication Date
JPH09212665A JPH09212665A (en) 1997-08-15
JP3496381B2 true JP3496381B2 (en) 2004-02-09

Family

ID=11940931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1732696A Expired - Fee Related JP3496381B2 (en) 1996-02-02 1996-02-02 Line drawing device

Country Status (1)

Country Link
JP (1) JP3496381B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2717224A4 (en) * 2011-05-30 2014-11-19 Aisin Seiki Rendering device, rendering method, and program

Also Published As

Publication number Publication date
JPH09212665A (en) 1997-08-15

Similar Documents

Publication Publication Date Title
KR970008546B1 (en) Character or graphic processing method
JPH08297737A (en) Method and apparatus for clipping of arbitrary graphic
US4972330A (en) Clipping process and processor
KR19980032753A (en) Character processing unit and processing method
JP3496381B2 (en) Line drawing device
JP2982973B2 (en) Pattern filling method
US5475809A (en) Method and apparatus for generating high-quality character pattern defined by edge lines
JP2770582B2 (en) Figure filling device
JP3774494B2 (en) Data storage device
JPH0263854A (en) Output device
JPS63305478A (en) Pattern information restoring device
JP3555316B2 (en) Drawing device
JP3731221B2 (en) Thick line drawing apparatus and thick line drawing method
JPH056439A (en) Vector data/image data conversion system
JP3791203B2 (en) Image processing device
JPS59188761A (en) Write system of picture memory
US7015923B2 (en) Apparatus for painting figure
JP2806790B2 (en) Character generator and method
JP3645614B2 (en) Drawing data optimization method
JP3089906B2 (en) Drawing equipment
JPH04329482A (en) Image rotation processing method and processing device for relevant method
JP2637921B2 (en) Character symbol generator
KR970002108B1 (en) Laser-printer bit map font
JP2782904B2 (en) Polygon fill method
JP2710131B2 (en) Character processing apparatus and method

Legal Events

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

Free format text: PAYMENT UNTIL: 20071128

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081128

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091128

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees