JP3078955B2 - Filling method - Google Patents

Filling method

Info

Publication number
JP3078955B2
JP3078955B2 JP16840793A JP16840793A JP3078955B2 JP 3078955 B2 JP3078955 B2 JP 3078955B2 JP 16840793 A JP16840793 A JP 16840793A JP 16840793 A JP16840793 A JP 16840793A JP 3078955 B2 JP3078955 B2 JP 3078955B2
Authority
JP
Japan
Prior art keywords
area
dot
filled
dots
filling
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
JP16840793A
Other languages
Japanese (ja)
Other versions
JPH0773335A (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.)
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 JP16840793A priority Critical patent/JP3078955B2/en
Publication of JPH0773335A publication Critical patent/JPH0773335A/en
Application granted granted Critical
Publication of JP3078955B2 publication Critical patent/JP3078955B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Digital Computer Display Output (AREA)
  • Image Generation (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、ビットマップエディタ
により図形データ内部をドットパターンで塗りつぶして
所望の画像データを編集する塗りつぶし方法に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a filling method for editing desired image data by filling the inside of graphic data with a dot pattern using a bitmap editor.

【0002】[0002]

【従来の技術】図7は従来の塗りつぶし方法を説明する
図であり、ビットマップエディタによる場合を示す。
2. Description of the Related Art FIG. 7 is a diagram for explaining a conventional filling method, and shows a case using a bitmap editor.

【0003】この図に示すように、編集画面上には使用
者が作成編集するビットマップのサイズに対応した格子
51と、その編集状態が表示される。格子51で区切ら
れた矩形領域は、それぞれ作成するビットマップの1ド
ットに対応する。1つのドットは「黒」,「白」の2値
データであり、編集画面上で「黒」または「白」で矩形
領域を塗りつぶすことでドットの状態表示を行う。
As shown in FIG. 1, a grid 51 corresponding to the size of a bitmap created and edited by a user and an editing state thereof are displayed on an editing screen. The rectangular areas divided by the lattice 51 correspond to one dot of the bitmap to be created. One dot is binary data of “black” and “white”, and a dot state is displayed by filling a rectangular area with “black” or “white” on the editing screen.

【0004】編集は、ポインティングデバイス操作によ
り行い、ポインティングデバイスの、例えば「左ボタ
ン」のクリックまたはドラッグにより指定されたドット
を「黒」に、またポインティングデバイスの「右ボタ
ン」のクリックまたはドラッグにより指定されたドット
を「白」に設定する。例えばドット52をポインティン
グデバイスにより指定し、左ボタンを押下したまま軌跡
53に沿って移動(ドラッグ)すると、それらのドット
52が「黒」に設定され、表示される。
Editing is performed by operating a pointing device. For example, a dot designated by clicking or dragging a "left button" of the pointing device is set to "black", and a dot designated by clicking or dragging a "right button" of the pointing device. The white dots to “white”. For example, when the dots 52 are designated by a pointing device and moved (drag) along the locus 53 while holding down the left button, those dots 52 are set to “black” and displayed.

【0005】また、特に図示していないが、通常は付加
機能として「円」や「直線」の描画や、一部領域のコピ
ー/移動/消去等を選択するボタンが用意されており、
これらにより使用者はポインティングデバイスをペン代
わりに用いてコンピュータ画面上に任意の「絵」を描く
ことができる。
[0005] Although not shown in particular, buttons for drawing "circles" and "straight lines" and for selecting copy / move / erase of a partial area are provided as additional functions.
These allow the user to draw an arbitrary "picture" on the computer screen using a pointing device instead of a pen.

【0006】このようにビットマップエディタは、使用
者がいわばフリーハンドで「絵」を描くものである。従
って、その際には当然その一部、特にあらかじめ描画し
ておいた輪郭の中を塗りつぶす操作が多く行われること
になる。このため、従来のビットマップエディタでは、
この「図形塗りつぶし」を実行するために、以下の
(1)〜(3)の各機能を有している場合がある。
As described above, the bitmap editor allows a user to draw a "picture" in a freehand manner. Therefore, in this case, naturally, a lot of operations are performed for painting a part of the outline, particularly the outline drawn in advance. For this reason, in the conventional bitmap editor,
In order to execute the “figure filling”, the following functions (1) to (3) may be provided.

【0007】(1)カーソル等で指示された1ドットを
塗りつぶす機能 (2)一度に塗りつぶすドット領域を変更する(ペンの
太さを変更する)機能 (3)閉領域をプログラムで判断し、その領域を塗りつ
ぶす機能 このうち、(1)の機能は、ビットマップエディタの基
本機能であり、この操作を繰り返すことにより、任意の
領域を塗りつぶすことができる。また、(2)の機能
は、通常はマウスで指示される塗りつぶし領域が1ドッ
トであるのに対して、ポインティングデバイスで指示さ
れたドットを中心とする円や矩形領域の複数ドット領域
を一度に塗りつぶすことにより、効率よく塗りつぶすし
ていくという操作を可能とするものである。さらに、
(3)の機能は、対象となる閉じた曲線図形内の1点を
ポインティングデバイスで指定することによりプログラ
ムが塗りつぶす閉じた領域を判断し、塗りつぶし処理を
実行する。これにより指定された閉じた領域を一度に塗
りつぶすことができる。
(1) A function for painting one dot designated by a cursor or the like (2) A function for changing a dot area to be painted at once (changing the thickness of a pen) (3) A closed area is determined by a program, and Function of Filling Area The function (1) is a basic function of the bitmap editor, and an arbitrary area can be filled by repeating this operation. In addition, the function (2) has a feature that a solid area designated by a mouse is usually one dot, while a plurality of dot areas such as a circle or a rectangular area centered on a dot designated by a pointing device are simultaneously formed. By painting, it is possible to perform an operation of painting efficiently. further,
The function (3) determines a closed area to be painted by the program by designating one point in the target closed curve figure with a pointing device, and executes the painting process. As a result, the specified closed area can be painted at a time.

【0008】[0008]

【発明が解決しようとする課題】従来の塗りつぶし方法
による図形の塗りつぶしに際しては、(1)の機能のよ
うなドット単位の塗りつぶしでは使用者の作業負担が大
きい。また、(2)の機能は、いわば「太いペン」を用
いて塗りつぶして行くものであるが、不必要な領域に対
してまで塗りつぶしを行ってしまう可能性が大きく、細
かな作業領域の塗りつぶしには不向きであり、効率の面
から明らかに良くない。
When a figure is painted by the conventional painting method, the work load on the user is large if the painting is performed in dot units as in the function (1). In addition, the function (2) is to fill using a "thick pen", so to speak. However, there is a high possibility that an unnecessary area is filled, so that a small work area can be filled. Is unsuitable and obviously not very efficient.

【0009】また、閉じた領域をプログラムが判断し塗
りつぶす機能は、対象が完全な閉じた曲線図形でなけれ
ばならず、また、閉じた領域全体に対してのみ処理を実
行するので、閉じた領域のうち一部を塗りつぶすような
ことはできない。また、完全に閉じた曲線でなければ動
作がおかしくなる。不完全な図形に対しては閉じた曲線
図形を補完するアルゴリズム等が考えられるが、いずれ
にせよ使用者が意図した領域を塗りつぶすことができ難
いという幾多の問題点があった。
In the function of determining and filling a closed area by a program, the target must be a completely closed curved figure, and processing is performed only on the entire closed area. You can't paint some of them. If the curve is not completely closed, the operation will be strange. For an incomplete figure, an algorithm or the like for complementing a closed curve figure is conceivable, but in any case, there are a number of problems that it is difficult for a user to paint an intended area.

【0010】本発明は、上記問題点を解決するためにな
されたのもで、塗りつぶし処理を行なうための所定のサ
イズの塗りつぶし領域の移動に伴って塗りつぶし領域内
、塗りつぶしの対象となる図形を構成する描画ドット
が存在するか否かを判断しながら、描画ドットで形成さ
れる図形の境界と、塗りつぶし領域の内、塗りつぶし領
域の中心を含むことにより特定される塗りつぶし領域の
部分領域に対して塗りつぶし処理を実行することによ
り、あるサイズの塗りつぶし領域を有するペンで自由に
塗りを行いながらも、図等のデータがあれば、その領域
部分で、あるサイズの塗りつぶし領域がはみ出すことな
く塗りを行える塗りつぶし方法を提供することを目的と
する。
The present invention has been made in order to solve the above-mentioned problems, and has a predetermined support for performing a filling process.
The size of the fill area fill with the movement of the region, while determining whether drawing dots constituting a figure to be filled is present, is formed by drawing dots
The boundary of the shape to be filled and the
Of the filled area identified by including the center of the area
By executing the filling process on the partial area , while freely painting with a pen having a filled area of a certain size, if there is data such as a figure, the filled area of a certain size protrudes in that area part It is an object of the present invention to provide a filling method capable of performing a coating without any need.

【0011】[0011]

【問題点を解決するための手段】本発明に係る塗りつぶ
し方法は、塗りつぶし処理を行うための所定のサイズ
の塗りつぶし領域の移動に伴って、前記塗りつぶし領域
内に、塗りつぶしの対象となる図形を構成する描画ドッ
トが存在するか否かを判断し、前記判断により前記塗り
つぶし領域内に前記図形を構成する描画ドットが存在す
ると判断された場合、前記描画ドットで形成される前記
図形の境界と、前記塗りつぶし領域の内、前記塗りつぶ
し領域の中心を含むことにより特定される前記塗りつぶ
し領域の部分領域に対して、塗りつぶし処理を行うこ
とを有したものである。
The method fills the present invention Problems To achieve the], along with the filling process to the movement of the fill area of a predetermined size of a row of Utame, the fill region, the target fill it is determined whether drawing dots exists to configure the graphic, the case where drawing dots constituting the graphic into the fill area is determined to exist by the judgment, the formed by the drawing dots
The boundary of the figure and the fill area within the fill area
The fill identified by including the center of the region
Relative to the area of the partial region, in which the filling process having a row of Ukoto.

【0012】[0012]

【作用】本発明においては、塗りつぶし処理を行なうた
めの所定のサイズの塗りつぶし領域の移動に伴って塗り
つぶし領域内に、塗りつぶしの対象となる図形を構成す
る描画ドットが存在するか否かを判断し、該判断により
前記塗りつぶし領域内に前記図形を構成する描画ドット
が存在すると判断された場合、前記描画ドットで形成さ
れる前記図形の境界と、前記塗りつぶし領域の内、前記
塗りつぶし領域の中心を含むことにより特定される前記
塗りつぶし領域の部分領域に対して、塗りつぶし処理を
って、あるサイズの塗りつぶし領域を有するペンで
自由に塗りを行いながらも、図等のデータがあれば、そ
の領域部分で、あるサイズの塗りつぶし領域がはみ出す
ことなく塗りを行うことを可能とする
According to the present invention, a filling process is performed.
In the region filled with the movement of the filled area of a predetermined size fit, it is determined whether drawing dots constituting a figure to be filled is present, the graphic into the filling area by the determination If drawing dots constituting is determined to exist, it is formed by the drawing dots
The boundary of the figure to be
The above identified by including the center of the filled area
Against filled area of the partial region, I fill process <br/> line Do, even while freely colored with a pen having a fill area of a certain size, if there is data in FIG etc., in the area portion Thus, it is possible to perform the painting without filling the filled area of a certain size.

【0013】[0013]

【実施例】図1は本発明の一実施例を示す塗りつぶし方
法を適用するデータ処理装置の一例を示すブロック図で
ある。
FIG. 1 is a block diagram showing an example of a data processing apparatus to which a painting method according to an embodiment of the present invention is applied.

【0014】図において、1は画面装置で、使用者が描
画・作成するビットパターンおよびカーソルを表示する
表示画面を有する。2はCPUで、図示しないROMに
記憶された制御プログラムに基づいてポインティングデ
バイス4,メモリ3のアクセスを制御する。ポインティ
ングデバイス4は画面装置1上に表示されているカーソ
ルの位置を移動させ、メモリ3は描画・作成中のドット
パターンデータを主として描画・作成に必要なデータを
記憶する。
Referring to FIG. 1, reference numeral 1 denotes a screen device having a display screen for displaying a bit pattern and a cursor drawn and created by a user. A CPU 2 controls access to the pointing device 4 and the memory 3 based on a control program stored in a ROM (not shown). The pointing device 4 moves the position of the cursor displayed on the screen device 1, and the memory 3 stores data necessary for drawing / creation mainly on the dot pattern data being drawn / created.

【0015】図2は本発明の一実施例を示す塗りつぶし
方法を説明する図であり、図1に示した画面装置1に表
示されるビットマップエディタ画面を例として説明す
る。なお、本実施例において、「ペンによる描画」と
は、マウス操作によりドットパターンを編集画面上に描
くことを意味する。また、一度に塗りつぶす領域は通常
1ドットであるが、マウスで指示されたドットを中心と
する円や矩形領域の複数ドット領域全体を指定すること
もできる。この時、その一度に塗りつぶす領域の大きさ
を「ペンサイズ」とし、領域を「ペン先領域」とする。
FIG. 2 is a diagram for explaining a filling method according to an embodiment of the present invention. The bitmap editor screen displayed on the screen device 1 shown in FIG. 1 will be described as an example. In the present embodiment, “drawing with a pen” means drawing a dot pattern on an editing screen by operating a mouse. The area to be painted at one time is usually one dot, but it is also possible to specify the whole of a plurality of dot areas such as a circle or a rectangular area centered on the dot designated by the mouse. At this time, the size of the area to be painted at one time is “pen size”, and the area is “pen nib area”.

【0016】図において、11〜13はエディットメニ
ューで、エディットメニュー11はペン色選択メニュー
に対応し、「黒」,「白」のいずれかを選択可能に構成
されており、現在反転表示されている「黒」が選択状態
を示す。エディットメニュー12はペンサイズ選択メニ
ューに対応し、「5ドット」,「9ドット」,「15ド
ット」を選択可能に構成されており、現在反転表示され
ている「9ドット」が選択されている状態を示す。エデ
ィットメニュー13はペン形状選択メニューに対応し、
「矩形」,「円」のいずれかを選択可能に構成されてお
り、現在反転表示されている「矩形」が選択されている
状態に対応する。
In the drawing, reference numerals 11 to 13 denote an edit menu, and an edit menu 11 corresponds to a pen color selection menu, and is configured so that either "black" or "white" can be selected. “Black” indicates the selected state. The edit menu 12 corresponds to the pen size selection menu, and is configured such that “5 dots”, “9 dots”, and “15 dots” can be selected, and “9 dots” currently highlighted is selected. Indicates the status. The edit menu 13 corresponds to the pen shape selection menu,
Either “rectangle” or “circle” is configured to be selectable, and corresponds to a state where the currently highlighted “rectangle” is selected.

【0017】なお、操作は、あらかじめ上記エディット
メニュー11〜13において、ペンのサイズ,形状,色
を設定し、エディタ上でポインティングデバイスの左ボ
タンを「クリック」または「ドラッグ」することによ
り、ペン先領域単位で塗りつぶし処理を実行する。
The operation is performed by setting the size, shape, and color of the pen in the edit menus 11 to 13 in advance, and by clicking or dragging the left button of the pointing device on the editor, the pen tip is operated. Executes the filling process for each area.

【0018】この図に示されるように、既に画面上に描
画されたドットパターン14に対して実線矩形15で示
される<縦9ドット,横9ドット>サイズのペンを使用
し塗りつぶしを行う場合を示す。×印16はポインティ
ングデバイスにより指定されたペン先領域の中心を示
し、17はペン先領域を示す。ここで、ポインティング
デバイスの左ボタンを各×印を結ぶ矢印18に沿ってド
ラッグさせると、斜線19で示すドット領域が黒く塗り
つぶされる。
As shown in this figure, a case where a dot pattern 14 already drawn on the screen is painted using a pen of <vertical 9 dots, horizontal 9 dots> size indicated by a solid line rectangle 15 is used. Show. An x mark 16 indicates the center of the pen tip area specified by the pointing device, and 17 indicates a pen tip area. Here, when the left button of the pointing device is dragged along the arrow 18 connecting the X marks, the dot area indicated by the oblique line 19 is painted black.

【0019】この様に構成されたデータ処理装置におい
て、画面装置1のドットマトリクス上に前記所定サイズ
の塗りつぶし領域を設定表示し、該設定表示された塗り
つぶし領域の移動指示(ポインティングデバイス4のカ
ーソル指示による)に従って前記塗りつぶし領域内に塗
りつぶされた指定色の描画ドット有無を(後述する図5
に示す制御手順に従って行う)CPU2が判定し、該判
定結果に基づいてメモリ3の前記塗りつぶし領域内の前
記描画ドットの内側の未塗りドットまたは前記塗りつぶ
し領域内を指定色で塗りつぶす。
In the data processing apparatus thus configured, the predetermined size of the filled area is set and displayed on the dot matrix of the screen device 1, and the moving instruction of the set and displayed filled area (the cursor instruction of the pointing device 4). The presence or absence of a drawing dot of the designated color filled in the filled area according to (see FIG. 5 described later)
CPU 2 makes a determination, and based on the determination result, fills the unpainted dot inside the drawn dot or the filled area in the filled area of the memory 3 with the designated color.

【0020】具体的には、画面装置1上に、使用者がポ
インティングデバイス4を用いてドットパターンを描画
・作成するビットマップエディタによる描画された輪郭
の内部の塗りつぶし処理を行う際に、ポインティングデ
バイス4により指示される描画中心より2ドット以上を
含む塗りつぶし領域(本実施例ではブロックとして設定
されるペン先領域17)を設定し、既に描画されたドッ
トパターンとポインティングデバイス4により指示され
た該塗りつぶし領域内部から、該塗りつぶし領域の中に
既に描画されたドットが存在する場合には、前記ポイン
ティングデバイス4により指示される描画中心(図2の
×印16)より既に描画されたドットまでを塗りつぶし
の対象として設定し、また、該塗りつぶし領域の中に既
に描画されたドットが存在しない場合には、塗りつぶし
領域の内部全体を塗りつぶしの対象として設定し、該設
定された塗りつぶし対象を塗りつぶすことにより、閉じ
た領域でない領域で、かつ上記ブロック内に既に描画さ
れた黒または白ドットの内側の白または黒ドットを黒ま
たは白ドットに塗りつぶすことができるので、領域限定
された範囲でかつ既に塗りつぶされたドットに支障なく
塗りつぶしを行えるため、塗りつぶし処理を格段に効率
化することができる。
More specifically, when the user performs a filling process on the inside of the outline drawn by the bitmap editor that draws and creates a dot pattern on the screen device 1 using the pointing device 4, 4 to set a filled area including two or more dots from the drawing center (in this embodiment, the pen tip area 17 set as a block), and the already drawn dot pattern and the filled area specified by the pointing device 4. When there are already drawn dots in the filled area from the inside of the area, the area from the drawing center (x mark 16 in FIG. 2) designated by the pointing device 4 to the already drawn dots is filled. Set as the target, and the already drawn dots in the filled area. Does not exist, the entire inside of the filled area is set as a target to be filled, and the set filling target is filled, so that a black or white area which is not a closed area and has already been drawn in the block. Since the white or black dots inside the dots can be filled with black or white dots, it is possible to paint the already filled dots within the limited area and without any trouble, making the filling process much more efficient. it can.

【0021】以下、斜線19で示すドット領域を黒く塗
りつぶす処理について図3に示すフローチャートを参照
しながら詳細に説明する。
Hereinafter, the process of filling the dot area indicated by the oblique line 19 with black will be described in detail with reference to the flowchart shown in FIG.

【0022】なお、格子で表示される編集画面の左下の
ドットを原点として、横方向にX軸を、縦方向にY軸を
立てて、ドット位置をX−Yの二次元座標20で表す。
また、各ドットのデータの値は「黒」をONデータ、
「白」をOFFデータとして取り扱い、例えば「(X,
Y)=(2,6)はONである。」と表す。
With the dot at the lower left of the edit screen displayed as a grid as the origin, the X axis is set in the horizontal direction and the Y axis is set in the vertical direction, and the dot position is represented by XY two-dimensional coordinates 20.
For the value of each dot data, "black" is ON data,
"White" is treated as OFF data. For example, "(X,
Y) = (2,6) is ON. ".

【0023】図3は本発明の一実施例を示す塗りつぶし
方法を説明するフローチャートである。なお、(1)〜
(5)は各ステップを示す。
FIG. 3 is a flowchart for explaining a painting method according to an embodiment of the present invention. In addition, (1)-
(5) shows each step.

【0024】まず、ポインティングデバイス4のボタン
が押下されていなければ塗りつぶし操作の終了を確認し
(1)、終了でなければポインティングデバイス4によ
り指定される編集画面上の位置座標(X,Y)=(X
0,Y0)を求め、位置座標と既に指定されているペン
サイズからペン先領域内のデータを2次元の配列バッフ
ァA(−4:4,−4:4)に取り込む(3)。また、
最終的な塗りつぶし領域を設定するためにOFFデータ
で初期化された上記配列バッファAと同じサイズのバッ
ファ(−4:4,−4:4)を用意する。これらの両バ
ッファの各配列要素はペンサイズ領域の各ドットに1対
1に対応する。
First, if the button of the pointing device 4 has not been pressed, the end of the painting operation is confirmed (1). If not, the position coordinates (X, Y) on the editing screen designated by the pointing device 4 = (X
(0, Y0) is obtained, and the data in the pen tip area is taken into the two-dimensional array buffer A (-4: 4, -4: 4) based on the position coordinates and the pen size already specified (3). Also,
A buffer (-4: 4, -4: 4) having the same size as the array buffer A initialized with OFF data is prepared to set a final filled area. Each array element in both of these buffers has a one-to-one correspondence with each dot in the pen size area.

【0025】次いで、配列バッファAに取り込まれた各
ドットデータを順次検索することにより塗りつぶす処理
対象領域を判断し、バッファBにセットする(4)。そ
の後、セットされたバッファBの情報に基づいて処理対
象領域を塗りつぶし(5)、塗りつぶし完了後ステップ
(1)に戻り、処理を繰り返す。
Next, the area to be painted is determined by sequentially searching the dot data taken into the array buffer A and set in the buffer B (4). Thereafter, the area to be processed is painted (5) based on the set information of the buffer B, and after the painting is completed, the process returns to step (1) and the processing is repeated.

【0026】以下、図4,図5を参照しながら図3に示
した処理対象領域判断処理動作について説明する。
The operation of determining the area to be processed shown in FIG. 3 will be described below with reference to FIGS.

【0027】図4は、図3に示した処理対象領域判断処
理の第1の詳細手順の一例を示すフローチャートであ
る。なお、(1),(2)は各ステップを示す。
FIG. 4 is a flowchart showing an example of the first detailed procedure of the processing target area judgment processing shown in FIG. Note that (1) and (2) indicate each step.

【0028】まず、配列バッファAを4つのブロックに
分ける(1)。なお、本実施例では、各ブロックはペン
先領域をその中心である(X,Y)=(X0,Y0)を
原点座標としてX−Y方向に以下の定義域〔1〕〜
〔4〕をもつ領域(ブロック)に分けたものに対応す
る。
First, the array buffer A is divided into four blocks (1). In the present embodiment, each block has the following definition areas [1] to [X] in the X-Y direction with (X, Y) = (X0, Y0) as the origin coordinates at the center of the pen tip area.
It corresponds to one divided into areas (blocks) having [4].

【0029】 〔ブロック1〕右上:X0 <=X<=X0+4 Y0 <=Y<=Y0+4 〔ブロック2〕左上:X0−4 <=X<X0 Y0 <=Y<=Y0+4 〔ブロック3〕左下:X0−4<=X<X0 Y0−4 <=Y<=Y0 〔ブロック4〕右下:X0 <=X<=X0+4 Y0−4 <=Y<Y0 次いで、上記〔ブロック1〕〜〔ブロック4〕の全ての
ブロックについて順次塗りつぶし領域を後述する図5に
示すフローチャートに基づいて判断し、バッファBにセ
ットし(2)、処理を終了する。
[Block 1] Upper right: X0 <= X <= X0 + 4 Y0 <= Y <= Y0 + 4 [Block 2] Upper left: X0-4 <= X <X0 Y0 <= Y <= Y0 + 4 [Block 3] Lower left: X0-4 <= X <X0 Y0-4 <= Y <= Y0 [Block 4] Lower right: X0 <= X <= X0 + 4 Y0-4 <= Y <Y0 Then, the above [Block 1] to [Block 4] Are sequentially determined based on the flowchart shown in FIG. 5 to be described later, set in the buffer B (2), and the processing is terminated.

【0030】図5は、図4に示した分割されたブロック
毎の塗りつぶし領域判断処理の詳細手順を示すフローチ
ャートである。なお、(1)〜(21)は各ステップを
示す。
FIG. 5 is a flowchart showing a detailed procedure of the paint area determination processing for each of the divided blocks shown in FIG. Note that (1) to (21) indicate each step.

【0031】処理したドットの数をカウントするための
変数をX軸方向にi,Y軸方向にjを用意し、いずれも
その値を「0」にする(1)。次いで、変数iが「5」
かどうかを判断し(2)、YESならば変数jを「1」
インクリメントし(3)、変数jが「5」かどうかを判
断し(4)、NOならば変数iを「0」に初期化して
(5)、ステップ(2)に戻る。
As variables for counting the number of processed dots, i is prepared in the X-axis direction and j is prepared in the Y-axis direction, and their values are set to "0" (1). Next, the variable i is “5”
(2) If YES, the variable j is set to “1”
Increment (3), it is determined whether the variable j is "5" (4), and if NO, the variable i is initialized to "0" (5), and the process returns to step (2).

【0032】一方、ステップ(4)の判定で変数jが
「5」と判定された場合には、変数i,jを「0」に設
定する(11)。
On the other hand, if the variable j is determined to be "5" in the determination in step (4), the variables i and j are set to "0" (11).

【0033】一方、ステップ(2)の判定でNOの場合
は、データ(X,Y)=(X0+i,Y0+j)を求め
(6)、求めたデータがONかどうかを判定し(7)、
YESならば変数iを「5」として(8)、ステップ
(2)に戻る。
On the other hand, if the determination in step (2) is NO, data (X, Y) = (X0 + i, Y0 + j) is obtained (6), and it is determined whether the obtained data is ON (7),
If YES, the variable i is set to "5" (8), and the process returns to step (2).

【0034】これにより、ブロック内の全てのY軸方向
領域、すなわちj=0〜4に対してバッファA(X0,
Y+j)からX軸方向へ、各ドットデータを順次検索す
る。その際、既に描かれたドットが検索された場合、す
なわち、バッファA(X0+i,Y0+j)の値がON
の場合には、Y=Y0+jにおけるX=0からX=X0
+iまでを、また描かれたドットが検索されなかった場
合には、Y=Y0+jにおけるX軸方向の全てのドット
を処理対象候補として対応するバッファBの配列要素に
セットする。
Thus, the buffer A (X0, X0,
Each dot data is sequentially searched from Y + j) in the X-axis direction. At this time, when the already drawn dot is searched, that is, the value of the buffer A (X0 + i, Y0 + j) is ON.
, X = 0 to X = X0 in Y = Y0 + j
+ I, and if no drawn dot is found, all dots in the X-axis direction at Y = Y0 + j are set in the corresponding buffer B array elements as processing target candidates.

【0035】一方、ステップ(11)で変数i,jを
「0」とした後、変数jが「5」かどうかを判定し(1
2)、YESならば変数iを「1」インクリメントし
(13)、変数iが「5」かどうかを判定し(14)、
YESならば処理を終了し、NOならば変数jを「0」
とし(15)、ステップ(12)に戻る。
On the other hand, after setting variables i and j to "0" in step (11), it is determined whether variable j is "5" (1).
2) If YES, the variable i is incremented by "1" (13), and it is determined whether the variable i is "5" (14),
If YES, terminate the process. If NO, set variable j to "0".
(15), and return to step (12).

【0036】一方、ステップ(12)の判定でNOの場
合はデータ(X,Y)=(X0+i,Y0+j)を求め
(16)、求めたデータがONかどうかを判定し(1
7)、YESならば以後のデータをOFFとしてバッフ
ァBにセットし、変数jを「5」として(18)、ステ
ップ(12)に戻る。
On the other hand, if the determination in step (12) is NO, data (X, Y) = (X0 + i, Y0 + j) is obtained (16), and it is determined whether the obtained data is ON (1).
7) If YES, the subsequent data is turned OFF and set in buffer B, variable j is set to "5" (18), and the process returns to step (12).

【0037】一方、ステップ(17)の判定でNOの場
合は、バッファB(X0+i,Y0+j)は既に塗りつ
ぶし対象候補かどうかを判定し(19)、NOならばバ
ッファB(X0+i,Y0+j)を塗りつぶし対象外と
してセットし(20)、ステップ(12)に戻る。
On the other hand, if the determination in step (17) is NO, it is determined whether the buffer B (X0 + i, Y0 + j) is already a candidate for painting (19). If NO, the buffer B (X0 + i, Y0 + j) is painted. Set as non-target (20) and return to step (12).

【0038】一方、ステップ(19)の判断でYESの
場合は、バッファB(X0+i,Y0+j)を塗りつぶ
し対象ドットとしてセットして(21)、ステップ(1
2)に戻る。
On the other hand, if the determination in step (19) is YES, buffer B (X0 + i, Y0 + j) is set as a dot to be painted (21), and step (1) is performed.
Return to 2).

【0039】これにより、ブロック1内において、全て
のX軸方向領域、すなわち、i=0〜4に対してバッフ
ァA(X0+i,Y0)からY軸方向へ、各ドットデー
タを順次検索する。その際、既に描かれたドットが検索
された場合、すなわちバッファA(X0+i,Y0+
j)の値がONの場合には、X=X0+iにおけるY=
0からY=Y0+jまでを、また既に描かれたドットが
検索されなかった場合には、X=X0+iにおけるY軸
方向の全てのドットを処理対象候補として、対応するバ
ッファBの配列要素にセットする。
Thus, in the block 1, each dot data is sequentially searched from the buffer A (X0 + i, Y0) in the Y-axis direction for all the X-axis direction areas, that is, i = 0 to 4. At this time, when the already drawn dot is searched, that is, the buffer A (X0 + i, Y0 +
When the value of j) is ON, Y = X = X0 + i
From 0 to Y = Y0 + j, and if no already drawn dots are found, all dots in the Y-axis direction at X = X0 + i are set as processing target candidates in the corresponding array elements of the buffer B. .

【0040】また、ブロック1における処理対象領域の
判断ではX軸方向およびY軸方向で同じドットが2度検
索されるが、ステップ(18)〜(20)により、とも
に処理対象候補となるドットのみを最終的な塗りつぶし
処理対象ドットとしてバッファBにセットする。
In the determination of the processing target area in the block 1, the same dot is searched twice in the X-axis direction and the Y-axis direction. However, in steps (18) to (20), only the dots which are both processing target candidates are determined. Is set in the buffer B as the final dot to be painted.

【0041】以下、図6に示すフローチャートを参照し
ながら図3に示した処理対象領域判断処理の他の例につ
いて説明する。
Hereinafter, another example of the processing target area determination processing shown in FIG. 3 will be described with reference to the flowchart shown in FIG.

【0042】図6は、図3に示した処理対象領域判断処
理の第2の詳細手順の一例を示すフローチャートであ
る。なお、(1),(2)は各ステップを示す。また、
本実施例では従来技術で示した塗りつぶし機能を備え
て、閉じた領域を塗りつぶすことができるものとする。
FIG. 6 is a flowchart showing an example of the second detailed procedure of the processing target area determination processing shown in FIG. Note that (1) and (2) indicate each step. Also,
In the present embodiment, it is assumed that a closed area can be filled with the filling function shown in the related art.

【0043】まず、図1に示したポインティングデバイ
ス4により指定されたペン先領域に外接するドットを仮
想的に描画し、閉じた領域を作成する(1)。その後、
ペン先領域の中心を内部の点とする閉じた領域を改めて
判断し(2)、その閉じた領域を処理対象領域とする。
閉じた領域がない場合には、あらかじめ描画した外接領
域、すなわちペン先領域全体を処理対象領域とする。
First, a dot circumscribing the pen point area specified by the pointing device 4 shown in FIG. 1 is virtually drawn to create a closed area (1). afterwards,
A closed area having the center of the pen tip area as an internal point is determined again (2), and the closed area is set as a processing target area.
If there is no closed area, the circumscribed area drawn in advance, that is, the entire pen tip area is set as the processing target area.

【0044】これにより、設定されたペンサイズを越え
る領域を塗りつぶすことは決してなく、ペン先領域17
の中に既に描かれた輪郭があれば、それらのペン先中心
の側の領域のみが塗りつぶされることになる。
As a result, the area exceeding the set pen size is never filled, and the pen tip area 17 is not filled.
If there are already drawn outlines in, only the area near the pen tip center will be filled.

【0045】従って、使用者が塗りつぶしを行う際に
は、既に描画された輪郭の内側をポインティングデバイ
ス4でなぞっていけば良いので、効率よく塗りつぶしを
行うことができる。また、輪郭に多少「欠け」があって
も、設定されたペンサイズ以上に大きくはみ出して塗り
つぶしてしまうことは無いので、その後、はみ出し部分
の修正が大幅に軽減される。
Therefore, when the user paints, the user only has to trace the inside of the already drawn outline with the pointing device 4, so that the painting can be performed efficiently. In addition, even if the outline has some "missing" portions, it does not protrude beyond the set pen size and is painted out, so that the correction of the protruding portion is greatly reduced thereafter.

【0046】なお、上記実施例では、ペン先形状が矩形
で、サイズが9ドットであるペンを用いた「黒」による
塗りつぶしを例としたが、本発明は塗りつぶし処理にお
いて「黒」でなく、「白」による塗りつぶしや任意の模
様パターンによる塗りつぶし、また、ペン先の形状を変
更、更にカラー化といった拡張にも容易に適用すること
ができる。
In the above-described embodiment, an example is given in which a pen having a rectangular nib shape and a size of 9 dots is used to fill with "black". It can be easily applied to filling with “white”, filling with an arbitrary pattern, and changing the shape of the pen tip, and further expanding the color.

【0047】また、上記実施例では、塗りつぶしのため
のペン先形状種が矩形と円の2種類を示したが、他の閉
じた任意形状をペン先形状としてもいいし、筆圧を感知
してドットサイズを変更してもよい。
Further, in the above-described embodiment, two types of pen tip shapes for filling are shown, that is, a rectangle and a circle. However, any other closed arbitrary shape may be used as the pen tip shape, and the pen pressure may be detected. To change the dot size.

【0048】[0048]

【発明の効果】以上説明したように、本発明に係る塗り
つぶし方法よれば、塗りつぶし処理を行なうための所
定のサイズの塗りつぶし領域の移動に伴って塗りつぶし
領域内に、塗りつぶしの対象となる図形を構成する描画
ドットが存在するか否かを判断し、該判断により前記塗
りつぶし領域内に前記図形を構成する描画ドットが存在
すると判断された場合、前記描画ドットで形成される前
記図形の境界と、前記塗りつぶし領域の内、前記塗りつ
ぶし領域の中心を含むことにより特定される前記塗りつ
ぶし領域の部分領域に対して、塗りつぶし処理を行
ので、あるサイズの塗りつぶし領域を有するペンで自由
に塗りを行いながらも、図等のデータがあれば、その領
域部分で、あるサイズの塗りつぶし領域がはみ出すこと
なく塗りを行うができる。
As described above , according to the filling method according to the present invention, the place for performing the filling process is described.
In the region filled with the movement of the filled area of constant size, it is determined whether drawing dots constituting a figure to be filled is present, constituting the graphic into the filling area by the determination If it is determined that a drawing dot is present, before it is formed by the drawing dot
The boundary of the drawing and the filling
The fill identified by including the center of the shaded area
Relative department Shi region of the partial region, filling process lines as the Unode, even while freely colored with a pen having a fill area of a certain size, if there is data in FIG like, in that region part, of a certain size The painting can be performed without the filled area protruding.

【0049】従って、塗りつぶし処理を格段に効率化す
ることができるという効果を奏する。
Therefore, there is an effect that the painting process can be made much more efficient.

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

【図1】本発明の一実施例を示す塗りつぶし方法を適用
するデータ処理装置の一例を示すブロック図である。
FIG. 1 is a block diagram illustrating an example of a data processing apparatus to which a painting method according to an embodiment of the present invention is applied.

【図2】本発明の一実施例を示す塗りつぶし方法を説明
する図である。
FIG. 2 is a diagram illustrating a painting method according to an embodiment of the present invention.

【図3】本発明の一実施例を示す塗りつぶし方法を説明
するフローチャートである
FIG. 3 is a flowchart illustrating a painting method according to an embodiment of the present invention.

【図4】図3に示した処理対象領域判断処理の第1の詳
細手順の一例を示すフローチャートである。
FIG. 4 is a flowchart illustrating an example of a first detailed procedure of a processing target area determination process illustrated in FIG. 3;

【図5】図4に示した分割されたブロック毎の塗りつぶ
し領域判断処理の詳細手順を示すフローチャートであ
る。
FIG. 5 is a flowchart illustrating a detailed procedure of a filled area determination process for each divided block illustrated in FIG. 4;

【図6】図3に示した処理対象領域判断処理の第2の詳
細手順の一例を示すフローチャートである。
FIG. 6 is a flowchart illustrating an example of a second detailed procedure of the processing target area determination processing illustrated in FIG. 3;

【図7】従来の塗りつぶし方法を説明する図である。FIG. 7 is a diagram illustrating a conventional filling method.

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

1 画面装置 2 CPU 3 メモリ 4 ポインティングデバイス 1 screen device 2 CPU 3 memory 4 pointing device

フロントページの続き (56)参考文献 特開 昭60−163164(JP,A) 特開 平4−218876(JP,A) 特開 平4−180176(JP,A) 遠藤悦郎「Adobe Photos hop AtoZ」,株式会社ビー・エ ヌ・エヌ,1993年2月15日,p.60およ びp.122−123 (58)調査した分野(Int.Cl.7,DB名) G06T 11/40 G06T 11/80 Continuation of the front page (56) References JP-A-60-163164 (JP, A) JP-A-4-218876 (JP, A) JP-A-4-180176 (JP, A) Etsuro Endo "Adobe Photoshop hop AtoZ" , BNN, Inc., February 15, 1993, p. 60 and p. 122-123 (58) Field surveyed (Int. Cl. 7 , DB name) G06T 11/40 G06T 11/80

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 塗りつぶし処理を行うための所定のサ
イズの塗りつぶし領域の移動に伴って、前記塗りつぶし
領域内に、塗りつぶしの対象となる図形を構成する描画
ドットが存在するか否かを判断し、 前記判断により前記塗りつぶし領域内に前記図形を構成
する描画ドットが存在すると判断された場合、前記描画
ドットで形成される前記図形の境界と、前記塗りつぶし
領域の内、前記塗りつぶし領域の中心を含むことにより
特定される前記塗りつぶし領域の部分領域に対して、塗
りつぶし処理を行うことを有したことを特徴とする塗
りつぶし方法。
1. A with the filling process to the movement of the fill area of a predetermined size of a row of Utame, the fill area, whether drawing dots constituting a figure to be filled is present If the determination is drawing dots forming the graphic into the fill area is determined to exist by the judgment, the drawing
The border of the figure formed by dots and the fill
By including the center of the filled area in the area,
The filling for the partial region of the region, the method fills, characterized in that the filling process having a row of Ukoto identified.
JP16840793A 1993-06-16 1993-06-16 Filling method Expired - Fee Related JP3078955B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16840793A JP3078955B2 (en) 1993-06-16 1993-06-16 Filling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16840793A JP3078955B2 (en) 1993-06-16 1993-06-16 Filling method

Publications (2)

Publication Number Publication Date
JPH0773335A JPH0773335A (en) 1995-03-17
JP3078955B2 true JP3078955B2 (en) 2000-08-21

Family

ID=15867555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16840793A Expired - Fee Related JP3078955B2 (en) 1993-06-16 1993-06-16 Filling method

Country Status (1)

Country Link
JP (1) JP3078955B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
遠藤悦郎「Adobe Photoshop AtoZ」,株式会社ビー・エヌ・エヌ,1993年2月15日,p.60およびp.122−123

Also Published As

Publication number Publication date
JPH0773335A (en) 1995-03-17

Similar Documents

Publication Publication Date Title
JP2619962B2 (en) Figure editing method and apparatus
EP0635808A2 (en) Method and apparatus for operating on the model data structure on an image to produce human perceptible output in the context of the image
WO1992009966A1 (en) Image synthesis and processing
JPH0584540B2 (en)
JPH0793527A (en) Object-oriented graphic input and display system
JP3078955B2 (en) Filling method
JPH08255221A (en) Character graphic input editing device
JPH01316804A (en) Contour shape defining method
JPH08263688A (en) Method and device for processing handwritten input information
JPH07105395A (en) Information processing unit
EP0439333B1 (en) Electronic image modification
US6848082B1 (en) Reactor-based viewport clipping using arbitrary graphical entities
JP2935336B2 (en) Graphic input / output device
JP2005234610A (en) Freehand-input pattern editing system
JPH10105334A (en) Two-point selected figure moving method by touch panel
JP2751114B2 (en) Character processing method
JP2695257B2 (en) Data processing device
GB2256118A (en) Image synthesis and processing
JPH06110993A (en) Document preparing device
JPH08171646A (en) Graphic preparation device
JP2605690B2 (en) Image creation device
JPH08287265A (en) Segment display method
JPH0546728A (en) Three-dimensional projection body forming system
JP2964778B2 (en) Graphic data processing device
JP3470974B2 (en) Figure creation method and apparatus

Legal Events

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

Free format text: PAYMENT UNTIL: 20080616

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090616

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100616

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110616

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120616

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees