JP2008027350A - Thick line drawing processing method and processing device - Google Patents

Thick line drawing processing method and processing device Download PDF

Info

Publication number
JP2008027350A
JP2008027350A JP2006202063A JP2006202063A JP2008027350A JP 2008027350 A JP2008027350 A JP 2008027350A JP 2006202063 A JP2006202063 A JP 2006202063A JP 2006202063 A JP2006202063 A JP 2006202063A JP 2008027350 A JP2008027350 A JP 2008027350A
Authority
JP
Japan
Prior art keywords
vertex
polygon
line
thick line
vertices
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.)
Withdrawn
Application number
JP2006202063A
Other languages
Japanese (ja)
Inventor
Satoyuki Furuya
智行 古谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2006202063A priority Critical patent/JP2008027350A/en
Publication of JP2008027350A publication Critical patent/JP2008027350A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To obtain stable thickness without influence on the positions and tilts of thick line drawing data by converting thick line data to polygon-solid data and further by converting this converted data to polygon-solid data with new vertexes added thereto to apply quantization in subsequent bitmap development. <P>SOLUTION: A thick line drawing processing device is composed of; a polygon vertex data generation part which converts thick line data to polygon-solid data; an additional vertex data generation part which adds a vertex to maintain a stable thick line; and a new polygon data generation part which generates new polygon-solid data. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、パーソナルコンピュータなどの情報処理システムにおいて、たとえばディスプレイやプリンタにおいて線幅のある線を描画する際に使用される太線描画処理に関するものである。   The present invention relates to a thick line drawing process used in an information processing system such as a personal computer, for example, when a line having a line width is drawn on a display or a printer.

従来、線幅のある線を描画する際の太線描画処理としては、図1(a)に示すようなブレゼンハム等のDDA(Digital Differential Analyzer)アルゴリズムに基づき、1画素分の線幅を有する直線を線幅に応じて複数本描画することにより実現していた。しかしながらこのDDAアルゴリズムは高速ではあるが、線の角度によって処理を変える必要があったり、線が曲線になるとその都度変位の計算を行ったり、折れ線の接続部に対して特別な処理を行ったりと、処理が煩雑になりやすい。   Conventionally, as a thick line drawing process when drawing a line having a line width, a straight line having a line width of one pixel is based on a DDA (Digital Differential Analyzer) algorithm such as Bresenham as shown in FIG. This was realized by drawing a plurality of lines according to the line width. However, although this DDA algorithm is high-speed, it is necessary to change the processing according to the angle of the line, calculate the displacement each time the line becomes a curve, or perform special processing on the connection part of the broken line. The process tends to be complicated.

また、描画オブジェクトをビットマップに展開する際に、描画オブジェクトを順に重ねて展開するレンダリング方式であるペインターズアルゴリズムを使用するならば問題ないが、全描画オブジェクトのエッジを抽出し、y軸方向にソートし、スキャンライン単位で展開するレンダリング方式であるスキャンラインアルゴリズムに対しては、エッジの抽出が出来ずに適応出来なかった。   Also, when developing a drawing object into a bitmap, there is no problem if you use the Painter's algorithm, which is a rendering method that unfolds drawing objects one after another. It was impossible to adapt to the scanline algorithm, which is a rendering method that sorts and develops in units of scanlines, because edges cannot be extracted.

そのため、近年CPUの高速化等の要因を受け、図1(b)に示すように、まず入力された始点および終点と線幅から太線の頂点を計算し、その後、その頂点を塗りの頂点とみなして多角形の塗りつぶし処理を行うことで太線の描画を行うことが一般的である。   Therefore, in recent years due to factors such as CPU speedup, as shown in Fig. 1 (b), first calculate the vertex of the thick line from the input start point and end point and the line width, and then use that vertex as the fill vertex. It is common to draw a thick line by performing a polygon filling process.

これにより、線の特別なレンダリング処理を用意する必要がなくなっている。   This eliminates the need for a special line rendering process.

従来例としては、例えば特許文献1をあげることが出来る。
特開平08-279038号公報
For example, Patent Literature 1 can be cited as a conventional example.
JP 08-279038 A

しかしながら多角形の塗りつぶし処理で斜線描画を行う場合、太線の太さが安定しないという課題がある。これにより図2に示すように、斜線が平行に並んだ場合等に意図しない模様が現れてきてしまう。   However, there is a problem that the thickness of the thick line is not stable when the oblique line is drawn by the polygon filling process. As a result, as shown in FIG. 2, an unintended pattern appears when diagonal lines are arranged in parallel.

この現象を簡潔に説明する。   This phenomenon will be briefly explained.

図3(a)に示すような線幅Wの斜線を描画する場合、横軸に平行な線に求められる長さは線分a-bとの角度をθとすると、線幅W / Cosinθ となる( 図3(b) )。量子化の際には各横軸方向にこの大きさの分だけのPixelが塗られることが期待されるが、Pixelは数という整数しか取れない。   When drawing an oblique line with a line width W as shown in FIG. 3A, the length required for a line parallel to the horizontal axis is line width W / Cosinθ, where θ is the angle with the line segment ab ( FIG. 3 (b)). When quantizing, it is expected that pixels of this size will be applied in each horizontal axis direction, but Pixel can only take an integer number.

そのため、横軸方向のPixel数としては、線幅W / Cosθの小数点以下を切り捨てた整数値と切り上げた整数値が混在させることが望ましいが、多角形の塗りつぶし処理ではその混在が均等にならず図3(c)で示すように偏りやすい。   Therefore, as the number of pixels in the horizontal axis direction, it is desirable to mix integer values rounded down to the nearest whole number of the line width W / Cosθ, but rounded up integer values are mixed. It tends to be biased as shown in FIG.

そしてそのような線を平行に並べて模様を作成する場合、図2に示すような意図しない模様が現れてきてしまう。   When creating a pattern by arranging such lines in parallel, an unintended pattern as shown in FIG. 2 appears.

本発明による太線描画処理方法および処理装置は上記課題を解決すべく発明されたものであり、始点と終点、および線幅で指定される太線に対し、始点と終点および線幅から多角形の頂点を計算し、その多角形の塗りつぶし処理によって太線を描画する処理において、
始点から導かれる2個の頂点の近傍に、水平座標あるいは垂直座標が同一で間隔が整数値であるような新たな2個の頂点を追加する第一の頂点追加手段と、
終点から導かれる2個の頂点の近傍に、水平座標あるいは垂直座標が同一で間隔が整数値であるような新たな2個の頂点を追加する第二の頂点追加手段と、
前記始点から導かれる2個の頂点と前記終点から導かれる2個の頂点と、前記第一の頂点追加手段により追加された2個の頂点と、前記第二の頂点追加手段により追加された2個の頂点を結び、新たな多角形を作成する多角形作成手段を有し、
前記多角形作成手段により作成された多角形を塗りつぶすことで太線描画を行うことを特徴とする。
The thick line drawing processing method and processing apparatus according to the present invention have been invented in order to solve the above-mentioned problems. For a thick line designated by a start point, an end point, and a line width, a vertex of a polygon is determined from the start point, the end point, and the line width. In the process of drawing a thick line by filling the polygon,
A first vertex adding means for adding two new vertices having the same horizontal coordinate or vertical coordinate and an interval of an integer value in the vicinity of the two vertices derived from the start point;
A second vertex adding means for adding two new vertices having the same horizontal coordinate or vertical coordinate and the interval being an integer value in the vicinity of the two vertices derived from the end point;
Two vertices derived from the start point, two vertices derived from the end point, two vertices added by the first vertex addition means, and 2 added by the second vertex addition means It has a polygon creation means that connects the vertices and creates a new polygon,
A thick line is drawn by painting the polygon created by the polygon creating means.

この発明によれば、多角形の塗りつぶし処理によりなされるビットマップ展開で作成される太線の太さは始点や終点の座標に依存せず、また均一となるため、太線が平行に並んだ描画データであっても意図しない模様が生成されることなく、また安定した太さの太線描画を提供することが出来る。   According to the present invention, since the thickness of the thick line created by the bitmap development performed by the polygon filling process does not depend on the coordinates of the start point and the end point and is uniform, the drawing data in which the thick lines are arranged in parallel However, an unintended pattern is not generated, and a thick line drawing with a stable thickness can be provided.

以下、添付図面に従って本発明に係わる実施例を詳細に説明する。   Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

図4は本発明である太線描画処理方法および処理装置が適用される情報処理システムの構成の一例を示すブロック図である。   FIG. 4 is a block diagram showing an example of the configuration of an information processing system to which the thick line drawing processing method and processing apparatus according to the present invention are applied.

図4は入力装置1からホスト装置2に対する指示が行われ、それに応じて表示装置6での表示あるいは印刷装置8での印刷が行われるまでの概念図をあらわす。   FIG. 4 shows a conceptual diagram until an instruction is given from the input device 1 to the host device 2 and display on the display device 6 or printing on the printing device 8 is performed accordingly.

入力装置1を使用して、ホスト装置2のOS3上で動作するアプリケーション4で太線データが作成され、ディスプレイドライバ5により本発明による太線描画処理が行われ、その結果が表示装置6にて表示される。あるいはアプリケーション4で作成された太線データに対し、プリンタドライバ7により本発明による太線描画処理が行われ、その結果が印刷装置8にて印刷される。あるいはプリンタドライバ7により、太線データのPDLコマンドが作成され、印刷装置8により太線データのPDLコマンドに対して本発明による太線描画処理が行われ、その結果が印刷装置8により印刷される。   Using the input device 1, thick line data is created by the application 4 running on the OS 3 of the host device 2, and the thick line drawing processing according to the present invention is performed by the display driver 5, and the result is displayed on the display device 6. The Alternatively, a thick line drawing process according to the present invention is performed on the thick line data created by the application 4 by the printer driver 7, and the result is printed by the printing device 8. Alternatively, a PDL command for thick line data is created by the printer driver 7, and a thick line drawing process according to the present invention is performed on the PDL command for thick line data by the printing device 8, and the result is printed by the printing device 8.

図5は、本発明の特徴を最もよくあらわす構成図であり、太線データに対し本発明である太線描画処理を行うディスプレイドライバ5あるいはプリンタドライバ7あるいは印刷装置8の中に構成される。   FIG. 5 is a configuration diagram that best represents the features of the present invention, and is configured in the display driver 5, the printer driver 7, or the printing device 8 that performs the bold line drawing process according to the present invention on the thick line data.

太線データが渡されると、その始点終点および線幅から多角形頂点データ生成部9により、公知技術である多角形の頂点抽出方法により多角形の頂点データが生成される。その詳細は図6の説明の際に行う。   When the bold line data is passed, polygon vertex data is generated by the polygon vertex data generation unit 9 from the start point and end point and the line width by the polygon vertex extraction method which is a known technique. The details will be described in the description of FIG.

そこで生成された多角形の頂点データから、追加頂点データ生成部10により、それぞれの多角形の頂点データの近傍に追加頂点データが生成される。その詳細は図7(a)の説明の際に行う。   The additional vertex data generation unit 10 generates additional vertex data in the vicinity of the vertex data of each polygon from the polygon vertex data generated there. Details thereof will be described in the description of FIG.

その後、多角形頂点データおよび、追加頂点データから新多角形データ生成部11により新たな多角形が生成される。その詳細は図7(b)の説明の際に行う。   Thereafter, a new polygon is generated by the new polygon data generation unit 11 from the polygon vertex data and the additional vertex data. Details thereof will be described in the description of FIG.

ここで作成された新たな多角形を多角形塗りデータとしておくと、その後レンダリングによりBitmap展開が行われる際に、太線データの位置座標により太さの変わることのない、さらに線の太さが一定の結果を得ることが出来る。   If the new polygon created here is used as polygon fill data, the thickness of the line will not change depending on the position coordinates of the thick line data when the bitmap is expanded by rendering. The result can be obtained.

図6は、多角形頂点データ生成部9において太線データの始点、終点および線幅から如何に多角形の頂点データが導き出せるかを示したものであり、これは公知技術である。まず、始点終点を結ぶ線分のベクトルを求め、それと直交するベクトルを求める。図6の頂点Aと頂点Bは始点から求められ、始点から直交するベクトル方向に線幅/2 だけ進めたところを頂点A、ベクトルの逆方向に線幅/2だけ進めたところが頂点Bとなる。図6の頂点Cと頂点Dも終点から同様に求めることが出来る。   FIG. 6 shows how polygon vertex data can be derived from the start point, end point and line width of the thick line data in the polygon vertex data generation unit 9, which is a known technique. First, a vector of a line segment connecting the start point and the end point is obtained, and a vector orthogonal thereto is obtained. The vertex A and vertex B in FIG. 6 are obtained from the starting point, and the vertex A is obtained by advancing by the line width / 2 in the vector direction orthogonal to the starting point, and the vertex B is obtained by advancing the line width / 2 in the opposite direction of the vector. . The vertex C and vertex D in FIG. 6 can be similarly obtained from the end point.

ここで求められた頂点A,頂点B、頂点C、頂点Dを順に結ぶことで多角形が完成する。   The polygon is completed by connecting the vertex A, vertex B, vertex C, and vertex D obtained in this order.

もちろん太線データが1本の線分でなく複数の線分から構成され、1本目の線分の終点が2本目の線分の始点とみなし、2本目の始点と終点から多角形の頂点をそれぞれ求める作業を全線分に対して行い、そこで抽出された頂点をすべて結んでも同様であり、多角形が作成される。   Of course, the thick line data is composed of multiple line segments instead of one line segment, the end point of the first line segment is regarded as the start point of the second line segment, and the vertex of the polygon is calculated from the start point and end point of the second line respectively. This is the same even if the operation is performed on all the line segments and all the extracted vertices are connected there, and a polygon is created.

ここで、線分の始点終点の形状(円あるいは四角など)あるいは線分同士の接続部の形状(円やマイター)等は後から付け加えることも可能であり、容易に多角形の頂点に加えることが出来る。本実施形態では、この形状に対してまったく影響を受けないため、あえてその説明は割愛する。   Here, the shape of the start point and end point of the line segment (circle or square) or the shape of the connection part between the line segments (circle or miter) can be added later, and can be easily added to the vertex of the polygon. I can do it. In the present embodiment, since this shape is not affected at all, the description is omitted.

図7は本実施例による最も特徴的な処理に対する具体例を示したものである。   FIG. 7 shows a specific example for the most characteristic processing according to this embodiment.

図7(a)は追加頂点データ生成部での処理を説明している。多角形頂点データ生成部9により始点から導かれた頂点を頂点A、頂点Bとすると、追加頂点データ作成部10により頂点Aの近傍に追加頂点aが作成され、頂点Bの近傍に追加頂点bが作成される。この時の追加頂点aと追加頂点bは垂直座標が一致しており、2つの追加頂点の間隔が整数値という二つの特徴を持つ。   FIG. 7 (a) illustrates the processing in the additional vertex data generation unit. Assuming that the vertexes derived from the starting point by the polygon vertex data generation unit 9 are the vertex A and the vertex B, the additional vertex data creation unit 10 creates an additional vertex a near the vertex A, and the additional vertex b near the vertex B. Is created. At this time, the additional vertex a and the additional vertex b have the same vertical coordinate, and the two additional vertices have two features that are integer values.

上記2つの特徴を持つ座標の求め方は多様であり、求め方自体は重要ではないが、本実施例では以下のようにして2つの特徴を持つ追加頂点の座標を求めている。   There are various ways of obtaining the coordinates having the above two features, and the manner of obtaining itself is not important, but in this embodiment, the coordinates of the additional vertex having the two features are obtained as follows.

1:太線の始点から終点までのベクトル dx/dyを求める
2:頂点Aからベクトル方向で最初の整数の垂直座標、およびそれに対応する水平座標を求め,これを仮の追加頂点aとする。
1: Obtain the vector dx / dy from the start point to the end point of the thick line. 2: Obtain the first integer vertical coordinate in the vector direction from the vertex A and the corresponding horizontal coordinate, and use this as the provisional additional vertex a.

3:頂点bからベクトル方向で、仮の追加頂点aの垂直b座標と同一の座標および対応する水平座標を求め、これを仮の追加頂点bとする。     3: The same coordinate as the vertical b coordinate of the temporary additional vertex a and the corresponding horizontal coordinate in the vector direction from the vertex b are obtained, and this is set as the temporary additional vertex b.

4:仮の追加頂点aと仮の追加頂点bの距離を計算し、整数値でない場合は四捨五入にて整数値を求め誤差を算出し、その誤差に対して均等に仮の追加頂点a、仮の追加頂点bを水平移動させ、それにより追加頂点a、追加頂点bを決める。     4: The distance between the provisional additional vertex a and the provisional additional vertex b is calculated, and if it is not an integer value, an integer value is calculated by rounding off, and an error is calculated. The additional vertex b is horizontally moved, thereby determining the additional vertex a and the additional vertex b.

これらは、多角形頂点データ生成部9により終点から導かれた頂点C、頂点Dの近傍に作成される追加頂点C、追加頂点Dに対しても同様の処理となる。   These are the same processing for the vertex C and the additional vertex C created in the vicinity of the vertex D derived from the end point by the polygon vertex data generation unit 9.

図7(b)は新多角形データ生成部12での処理を説明している。多角形頂点データ生成部9と追加頂点データ生成部10により生成された頂点ABCD、追加頂点abcdを結ぶ順番を決める処理であり、決め方は、各頂点と近傍に位置する各追加頂点を結ぶ線が交差しないようにしたものである。   FIG. 7B illustrates the processing in the new polygon data generation unit 12. This is a process for determining the order of connecting the vertex ABCD generated by the polygon vertex data generation unit 9 and the additional vertex data generation unit 10 and the additional vertex abcd. The determination method is a line connecting each vertex and each additional vertex located in the vicinity. It is designed not to cross.

1つの線分では交差しないような点順で多角形の座標データを決めていくが、複数の線分により太線が構成されている場合は、必ずしも交差しないわけではない。この場合は前の線分の終点から導かされた頂点と次の線分の始点から導かれた頂点を結ぶという、公知の複数線分をもつときの処理と同様である。   Polygonal coordinate data is determined in a dot order that does not intersect with one line segment. However, when a thick line is composed of a plurality of line segments, it does not necessarily intersect. In this case, the processing is the same as that in the case of having a known plurality of line segments in which the vertex derived from the end point of the previous line segment and the vertex derived from the start point of the next line segment are connected.

図7(c)は、新多角形データ生成部11により生成された多角形塗りつぶしデータを塗りつぶしたときに、具体的にどのようなPixelに落ちるかをしめす。図7(c)で表現されているように、追加頂点a,b,c,dで挟まれたエリアは水平スキャン方向に同数のpixelが置かれ、この数は追加頂点データ生成部10で求めた整数値と同じ値となる。また、太線の位置の影響を受けて太さが変わることもない。   FIG. 7C shows a specific pixel when the polygon fill data generated by the new polygon data generation unit 11 is filled. As shown in FIG. 7C, the same number of pixels are placed in the horizontal scan direction in the area between the additional vertices a, b, c, and d, and this number is obtained by the additional vertex data generation unit 10. The same value as the integer value. Also, the thickness does not change under the influence of the position of the thick line.

また、2つの頂点とその近傍に作成された2つの追加頂点で囲まれた領域にて発生するpixel数は不定であるが、ここの領域は太線の幅を示す訳ではなくPixel数も少ないため太線描画の品質に影響を与えるものではない。   In addition, the number of pixels generated in the area surrounded by two vertices and two additional vertices created in the vicinity is indefinite, but this area does not indicate the width of the bold line and the number of pixels is small. It does not affect the quality of bold line drawing.

また、頂点の近傍に作成される追加頂点と元の頂点との距離が近ければ近いほど、不定なpixelを減らすことが出来る。   In addition, as the distance between the added vertex created in the vicinity of the vertex and the original vertex is shorter, the number of undefined pixels can be reduced.

図6、図7においては追加頂点の垂直座標を一致させる場合の実施例を記載してきたが、太線の始点と終点を結ぶベクトルの角度に応じて、場合によっては追加頂点の水平座標を一致させる場合も存在する。   6 and 7, an example in which the vertical coordinates of the additional vertices are matched has been described. However, depending on the angle of the vector connecting the start point and the end point of the thick line, the horizontal coordinates of the additional vertices may be matched in some cases There are cases.

図8は、その例を表したものであり、45度の角度を境にベクトルの向きが水平方向に寝ていれば、水平座標を一致させる、つまり図6、図7にて実施例の説明したことを90度置き換えて処理を行えばよい。   FIG. 8 shows an example of this, and if the direction of the vector lies in the horizontal direction with an angle of 45 degrees as a boundary, the horizontal coordinates are matched, that is, the embodiment is described with reference to FIGS. This can be done by replacing 90 degrees.

45度の角度を境にベクトルの向きが垂直方向に立っていれば、実施例の説明どおりに処理を行えばよい。   If the direction of the vector stands in the vertical direction with an angle of 45 degrees as a boundary, the processing may be performed as described in the embodiment.

この処理は、太線が水平線、垂直線の場合でも同様に成立し、太線の線幅が位置座標に影響されて変わることの無いように処理を行うことが出来る。   This process is similarly established even when the thick line is a horizontal line or a vertical line, and the process can be performed so that the line width of the thick line is not affected by the position coordinates.

太線描画処理方法は図9に示される太線描画処理のフローチャートに基づいてプログラム化されたものである。以下、図9のフローチャートを参照しながら本発明に係る太線描画処理方法について説明する。   The thick line drawing processing method is programmed based on the flowchart of the thick line drawing process shown in FIG. Hereinafter, the thick line drawing processing method according to the present invention will be described with reference to the flowchart of FIG.

一つの線分が始点終点で表され、複数の線分が存在し、さらに線幅が指定されるような太線データに対し、9−1にて線分を取り出し、その線分に対し始点、終点座標を抽出する。次に9−2において、多角形頂点データ生成部9により多角形の頂点を計算し、9−3にて線分の始点、終点座標から変異(ベクトルの向き)を計算する。   One line segment is represented by the start and end points, multiple line segments exist, and for thick line data for which the line width is specified, the line segment is extracted at 9-1, and the start point for the line segment is Extract end point coordinates. Next, in 9-2, the polygon vertex data generation unit 9 calculates the vertex of the polygon, and in 9-3, the mutation (vector direction) is calculated from the start point and end point coordinates of the line segment.

この傾きが45度を境にして水平線より垂直線に近い場合は(9−4)、図7(a)で説明したとおり、9−5にて頂点からベクトル方向で最初の整数となる垂直座標、対応する水平座標で仮の追加頂点を求め、9−6にて同一垂直座標上にもう一方の頂点からの仮の追加頂点を求め、9−7にて2点の仮の追加頂点の間隔が整数になるように水平座標を更新する。この9−5、9−6、9−7のステップは追加頂点データ生成部10で行なわれ、線分の始点から導かれる頂点、終点から導かれる頂点に対し行なわれる。   When this inclination is closer to the vertical line than the horizontal line at 45 degrees as a boundary (9-4), as explained in FIG. 7A, the vertical coordinate that becomes the first integer in the vector direction from the vertex at 9-5 Then, a temporary additional vertex is obtained at the corresponding horizontal coordinate, a temporary additional vertex from the other vertex is obtained on the same vertical coordinate at 9-6, and the interval between the two temporary additional vertices is obtained at 9-7. Update the horizontal coordinates so that becomes an integer. Steps 9-5, 9-6, and 9-7 are performed by the additional vertex data generation unit 10, and are performed on the vertexes derived from the start point and the end point of the line segment.

9−4にてベクトルの傾きが45度を境にして垂直線より水平に近い場合は、図8で説明したとおり、ステップ9−5、9−6、9−7の水平座標と垂直座標を置き換えた処理を9−8、9−9、9−10にて行う。   If the vector inclination is closer to the horizontal than the vertical line at 9-4 in 9-4, the horizontal and vertical coordinates in steps 9-5, 9-6, and 9-7 are set as described with reference to FIG. The replaced process is performed at 9-8, 9-9, and 9-10.

任意の線分に対して、9−7あるいは9−10で追加頂点が求められると、9−11において、太線データ内の全ての線分に対して処理を行ったかを判断し、まだ処理を行っていない線分が存在している場合は9−1へ戻り、処理を繰り返す。   When an additional vertex is obtained in 9-7 or 9-10 for an arbitrary line segment, it is determined in 9-11 whether all line segments in the thick line data have been processed. If there is a line segment that has not been performed, the process returns to 9-1 and the process is repeated.

このとき、線分毎に9−5、9−6、9−7にて処理が行われるか9−8、9−9、9−10にて処理が行われるかが切り替わる。   At this time, whether the processing is performed at 9-5, 9-6, and 9-7 or the processing is performed at 9-8, 9-9, and 9-10 is switched for each line segment.

9−11において太線データ内の全ての線分に対して処理が行われると、太線と幅から求められる頂点座標、および頂点座標から求められる追加頂点座標が存在し、9−12において、元の頂点と追加頂点から新たな多角形図形が作成され、本太線描画処理は完了する。   When processing is performed on all line segments in the thick line data in 9-11, there are vertex coordinates obtained from the thick line and the width, and additional vertex coordinates obtained from the vertex coordinates. In 9-12, the original vertex coordinates are obtained. A new polygonal figure is created from the vertex and the additional vertex, and the bold line drawing process is completed.

〔他の実施例〕
本実施例では、太線データに対して本太線描画処理を適応しているが、多角形塗りつぶしデータに対しても適応することが出来る。その場合、図5における多角形頂点データ生成部9は必要なく、その代わり、多角形の頂点から求められる輪郭線が平行かどうかを判断する判断部が必要となり、平行と判断された場合は追加頂点データ生成部10、新多角形データ生成部11を経由して新たな多角形塗りつぶしデータを作成することになる。この場合の効果は本実施例と同じであり、位置座標に影響されない、安定した幅の塗りつぶし結果を提供することが出来る。
[Other Examples]
In the present embodiment, the bold line drawing process is applied to the thick line data, but it can also be applied to polygon fill data. In that case, the polygon vertex data generation unit 9 in FIG. 5 is not necessary, and instead, a determination unit that determines whether or not the contours obtained from the polygon vertices are parallel is necessary. New polygon fill data is created via the vertex data generation unit 10 and the new polygon data generation unit 11. The effect in this case is the same as that of the present embodiment, and a stable width filling result that is not affected by the position coordinates can be provided.

公知の技術である、太線を描画する際の2つの処理方法を説明したものである。Two processing methods for drawing a thick line, which are known techniques, are described. 公知の多角形塗りつぶしによる太線描画処理方法を使用した際に、その太線が平行に並ぶと意図しない模様がでるという課題の実例を示したものである。When using the well-known method for drawing a thick line by polygon filling, an example of a problem that an unintended pattern appears when the thick lines are arranged in parallel is shown. 図2において意図しない模様が出る理由を、説明したものである。The reason why an unintended pattern appears in FIG. 2 is explained. 本実施例の太線描画処理方法が適用される情報処理システムの構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the information processing system to which the thick line drawing processing method of a present Example is applied. 本発明の実施例の太線描画全体構成を示すブロック図である。It is a block diagram which shows the thick line drawing whole structure of the Example of this invention. 公知の多角形塗りつぶしによる太線描画処理方法において、どのように太線データが多角形塗りつぶしデータに変換できるかを説明したものである。This is a description of how a thick line data can be converted into polygon fill data in a known thick line drawing processing method by polygon fill. 本発明の実施例の太線描画全体構成を示すブロック図において、追加頂点データ生成部10、新多角形データ生成部11の具体的な処理内容、および本発明である太線描画処理方法を使用することでBitmap化された時にどのようなPixelに太線データが展開されるかを説明したものである。In the block diagram showing the entire bold line drawing configuration of the embodiment of the present invention, the specific processing contents of the additional vertex data generation unit 10 and the new polygon data generation unit 11 and the thick line drawing processing method of the present invention are used. This is an explanation of what kind of Pixel the thick line data is expanded when converted to Bitmap. 太線のベクトル方向に応じて図6、図7の説明の水平、垂直が入れ替わる場合があり、入れ替える場合の考え方を示したものである。The horizontal and vertical descriptions in FIGS. 6 and 7 may be interchanged depending on the vector direction of the thick line, and the concept of the interchange is shown. 本発明に係る画像処理装置の画像処理方法の一実施例をあらわすフローチャートである。3 is a flowchart showing an embodiment of an image processing method of the image processing apparatus according to the present invention.

符号の説明Explanation of symbols

1 入力装置
2 ホスト装置
3 OS
4 アプリケーション
5 ディスプレイドライバ
6 表示装置
7 プリンタドライバ
8 印刷装置
9 多角形頂点データ生成部
10 追加頂点データ生成部
11 新多角形データ生成部
1 Input device 2 Host device 3 OS
4 Application 5 Display Driver 6 Display Device 7 Printer Driver 8 Printing Device 9 Polygon Vertex Data Generation Unit 10 Additional Vertex Data Generation Unit 11 New Polygon Data Generation Unit

Claims (4)

始点と終点、および線幅で指定される太線に対し、始点と終点および線幅から多角形の頂点を計算し、その多角形の塗りつぶし処理によって太線を描画する処理において、
始点から導かれる2個の頂点の近傍に、水平座標あるいは垂直座標が同一で間隔が整数値であるような新たな2個の頂点を追加する第一の頂点追加手段と、
終点から導かれる2個の頂点の近傍に、水平座標あるいは垂直座標が同一で間隔が整数値であるような新たな2個の頂点を追加する第二の頂点追加手段と、
前記始点から導かれる2個の頂点と前記終点から導かれる2個の頂点と、前記第一の頂点追加手段により追加された2個の頂点と、前記第二の頂点追加手段により追加された2個の頂点を結び、新たな多角形を作成する多角形作成手段を有し、
前記多角形作成手段により作成された多角形を塗りつぶすことで太線描画を行うことを特徴とする太線描画処理装置。
For the thick line specified by the start point, end point, and line width, calculate the vertex of the polygon from the start point, end point, and line width, and draw the thick line by filling the polygon.
A first vertex adding means for adding two new vertices having the same horizontal coordinate or vertical coordinate and an interval of an integer value in the vicinity of the two vertices derived from the start point;
A second vertex adding means for adding two new vertices having the same horizontal coordinate or vertical coordinate and the interval being an integer value in the vicinity of the two vertices derived from the end point;
Two vertices derived from the start point, two vertices derived from the end point, two vertices added by the first vertex addition means, and 2 added by the second vertex addition means It has a polygon creation means that connects the vertices and creates a new polygon,
A thick line drawing processing apparatus for performing thick line drawing by painting a polygon created by the polygon creating means.
前記第一の頂点追加手段と第二の頂点追加手段により追加される新たな頂点は、始点と終点を結ぶ線の傾きが水平線より垂直線に近い場合は垂直座標を同一にし、垂直線より水平線に近ければ水平座標を同一にすることを特徴とする請求項1記載の太線描画処理装置。   The new vertex added by the first vertex adding means and the second vertex adding means has the same vertical coordinate when the slope of the line connecting the start point and the end point is closer to the vertical line than the horizontal line, and the horizontal line from the vertical line. 2. The thick line drawing processing apparatus according to claim 1, wherein the horizontal coordinates are set to be the same when close to. 前記始点と終点、および線幅で指定される太線が複数の線分を持ち、それぞれの線分に対して始点と終点が存在する場合、それぞれの線分の始点、終点に対して前記第一の頂点追加手段、第二の頂点追加手段、多角形作成手段により多角形を作成し、多角形を塗りつぶすことで複数の線分を持つ太線描画を行えることを特徴とする請求項1記載の太線描画処理装置。   If the thick line specified by the start point and end point and the line width has a plurality of line segments, and there is a start point and an end point for each line segment, the first point for each line segment start point and end point A thick line having a plurality of line segments can be drawn by creating a polygon by the vertex adding means, the second vertex adding means, and the polygon creating means, and filling the polygon. Drawing processing device. 4点の頂点より構成され、多角形の輪郭を示す辺が互いに平行な多角形の塗りつぶし処理において、前記第一の頂点追加手段と第二の頂点追加手段と前記多角形作成手段により作成された新たな多角形の塗りつぶし処理に置き換えることで、請求項1記載の太線描画と同様の効果が得られることを特徴とする多角形描画処理装置。   In the polygon filling process, which is composed of four vertices and whose polygonal edges are parallel to each other, created by the first vertex adding means, the second vertex adding means, and the polygon creating means The polygon drawing processing apparatus according to claim 1, wherein the same effect as the thick line drawing according to claim 1 can be obtained by replacing with a new polygon filling process.
JP2006202063A 2006-07-25 2006-07-25 Thick line drawing processing method and processing device Withdrawn JP2008027350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006202063A JP2008027350A (en) 2006-07-25 2006-07-25 Thick line drawing processing method and processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006202063A JP2008027350A (en) 2006-07-25 2006-07-25 Thick line drawing processing method and processing device

Publications (1)

Publication Number Publication Date
JP2008027350A true JP2008027350A (en) 2008-02-07

Family

ID=39117899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006202063A Withdrawn JP2008027350A (en) 2006-07-25 2006-07-25 Thick line drawing processing method and processing device

Country Status (1)

Country Link
JP (1) JP2008027350A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012165238A1 (en) * 2011-05-30 2012-12-06 アイシン精機株式会社 Rendering device, rendering method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012165238A1 (en) * 2011-05-30 2012-12-06 アイシン精機株式会社 Rendering device, rendering method, and program
JPWO2012165238A1 (en) * 2011-05-30 2015-02-23 アイシン精機株式会社 Drawing apparatus, drawing method and program

Similar Documents

Publication Publication Date Title
EP1429286A1 (en) Method of preparing bit map
US8723884B2 (en) Scan converting a set of vector edges to a set of pixel aligned edges
JP4370438B2 (en) Vector image drawing apparatus, vector image drawing method and program
JP2009302758A (en) Image processing device, image conversion method, and computer program
JP3791259B2 (en) Outline smoothing processing method
JP5254250B2 (en) Method and system for generating boundaries in the process of rasterizing vector graphics, and method for manufacturing the system
US8907956B2 (en) Line stroking method and system
JP2010146255A (en) Vector graphics drawing device
TWI648604B (en) Digital direct imaging method and system, image generation method and electronic device
JP2008201058A (en) Image forming apparatus
JP2008027350A (en) Thick line drawing processing method and processing device
JPH05120441A (en) Vector picture plotting device
JP3952188B2 (en) Image interpolation apparatus, image interpolation method, and image interpolation program
JP2013026865A (en) Image processing apparatus and image processing method
KR100705188B1 (en) A character font display method
US11341383B2 (en) Methods and apparatus to detect effective tiling area and fill tiles efficiently
CN109981930B (en) Digital direct imaging method and system, image generation method and electronic device
JP5112223B2 (en) Image processing apparatus and image processing program
JP4515877B2 (en) Outline enhancement drawing device
US9824305B2 (en) Printing control device, image processing method, and storage medium
JPH10116348A (en) Plotting device and method, and storage medium
JP5900259B2 (en) Graphic image creation device
JP3350324B2 (en) Character output device
JP4666480B2 (en) Line drawing device
JP2004207923A (en) Edge generating apparatus, edge generating method, and edge generating program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20091006