JPH04685A - Graphic painting-out method - Google Patents

Graphic painting-out method

Info

Publication number
JPH04685A
JPH04685A JP2102626A JP10262690A JPH04685A JP H04685 A JPH04685 A JP H04685A JP 2102626 A JP2102626 A JP 2102626A JP 10262690 A JP10262690 A JP 10262690A JP H04685 A JPH04685 A JP H04685A
Authority
JP
Japan
Prior art keywords
closed
filling
line
memory area
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2102626A
Other languages
Japanese (ja)
Inventor
Masahiro Ito
正博 伊藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2102626A priority Critical patent/JPH04685A/en
Publication of JPH04685A publication Critical patent/JPH04685A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、ページプリンタ等のコントローラにおける図
形塗り潰し方法に関し、特に簡易な方法で閉領域の塗り
潰しを行うことが可能な図形塗り潰し方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a figure filling method in a controller such as a page printer, and particularly to a figure filling method that can fill in a closed area in a simple method.

[従来の技術] 従来のパーソナルコンピュータ等では、図形(閉領域)
のなかを塗り潰す場合、例えば出発点がその閉領域中に
あると仮定して、内側の1点の座標を設定し、その点の
左右の画素をみて、その点を含む線分がどこまで伸びて
いるかを調べ、この線分に色を塗る。次に、その線分の
範囲で1本上下の画素を調べ、同様に境界までを塗り潰
す動作を繰り返す。
[Prior art] In conventional personal computers, etc., graphics (closed areas)
When filling in the inside of a closed area, for example, assuming that the starting point is within the closed area, set the coordinates of one point inside, look at the pixels to the left and right of that point, and calculate how far the line segment including that point extends. Find out if this line is true and color this line segment. Next, the pixels one line above and below are checked within the range of that line segment, and the operation of filling up to the boundary is repeated in the same way.

この他にも、例えば横方向(スキャン方向)に偶数個の
変位点を抽出し、変位点でビットを○N/○FFして塗
り潰すスキャン方式が知られている。
In addition to this, a scanning method is known in which, for example, an even number of displacement points are extracted in the horizontal direction (scanning direction), and the bits at the displacement points are filled in by ○N/○FF.

スキャン方式では、前処理として、排他的論理和(XO
R)により図形(原図)を描画し、独立点および交点を
消去して1ビツト化を行う。この際、スキャンライン上
の連続点は先頭の1点のみを抽出し、同一ライン上に奇
数個の独立点が存在する場合には、原図の座標点を補充
して、スキャンライン上に偶数個の点を求める。このよ
うな前処理の後、これらの点を変位点としてビットの○
N/OFFを交互に繰返し、lまたはOのビット連続書
込みを行う。
In the scan method, exclusive OR (XO
A figure (original figure) is drawn using R), independent points and intersection points are erased, and the figure is converted into one bit. At this time, only the first continuous point on the scan line is extracted, and if an odd number of independent points exist on the same line, the coordinate points of the original image are supplemented and an even number of points are extracted on the scan line. Find the point. After such preprocessing, these points are used as displacement points to
N/OFF is repeated alternately to continuously write 1 or 0 bits.

さらに、ラスタ・スキャン型のCRTにおいて、線描画
、イメージ処理、および面描画を高速に行うため、これ
らの機能を1チツプ内に取り込んだA G D C(A
dvanced Graphics Display 
Controller)等の周辺LSIが既に提供され
ている。このAGDCには、図形塗り潰しを高速化する
ための境界点検索回路やイメージ処理を実行するための
拡大/縮小回路、および各種演算回路等が内蔵されてい
る。
Furthermore, in order to perform line drawing, image processing, and area drawing at high speed in raster scan type CRTs, A
Advanced Graphics Display
Peripheral LSIs such as controllers have already been provided. This AGDC includes a boundary point search circuit for speeding up figure filling, an enlargement/reduction circuit for executing image processing, and various arithmetic circuits.

なお、AGDCについては、例えば“μPD72120
 AGDCユーザーズ・マニュアル、NECコーポレー
ション(1987,1988)″に記載されている。
For AGDC, for example, “μPD72120
AGDC User's Manual, NEC Corporation (1987, 1988)''.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記従来技術では、閉領域内の1点を指定したり、境界
線の細線化を行う必要があり、これらの処理をソフトウ
ェアで行うと煩雑になって、処理速度も低下するという
問題があった。
In the above conventional technology, it is necessary to specify a point within a closed area or to thin the boundary line, and if these processes are performed using software, it becomes complicated and the processing speed decreases. .

本発明の目的は、このような問題点を改善し、既存のL
SI化された任意閉領域内塗り潰しを利用して、内側の
点が不明な閉じた図形の塗り潰しを単純な処理操作で行
うことが可能な図形塗り潰し方法を提供することにある
The purpose of the present invention is to improve such problems and to improve the existing L
To provide a figure filling method capable of filling a closed figure whose inner points are unknown by a simple processing operation by using SI filled arbitrary closed area filling.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するため、本発明の図形塗り潰し方法は
、所定のメモリ領域における単純閉図形内を任意のビッ
トパターンで塗り潰す手段および境界点検索手段(AG
DC)を備えたプリンタコントローラの図形塗り潰し方
法において、メモリ領域内の上記閉図形の外側を全て塗
り潰した後、そのメモリ領域全体をビット反転させて閉
図形内部を抽出し、抽出した領域と任意のビットパター
ンとのANDをとり、その閉図形の外形線を任意のパタ
ーンで再描画することに特徴がある。
In order to achieve the above object, the figure filling method of the present invention includes a means for filling a simple closed figure in a predetermined memory area with an arbitrary bit pattern and a boundary point search means (AG
In the figure filling method of a printer controller equipped with DC), after filling in all the outside of the closed figure in the memory area, the entire memory area is bit inverted to extract the inside of the closed figure, and the extracted area and any arbitrary The feature is that it performs an AND with the bit pattern and redraws the outline of the closed figure with an arbitrary pattern.

〔作用] 本発明においては、描画プロセッサの閉領域内塗り潰し
機能を利用して、単純な閉図形の外側を塗り潰した後、
メモリ領域を反転させることにより、閉図形内の1点を
指定することなく、簡易な方法で閉図形塗り潰しを実現
できる。
[Operation] In the present invention, after filling the outside of a simple closed figure using the closed area filling function of the drawing processor,
By inverting the memory area, a closed figure can be filled in in a simple manner without specifying a single point within the closed figure.

また、反転後の図形の境界線を任意のパターンで再描画
することにより、実線以外でも境界線を表わすことがで
きる。
Moreover, by redrawing the boundary line of the figure after inversion in an arbitrary pattern, the boundary line can be represented by a line other than a solid line.

〔実施例1 以下、本発明の一実施例を図面により説明する。[Example 1 An embodiment of the present invention will be described below with reference to the drawings.

第2図は、本発明の一実施例におけるレーザプリンタコ
ントローラの構成図である。
FIG. 2 is a configuration diagram of a laser printer controller in an embodiment of the present invention.

第2図において、21は装置全体を制御するCPU、2
2はAGDC等から構成された描画プロセッサ、23は
ROMやRAMから構成され、本実施例のレーザプリン
タコントローラのファームウェアプログラムであるC0
DE、24はRAMから構成された図形描画メモリ、2
5は各種パターン等を格納したCGROM、26はレー
ザプリンタ27との間を接続するプリンタI/F、27
はレーザプリンタである。
In FIG. 2, 21 is a CPU that controls the entire device;
2 is a drawing processor composed of AGDC, etc.; 23 is composed of ROM and RAM; and C0 is the firmware program of the laser printer controller of this embodiment.
DE, 24 is a graphic drawing memory composed of RAM, 2
5 is a CGROM that stores various patterns, etc.; 26 is a printer I/F that connects with a laser printer 27; 27
is a laser printer.

この描画プロセッサ22は、CPU21の制御下で、A
GDCの境界点検索機能および閉領域の塗り潰し機能を
利用し、閉領域内の1点を指定することなく、単純図形
の塗り潰しを行う。
This drawing processor 22 operates under the control of the CPU 21.
Using the boundary point search function and closed area filling function of GDC, a simple figure is filled in without specifying a single point within the closed area.

次に、本実施例の図形塗り潰し方式の処理手順について
述べる。
Next, the processing procedure of the figure filling method of this embodiment will be described.

第1図は、本発明の一実施例における図形塗り潰し方式
を示すフローチャート、第3図は本発明の一実施例にお
ける図形塗り潰し手順の説明図である。
FIG. 1 is a flowchart showing a figure filling method in an embodiment of the present invention, and FIG. 3 is an explanatory diagram of a figure filling procedure in an embodiment of the present invention.

本実施例では、第1図のように、図形描画メモリ24の
メモリ領域を確保しく101)、例えば第3図(a)に
示す単純閉図形の原図(元の図形)を実線で描画する(
102)。なお、第3図において、外枠はメモリ領域の
境界を表わす。
In this embodiment, as shown in FIG. 1, the memory area of the figure drawing memory 24 is secured (101), and the original figure (original figure) of the simple closed figure shown in FIG. 3(a) is drawn with solid lines (101).
102). Note that in FIG. 3, the outer frame represents the boundary of the memory area.

次に、メモリ領域の境界から描画プロセッサ22のAG
DCによる境界検索を行い、閉図形の外側を塗り潰して
ビットを全て立てる(103)。
Next, from the boundary of the memory area, the AG of the drawing processor 22
A boundary search is performed using DC, the outside of the closed figure is filled in, and all bits are set (103).

これにより、(b)に示す塗り潰し図形を得る。As a result, the filled figure shown in (b) is obtained.

次に、メモリ領域全体を反転(NOT)させる(104
)。
Next, the entire memory area is inverted (NOT) (104
).

これにより、(C)に示すように閉図形の内側が塗り潰
される。但し、閉図形の境界は消されてしまう。
As a result, the inside of the closed figure is filled in as shown in (C). However, the boundaries of closed shapes are erased.

次に、任意のビットパターンを順序よく配列しながら、
メモリ領域全体で論理和(AND)を実行する(105
)。
Next, while arranging arbitrary bit patterns in order,
Executes logical sum (AND) on the entire memory area (105
).

これにより、(d)に示すように、ステップ104で抽
出された閉図形内がビットパターンに置き換わる。
As a result, as shown in (d), the inside of the closed figure extracted in step 104 is replaced with a bit pattern.

最後に、こうして得られた閉図形の境界を再描画する(
106)。
Finally, redraw the boundaries of the closed shape obtained in this way (
106).

この際、閉図形の境界を任意のパターンで描画すること
により、(e)に示す実線の境界線だけでなく、例えば
(f)に示すような1点鎖線の境界線も描画できる。
At this time, by drawing the boundaries of the closed figure in an arbitrary pattern, it is possible to draw not only the solid line boundary line shown in (e) but also the one-dot chain line boundary line as shown in (f), for example.

本実施例によれば、閉領域内の1点を指定することなく
、簡易に図形の塗り潰しを実現でき、しかも、実線に限
らず、任意のパターンの境界線を描画することができる
According to this embodiment, it is possible to easily fill in a figure without specifying a single point within a closed area, and it is also possible to draw a border line in any pattern, not just a solid line.

〔発明の効果J 本発明によれば、煩雑な処理を行うことなく、既存のL
SI機能を利用して、任意の単純閉図形の塗り潰しが可
能である。
[Effect of the invention J According to the present invention, the existing L
Using the SI function, it is possible to fill in any simple closed figure.

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

第1図は本発明の一実施例における図形塗り潰し方式を
示すフローチャート、第2図は本発明の一実施例におけ
るレーザプリンタコントローラの構成図、第3図は本発
明の一実施例における図形塗り潰し手順の説明図である
。 21 :CPU、22:描画プロセッサ、23゜C0D
E、24 :図形描画メモリ、25:CGR○M、26
:プリンタI/F、27:レーザプリンタ。
Fig. 1 is a flowchart showing a figure filling method in an embodiment of the present invention, Fig. 2 is a configuration diagram of a laser printer controller in an embodiment of the present invention, and Fig. 3 is a figure filling procedure in an embodiment of the present invention. FIG. 21: CPU, 22: Drawing processor, 23°C0D
E, 24: Graphic drawing memory, 25: CGR○M, 26
: Printer I/F, 27: Laser printer.

Claims (1)

【特許請求の範囲】[Claims] (1)所定のメモリ領域における単純閉図形内を任意の
ビットパターンで塗り潰す手段、および境界点検索手段
を備えたプリンタコントローラの図形塗り潰し方法にお
いて、メモリ領域内の上記閉図形の外側を全て塗り潰し
た後、該メモリ領域全体をビット反転させて閉図形内部
を抽出し、抽出した領域と任意のビットパターンとで論
理積を実行し、該閉図形の外形線を再描画することを特
徴とする図形塗り潰し方法。
(1) In a figure filling method of a printer controller equipped with a means for filling the inside of a simple closed figure in a predetermined memory area with an arbitrary bit pattern and a means for searching for boundary points, the entire outside of the closed figure in the memory area is filled. After that, the entire memory area is bit-inverted to extract the inside of the closed figure, and the extracted area and an arbitrary bit pattern are logically ANDed to redraw the outline of the closed figure. Shape filling method.
JP2102626A 1990-04-18 1990-04-18 Graphic painting-out method Pending JPH04685A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2102626A JPH04685A (en) 1990-04-18 1990-04-18 Graphic painting-out method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2102626A JPH04685A (en) 1990-04-18 1990-04-18 Graphic painting-out method

Publications (1)

Publication Number Publication Date
JPH04685A true JPH04685A (en) 1992-01-06

Family

ID=14332453

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2102626A Pending JPH04685A (en) 1990-04-18 1990-04-18 Graphic painting-out method

Country Status (1)

Country Link
JP (1) JPH04685A (en)

Similar Documents

Publication Publication Date Title
JP2865751B2 (en) Display screen scrolling method
KR910000202B1 (en) Picture processing apparatus
JPH04685A (en) Graphic painting-out method
JPH02270019A (en) Generation system for high quality character pattern
JP3034140B2 (en) Character generation method and device
JPH06274303A (en) Multi-window display method
JPS63137378A (en) Graphics processing system
JP3594625B2 (en) Character input device
JP3129717B2 (en) Image processing apparatus and image processing method
JPH01314329A (en) Image data processor
JPH06110442A (en) Character / graphics processing apparatus and method for processing deformation of character or graphic
JP2835056B2 (en) High quality character pattern generation method
JPH0245889A (en) Area painting out method
JPH02130689A (en) Graphic processor
JPS6288049A (en) Design generator
JPH03278190A (en) Polygon painting-out system
JPS6283790A (en) Image processing device
JPH0922472A (en) Image processing method
JPH01156881A (en) Stroke character drawing method
JPH04239984A (en) Graphic display device
JPS61133479A (en) Forming system of face diagram
JPH06342474A (en) Area plotting system
JPH06195437A (en) 3D animation processing system
JPH02308381A (en) Polygon filling method
JPH0322183A (en) Linear drawing control method