JPH01150989A - Graphic display device - Google Patents

Graphic display device

Info

Publication number
JPH01150989A
JPH01150989A JP30993587A JP30993587A JPH01150989A JP H01150989 A JPH01150989 A JP H01150989A JP 30993587 A JP30993587 A JP 30993587A JP 30993587 A JP30993587 A JP 30993587A JP H01150989 A JPH01150989 A JP H01150989A
Authority
JP
Japan
Prior art keywords
coordinate
points
point
coordinates
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP30993587A
Other languages
Japanese (ja)
Other versions
JPH07122906B2 (en
Inventor
Toshiharu Hine
日根 俊治
Minoru Takakura
穂 高倉
Takeshi Tokura
戸倉 毅
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP30993587A priority Critical patent/JPH07122906B2/en
Publication of JPH01150989A publication Critical patent/JPH01150989A/en
Publication of JPH07122906B2 publication Critical patent/JPH07122906B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To attain a painting-out even in a polygon having a recessed part by reversing display data between two points. CONSTITUTION:Respective points on a scanning line L (y=Y) to cross the recessed part are painted out as follows. Coordinates (Xalpha, Y) of a point alphaon a side AB are calculated at a coordinate calculating part 1, and its x- coordinate value is stored in a coordinate storing part 2. While coordinates (Xbeta, Y) of a point beta on a side BC are calculated at the coordinate calculating part 1, the x-coordinate Xalpha of the point alpha is fetched from the coordinate storing part 2, the two points (Xalpha, Y) and (Xbeta, Y) and the display data of points between them are reversed, and when the initial state of a picture memory is initially set to an 'all points white', a segment alphabeta is painted out in black. Coordinates (Xgamma, Y) of a point gamma on a side CD are calculated at the coordinate calculating part 1, and its x-coordinate value is stored in the coordinate storing part 2. While coordinates (Xdelta,, Y) of a point delta on a side AD are calculated at the coordinate calculating part 1, the x-coordinate Xgamma of the point gamma is fetched from the coordinate storing part 2, and the two points (Xgamma, Y) and (Xdelta, Y) and the display data of the points between the two points are reversed.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、グラフィックデイスプレィ装置やレーザービ
ームプリンター等の画像表示装置において、任意多角形
のぬりつぶしを行う図形表示装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a graphic display device that fills in arbitrary polygons in image display devices such as graphic display devices and laser beam printers.

従来の技術 従来、任意多角形内部をぬりつぶす方式として、以下の
方式があった。
BACKGROUND ART Conventionally, the following methods have been used to fill in the interior of an arbitrary polygon.

(1)任意多角形を5角形に分割し、各5角形をぬりつ
ぶす方式。
(1) A method in which an arbitrary polygon is divided into pentagons and each pentagon is filled in.

(2)多角形各辺上の点(輪郭点)の座標を算出し、水
平あるいは垂直方向の同一走査線上にある輪郭点を座標
の順にソーティングし、隣接する輪郭点の間の点を描画
することにより多角形内部をぬりつぶす方式。
(2) Calculate the coordinates of points (contour points) on each side of the polygon, sort the contour points on the same horizontal or vertical scanning line in order of coordinates, and draw points between adjacent contour points. A method that fills the inside of a polygon.

(3)多角形各辺上の点(輪郭点)の座標を時計周り、
あるいは反時計周りに順次算出し、水平あるいは垂直方
向の同一走査線上にある輪郭点が2点現われれば、2点
の間の点を反転させることにより多角形内部をぬりつぶ
す方式(例としては、「特開昭57−101886Jが
ある)。
(3) Set the coordinates of the points (contour points) on each side of the polygon clockwise,
Alternatively, the calculation is performed in a counterclockwise direction, and if two contour points on the same horizontal or vertical scanning line appear, the interior of the polygon is filled by inverting the points between the two points (for example, ``There is Japanese Patent Application Publication No. 57-101886J).

発明が解決しようとする問題点 しかしながら、前記の各方式には、以下に述べる問題点
があった。
Problems to be Solved by the Invention However, each of the above systems has the following problems.

(1)の方式では、任意多角形を凸角形に分割する処理
が必要であり、速度的に遅くなる。また、分割された凸
角形を管理するための機構が複雑になる。
The method (1) requires processing to divide an arbitrary polygon into convex angles, which slows down the processing speed. Furthermore, the mechanism for managing the divided convex angles becomes complicated.

(2)の方式では、輪郭点を記憶しておくための大規模
な記憶手段が必要であり、また、輪郭点座標のソーティ
ングは、繁雑なものであり時間がかかる。
The method (2) requires a large-scale storage means for storing contour points, and sorting of contour point coordinates is complicated and time-consuming.

(3)の方式は、(2)の方式に較べれば大幅に少なく
なっているとはいえ、y座標値をインデックスとするテ
ーブル形式で座標の記憶を行っているため、座標記憶部
が大きく、かつ、1回の座標値の格納あるいは取り出し
操作の度に、座標値の有無判断、書き込み、読み出し、
消去等の操作のために、座標記憶部に対し複数回のメモ
リアクセスを必要とする。
Although the number of coordinates in method (3) is significantly smaller than that in method (2), the coordinates are stored in a table format using the y-coordinate value as an index, so the coordinate storage section is large. In addition, each time a coordinate value is stored or retrieved, the presence or absence of the coordinate value is determined, written, read,
Multiple memory accesses to the coordinate storage unit are required for operations such as deletion.

本発明は、かかる点を鑑み、単純な操作と少容量の記憶
手段とにより、任意多角形を高速にぬりつぶす図形表示
装置を提供することを目的とする。
SUMMARY OF THE INVENTION In view of the above, an object of the present invention is to provide a graphic display device that can quickly fill in arbitrary polygons using simple operations and a small storage capacity.

問題点を解決するための手段 本発明は、前記問題点を解決するため、多角形の頂点の
座標データから多角形の辺上の点の座標データを逐次計
算する座標算出部と、前記座標算出部により算出された
座標データを記憶する先入れ後出し型の座標記憶部と、
前記座標算出部における座標算出方向の変化を検出し、
前記座標算出部で算出された座標データを前記座標記憶
部に格納するか、あるいは、前記座標記憶部から座標デ
ータを取り出し、前記座標算出部で算出されたデータと
組にして、その2点間を結ぶ直線を描画するかを切り換
える制御部と、2点の座標データから、画像メモリ上で
2点の間の点の表示データを反転させる直線描画部とを
備えた図形表示装置である。
Means for Solving the Problems In order to solve the above problems, the present invention provides a coordinate calculation unit that sequentially calculates coordinate data of points on sides of a polygon from coordinate data of vertices of the polygon; a first-in, last-out type coordinate storage unit that stores coordinate data calculated by the unit;
detecting a change in the coordinate calculation direction in the coordinate calculation unit;
Either the coordinate data calculated by the coordinate calculation section is stored in the coordinate storage section, or the coordinate data is taken out from the coordinate storage section and combined with the data calculated by the coordinate calculation section, and the data is calculated between the two points. This graphic display device includes a control section that switches whether to draw a straight line connecting the two points, and a straight line drawing section that inverts display data of a point between the two points on an image memory based on the coordinate data of the two points.

作用 本発明では、任意の多角形において、水平あるいは垂直
方向走査線が頂点く特異点)を除き、多角形の輪郭と偶
数回交差すること、また、それらの交差点を2点ずつ組
にし、その2点間の表示データを反転することにより凹
部を持つ多角形においてもぬりつぶしが実現できること
に着目し、前記の構成により、次の作用を実現する。
In the present invention, in any polygon, a horizontal or vertical scanning line intersects the contour of the polygon an even number of times, except for singular points at vertices, and the intersections are made into pairs of two points. Focusing on the fact that filling can be achieved even in a polygon having a concave portion by inverting the display data between two points, the following effects are realized by the above-mentioned configuration.

座標算出部において、多角形各辺の辺上の点の座標、す
なわち、多角形各辺と各走査線との交点の座標を、輪郭
を時計周りあるいは反時計周りにたどって順次算出しす
る。最初は、組となる同一走査線上の他の輪郭点の座標
がまだ算出されていないので、制御部は、算出された座
標データを座標記憶部に格納する。その後、座標算出部
において座標算出方向が逆転すると、先に座標算出され
座標記憶部に格納された点と同一走査線上の別の輪郭点
の座標が順次算出される。なお、ここで言う座標算出方
向とは、座標算出時に基準となる座標の変化の方向をい
う。たとえば、走査線がX軸に平行であれば、座標算出
部は、y座標値を1ずつ増加あるいは減少させながら座
標算出を行う。
In the coordinate calculating section, the coordinates of points on each side of the polygon, that is, the coordinates of the intersections between each side of the polygon and each scanning line, are sequentially calculated by tracing the outline clockwise or counterclockwise. Initially, since the coordinates of other contour points on the same scanning line forming a set have not yet been calculated, the control unit stores the calculated coordinate data in the coordinate storage unit. Thereafter, when the coordinate calculation direction is reversed in the coordinate calculation section, the coordinates of another contour point on the same scanning line as the point whose coordinates were previously calculated and stored in the coordinate storage section are sequentially calculated. Note that the coordinate calculation direction referred to here refers to the direction of change in coordinates that serve as a reference when calculating coordinates. For example, if the scanning line is parallel to the X-axis, the coordinate calculation unit calculates the coordinates while increasing or decreasing the y-coordinate value by 1.

このときのy座標値の変化方向、すなわち、y座標増分
の正負を座標算出方向と呼ぶ。
The direction in which the y-coordinate value changes at this time, that is, the positive or negative sign of the y-coordinate increment, is referred to as the coordinate calculation direction.

この座標算出方向が、正方向から負方向に、あるいは、
負方向から正方向に変わった場合座標算出方向が逆転し
たという。なお、方向変化の途中に辺の方向が走査線の
方向と一致する走査線方向(y座標増分0)を経てもよ
い。ただし、走査線方向の辺上の点については、算出さ
れた座標データの格納も、直線描画も行わない。
The direction of this coordinate calculation is from the positive direction to the negative direction, or
If the direction changes from negative to positive, the direction of coordinate calculation is said to have been reversed. Note that during the direction change, the direction of the side may pass through a scanning line direction (y coordinate increment of 0) in which the direction coincides with the direction of the scanning line. However, for points on the sides in the scanning line direction, calculated coordinate data is neither stored nor straight lines are drawn.

座標算出部で座標算出方向が逆転すると、制御部は、座
標算出部で輪郭点の座標データが算出される毎に、座標
記憶部より既に格納された座標データを一つずつ取り出
す。座標記憶部は先入れ後出し型であるため、座標デー
タは、格納時とは逆の順序で取り出される。そのため、
座標記憶部から取り出される座標データは、常に、算出
された輪郭点と同一走査線上の輪郭点のものとなる。
When the coordinate calculation direction is reversed in the coordinate calculation unit, the control unit retrieves already stored coordinate data one by one from the coordinate storage unit each time the coordinate calculation unit calculates the coordinate data of the contour point. Since the coordinate storage unit is of a first-in, last-out type, the coordinate data is retrieved in the reverse order in which it was stored. Therefore,
The coordinate data retrieved from the coordinate storage section is always of a contour point on the same scanning line as the calculated contour point.

このようにして、同一走査線上の2点の座標データ(座
標算出部において新たに算出された座標データと座標記
憶部から取り出された座標データ)が求まり、直線描画
部が、両点及び画点間の点の画像メモリ上の表示データ
を反転する。
In this way, the coordinate data of two points on the same scanning line (the newly calculated coordinate data in the coordinate calculation section and the coordinate data retrieved from the coordinate storage section) are obtained, and the straight line drawing section calculates the coordinate data for both points and the image point. Inverts the display data on the image memory at the points between.

以後、制御部は、座標算出部において座標算出方向が逆
転する毎に、上記座標データの座標記憶部への格納処理
と、座標記憶部からの座標データの取り出し及び直線描
画処理とを切り換える。
Thereafter, the control section switches between storing the coordinate data in the coordinate storage section and retrieving the coordinate data from the coordinate storage section and drawing a straight line every time the coordinate calculation direction is reversed in the coordinate calculation section.

以上の操作を与えられた多角形の全通について行い、座
標算出部が多角形辺上の全点の座標算出を終了すると、
ぬりつぶし多角形が生成される。
The above operations are performed for all of the given polygons, and when the coordinate calculation unit finishes calculating the coordinates of all points on the sides of the polygon,
A filled polygon is generated.

実施例 以下、本発明の実施例を図面を用いて説明する。Example Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の図形表示装置の一実施例を示すブロッ
ク図である。1は多角形の辺上の点の座標を順次算出す
る座標算出部、2は算出された座標データを格納する先
入れ後出し型の座標記憶部、3は座標データの座標記憶
部2への格納処理と、。
FIG. 1 is a block diagram showing an embodiment of the graphic display device of the present invention. 1 is a coordinate calculation unit that sequentially calculates the coordinates of points on the sides of a polygon; 2 is a first-in, last-out type coordinate storage unit that stores the calculated coordinate data; and 3 is a coordinate storage unit that stores the coordinate data in the coordinate storage unit 2. Storage processing and.

座標記憶部2からの座標データの取り出し及び直線描画
処理とを切り換える制御部、4は指定された2点の間の
点の画像メモリ上の表示データを反転描画する直線描画
部、5は表示データを格納する画像メモリである。
A control unit that switches between retrieving coordinate data from the coordinate storage unit 2 and straight line drawing processing; 4 is a straight line drawing unit that inverts and draws display data on the image memory of a point between two specified points; 5 is a display data This is an image memory that stores images.

以上のように構成された本発明の実施例の図形表示装置
の動作を第2図の例を用いて説明する。
The operation of the graphic display device according to the embodiment of the present invention constructed as described above will be explained using the example shown in FIG.

以下の説明において、水平方向をX軸方向、垂直方向を
y軸方向とし、右方向をX軸止方向、上をy軸止方向と
する。また、簡単のため、画像は白黒2値の画像とする
In the following description, the horizontal direction is the X-axis direction, the vertical direction is the y-axis direction, the right direction is the X-axis stopping direction, and the upper direction is the y-axis stopping direction. Furthermore, for simplicity, the image is assumed to be a black and white binary image.

座標算出部1は、与えられる多角形頂点座標データ6か
ら、多角形各辺と走査線との交点の座標を輪郭に沿って
順次算出する。輪郭をたどる方向は、時計周りあるいは
反時計周り何れでも構わないが、以下の説明では、反時
計周りに輪郭をたどりながら座標算出を行っている場合
を例にとる。
The coordinate calculation unit 1 sequentially calculates the coordinates of the intersections between each side of the polygon and the scanning line along the contour from the provided polygon vertex coordinate data 6. The contour may be traced in either a clockwise or counterclockwise direction; however, in the following explanation, an example will be taken in which coordinates are calculated while tracing the contour counterclockwise.

従って、座標算出は、辺AB、辺BC1辺CD、辺DA
の順に行われる。なお、算出方式には、公知のDDA(
Digital  Differential  An
alyze)アルゴリズムを用いる。
Therefore, coordinate calculation is side AB, side BC1 side CD, side DA
This is done in the following order. Note that the calculation method uses the well-known DDA (
Digital Differential An
alyze) algorithm is used.

最初、座標算出部1は、辺AB上の点の座標をy座標を
1ずつ減少させて順次算出する。制御部3は、算出され
た座標データを座標記憶部2に格納する。座標記憶部2
に格納する座標データはX座標値のみで良い。
First, the coordinate calculation unit 1 sequentially calculates the coordinates of points on side AB by decreasing the y coordinate by one. The control unit 3 stores the calculated coordinate data in the coordinate storage unit 2. Coordinate storage unit 2
The coordinate data stored in may be only the X coordinate value.

座標算出部1において、辺AB上の点の座標算出を終了
し、辺BC上の点の座標算出に移ると、辺ABでの座標
算出方向がy座標が順次減少する下向きであったのに対
し、辺BCでの座標算出方向はy座標が順次増加する上
向きとなり、座標算出方向が逆転する。制御部3は、こ
の座標算出方向の逆転を検出し、座標記憶部2への座標
データ格納処理を、座標記憶部2からの座標データの取
り出しおよび直線描画処理に切り換える。すなわち、座
標算出部1が座標データを算出する毎に、先の座標デー
タ格納処理で座標記憶部2に格納された座標データを一
つずつ取り出す。座標記憶部2は先入れ後出し型なので
、座標データは格納時とは逆の順序で取り出される。し
たがって、取り出される座標データのy座標値は、格納
時とは逆に変化する。すなわち、−旦格納された辺AB
上の点の座標データの取り出し時のy座標の変化方向は
、辺BCにおける座標算出方向(y座標を1ずつ増加さ
せる方向)と一致する。点Bは、辺AB・辺BCで共通
であるため、当然、点Bのy座標は同一であり、同−y
座標から同方向に変化する、座標算出部1において算出
される辺BC上の点のy座標と、座標算出部1において
座標が算出される毎に座標記憶部2から取り出される辺
AB上の点の座標データのy座標は常に一致している。
When the coordinate calculation unit 1 finishes calculating the coordinates of a point on side AB and moves on to calculating the coordinates of a point on side BC, it is found that although the direction of coordinate calculation on side AB is downward with the y-coordinate decreasing sequentially. On the other hand, the direction of coordinate calculation on side BC is upward with the y-coordinate increasing sequentially, and the direction of coordinate calculation is reversed. The control unit 3 detects this reversal of the coordinate calculation direction, and switches the process of storing the coordinate data in the coordinate storage unit 2 to the process of retrieving the coordinate data from the coordinate storage unit 2 and drawing a straight line. That is, each time the coordinate calculation unit 1 calculates coordinate data, it retrieves one by one the coordinate data stored in the coordinate storage unit 2 in the previous coordinate data storage process. Since the coordinate storage section 2 is of a first-in, last-out type, the coordinate data is retrieved in the reverse order of storage. Therefore, the y-coordinate value of the retrieved coordinate data changes in the opposite way to that at the time of storage. In other words, the side AB stored -
The direction in which the y coordinate changes when extracting the coordinate data of the upper point matches the coordinate calculation direction (the direction in which the y coordinate is increased by 1) on the side BC. Since point B is common to side AB and side BC, naturally the y coordinate of point B is the same, and the same −y
The y-coordinate of a point on side BC calculated by the coordinate calculation unit 1, which changes in the same direction from the coordinates, and the point on side AB taken out from the coordinate storage unit 2 every time the coordinate calculation unit 1 calculates the coordinates. The y coordinates of the coordinate data always match.

このようにして同−y座標を持つ、すなわち、同一走査
線上の2点の座標が求まる。直線描画部4は、求まった
2点とその間の点の画像メモリ上の表示データを反転す
る。初めに画像メモリを全点白に初期設定した場合、反
転により黒になる。
In this way, the coordinates of two points having the same -y coordinate, that is, on the same scanning line, are determined. The straight line drawing unit 4 inverts the display data on the image memory of the two determined points and the points between them. If the image memory is initially set to all white points, the inversion will turn them black.

前記の座標記憶部2からの座標データの取り出し及び直
線描画処理を辺BC上の点Eまで行うと、座標記憶部2
内の座標データが全て消費され、座標記憶部2は空にな
る。その時点で、制御部3は、再び、座標算出部1にお
いて算出された座標データを座標記憶部2に格納する処
理に戻る。
When the coordinate data is retrieved from the coordinate storage unit 2 and the straight line drawing process is performed up to the point E on the side BC, the coordinate storage unit 2
All the coordinate data within is consumed, and the coordinate storage section 2 becomes empty. At that point, the control section 3 returns to the process of storing the coordinate data calculated by the coordinate calculation section 1 in the coordinate storage section 2 again.

以後、制御部3は、座標算出部1において座標算出方向
が逆転するか、あるいは、座標データ取り出し及び直線
描画処理中に、座標記憶部2が空になる毎に、座標デー
タの格納処理と座標データの取り出し及び直線描画処理
を切り換える。従って、点E以降、座標算出部1が辺B
C上の点の算出を行っている間は、座標データの格納処
理を行い、座標算出部1が、辺CD上の点の座標算出に
移り、座標算出方向が逆転(上向き→下向き)すると、
座標データの取り出しおよび直線描画処理に移行する。
From then on, the control unit 3 performs coordinate data storage processing and coordinate processing every time the coordinate calculation direction is reversed in the coordinate calculation unit 1, or whenever the coordinate storage unit 2 becomes empty during coordinate data retrieval and straight line drawing processing. Switches data retrieval and straight line drawing processing. Therefore, after point E, the coordinate calculation unit 1
While calculating the point on C, the coordinate data is stored, and the coordinate calculation unit 1 moves on to calculating the coordinate of the point on side CD, and when the direction of coordinate calculation is reversed (from upward to downward),
Shift to coordinate data extraction and straight line drawing processing.

辺CDの座標データの取り出しおよび直線描画処理中、
点Fにおいて座標記憶部2が再び空になるため、点F以
降は、次に座標算出方向の逆転する点りまで、座標デー
タの格納処理を行う。座標算出部1が、辺DA上の点の
座標算出に移ると、再度の座標算出方向の逆転(下向き
→上向き)に伴い、座標データの取り出しおよび直線描
画処理に移行する。この時、三角形DAF内部がぬりつ
ぶされるが、三角形DAFは、既に黒にぬりつぶされて
いるため、反転により白に戻る。
During extraction of coordinate data of side CD and straight line drawing process,
Since the coordinate storage section 2 becomes empty again at point F, the coordinate data storage process is performed after point F until the next point where the coordinate calculation direction is reversed. When the coordinate calculation unit 1 moves to calculate the coordinates of a point on the side DA, the coordinate calculation direction is reversed again (from downward to upward), and the process moves to extraction of coordinate data and straight line drawing processing. At this time, the inside of the triangle DAF is filled in, but since the triangle DAF has already been filled in black, it returns to white by inversion.

なお、座標算出部1が多角形輪郭上の全点の座標算出を
終了した時点でぬりつぶし多角形の生成を完了する。
Note that the generation of the filled polygon is completed when the coordinate calculation unit 1 finishes calculating the coordinates of all points on the polygon outline.

以上の動作により、凹部を横切る走査線L(y=Y)上
の各点は次のようにぬりつぶされる。
By the above operation, each point on the scanning line L (y=Y) that crosses the recess is filled in as follows.

(1)座標算出部1で辺AB上の点αの座標(Xα、Y
)が算出され、X座標値が座標記憶部2に格納される。
(1) The coordinate calculation unit 1 calculates the coordinates (Xα, Y
) is calculated, and the X coordinate value is stored in the coordinate storage section 2.

(2)座標算出部1で辺BC上の点βの座標(Xβ、Y
)が算出されるとともに、座標記憶部2から点αのX座
標Xαが取り出され、2点(Xα、Y)、(Xβ、Y)
とその間の点の表示データが反転される。画像メモリの
初期状態を全黒白に初期設定した場合、線分αβが黒で
ぬりつぶされる。
(2) The coordinate calculation unit 1 calculates the coordinates of point β on side BC (Xβ, Y
) is calculated, and the X coordinate Xα of point α is taken out from the coordinate storage unit 2, and the two points (Xα, Y), (Xβ, Y)
and the display data of the points between them are inverted. When the initial state of the image memory is set to all black and white, the line segment αβ is filled with black.

(3)座標算出部1で辺CD上の点γの座標(Xγ、Y
)が算出され、X座標値が座標記憶部2に格納される。
(3) The coordinate calculation unit 1 calculates the coordinates of point γ on side CD (Xγ, Y
) is calculated, and the X coordinate value is stored in the coordinate storage section 2.

′(4)座標算出部1で辺BC上の点δの座標(Xδ、
Y)が算出されるとともに、座標記憶部2から点γのX
座標Xγが取り出され、2点くXγ、Y)、(Xδ、Y
)とその間の点の表示データが反転される。すなわち、
(2)において、線分子δを含む線分αβが黒くぬりつ
ぶされているので、このとき線分子δは反転により、白
に戻る。
'(4) The coordinate calculation unit 1 calculates the coordinates (Xδ,
Y) is calculated, and the X of point γ is calculated from the coordinate storage unit 2.
The coordinates Xγ are extracted and the two points are Xγ, Y), (Xδ, Y
) and the display data of the points between them are inverted. That is,
In (2), since the line segment αβ including the line molecule δ is filled in black, the line molecule δ is reversed and returns to white at this time.

なお、第2図の例においては、任意の多角形を水平方向
の線分でぬりつぶす場合の説明を行ったが、垂直方向に
ぬりつぶす場合も同様に実現可能である。
In the example shown in FIG. 2, the case where an arbitrary polygon is filled with horizontal line segments has been described, but it is also possible to fill it in the vertical direction.

発明の効果 以上のように、本発明によれば、非常に単純な処理のみ
で、任意の多角形の高速ぬりつぶしを実現できる。さら
に、座標記憶部を先入れ後出し型のメモリで実現するこ
とにより、高々表示する多角形の高さ(y軸方向の長さ
)分の少規模なメモリで実現でき、かつ、座標記憶部に
対するデータの有無判断、データ読み出し、書き込み等
の操作を高速に実現できるという効果がある。
Effects of the Invention As described above, according to the present invention, it is possible to fill any polygon at high speed with very simple processing. Furthermore, by realizing the coordinate storage unit as a first-in, last-out type memory, it can be realized with a small memory size that is at most the height of the polygon to be displayed (the length in the y-axis direction), and the coordinate storage unit can be This has the advantage that operations such as determining the presence or absence of data, reading data, and writing data can be realized at high speed.

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

第1図は本発明の一実施例の図形表示装置のブロック図
、第2図は同装置の動作説明図である。 1・・・座標算出部、2・・・座標記憶部、3・・・制
御部、4・・・直線描画部、5・・・画像メモリ、6・
・・多角形頂点座標データ。 代理人の氏名 弁理士 中尾敏男 はか1金弟 1 図 第2図
FIG. 1 is a block diagram of a graphic display device according to an embodiment of the present invention, and FIG. 2 is an explanatory diagram of the operation of the device. DESCRIPTION OF SYMBOLS 1... Coordinate calculation unit, 2... Coordinate storage unit, 3... Control unit, 4... Straight line drawing unit, 5... Image memory, 6...
...Polygon vertex coordinate data. Name of agent: Patent attorney Toshio Nakao Hakaichi Kinyo 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] 多角形の頂点の座標データから多角形の辺上の点の座標
データを逐次計算する座標算出部と、前記座標算出部に
より算出された座標データを記憶する先入れ後出し型の
座標記憶部と、前記座標算出部における座標算出方向の
変化を検出し、前記座標算出部で算出された座標データ
を前記座標記憶部に格納するか、あるいは、前記座標記
憶部から座標データを取り出し、前記座標算出部で算出
されたデータと組にして、その2点間を結ぶ直線を描画
するかを切り換える制御部と、2点の座標データから、
画像メモリ上で2点の間の点の表示データを反転させる
直線描画部とを備えることを特徴とする図形表示装置。
a coordinate calculation unit that sequentially calculates coordinate data of points on the sides of the polygon from coordinate data of vertices of the polygon; and a first-in, last-out type coordinate storage unit that stores the coordinate data calculated by the coordinate calculation unit. , detecting a change in the coordinate calculation direction in the coordinate calculation section, and storing the coordinate data calculated by the coordinate calculation section in the coordinate storage section, or extracting the coordinate data from the coordinate storage section and performing the coordinate calculation. From the coordinate data of the two points,
A graphic display device comprising: a straight line drawing unit that inverts display data of a point between two points on an image memory.
JP30993587A 1987-12-08 1987-12-08 Graphic display Expired - Fee Related JPH07122906B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30993587A JPH07122906B2 (en) 1987-12-08 1987-12-08 Graphic display

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30993587A JPH07122906B2 (en) 1987-12-08 1987-12-08 Graphic display

Publications (2)

Publication Number Publication Date
JPH01150989A true JPH01150989A (en) 1989-06-13
JPH07122906B2 JPH07122906B2 (en) 1995-12-25

Family

ID=17999118

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30993587A Expired - Fee Related JPH07122906B2 (en) 1987-12-08 1987-12-08 Graphic display

Country Status (1)

Country Link
JP (1) JPH07122906B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0285977A (en) * 1988-06-23 1990-03-27 Fuji Electric Co Ltd Closed area paint-out display method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0285977A (en) * 1988-06-23 1990-03-27 Fuji Electric Co Ltd Closed area paint-out display method

Also Published As

Publication number Publication date
JPH07122906B2 (en) 1995-12-25

Similar Documents

Publication Publication Date Title
KR920701938A (en) Image processing device
JPS6324419A (en) Composite document processor
JPH03185496A (en) Display screen scrolling system
US20220121307A1 (en) Method and device of drawing handwriting track, electronic apparatus, medium, and program product
JP3110837B2 (en) Map figure data management method
JP2882465B2 (en) Image generation method and apparatus
CN116310135B (en) Curved surface display method and system based on multi-resolution LOD model
JPH01150989A (en) Graphic display device
JP2770582B2 (en) Figure filling device
JPS61182093A (en) High speed graphic drawing system
JP2903514B2 (en) High-speed drawing method
JPH0417082A (en) Picture element information accumulating system for graphic display device
JP2799041B2 (en) Dot development method and dot development device
JP2787497B2 (en) Graphic drawing method and apparatus
CN115984409A (en) Method and device for drawing vector data of geographic information system and electronic equipment
CN117555465A (en) Graphic display method and graphic display device for display equipment
JPS6075969A (en) Graphic information processor
JPS58169437A (en) Three-dimensional data treating system
JP2000242802A (en) Graphic processor
JPH02275592A (en) Paint-out image processor
JPH01155481A (en) Three-dimensional shape display device
JPH0236485A (en) Electronic computer
JPS61250781A (en) Graphic processing device
JPH04102978A (en) Graphic processor
JPS6288066A (en) Inclination display system for two-dimensional intensified data

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees