JP2011150619A - Electronic equipment - Google Patents

Electronic equipment Download PDF

Info

Publication number
JP2011150619A
JP2011150619A JP2010012888A JP2010012888A JP2011150619A JP 2011150619 A JP2011150619 A JP 2011150619A JP 2010012888 A JP2010012888 A JP 2010012888A JP 2010012888 A JP2010012888 A JP 2010012888A JP 2011150619 A JP2011150619 A JP 2011150619A
Authority
JP
Japan
Prior art keywords
stroke
writing
coordinate data
unit
erasing
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
JP2010012888A
Other languages
Japanese (ja)
Other versions
JP5482225B2 (en
Inventor
Daisuke Sonoda
大輔 園田
Mamoru Sakai
護 坂井
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2010012888A priority Critical patent/JP5482225B2/en
Publication of JP2011150619A publication Critical patent/JP2011150619A/en
Application granted granted Critical
Publication of JP5482225B2 publication Critical patent/JP5482225B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a calculation amount to delete a writing stroke which intersects with a deletion stroke. <P>SOLUTION: The CPU 40 of electronic equipment 40 specifies coordinate data at a position within a unit area (A) among a series of positions constituting the writing stroke and also coordinate data at a position within a unit area (A) among a series of positions constituting the deletion stroke, among the coordinate data stored in a writing buffer WB concerning one unit area (A) among the unit areas A to which both the writing stroke and the deletion stroke enter, and then, determines by a round robin, the presence/absence of intersection of a line segment connecting the adjacent positions within the unit area (A) among a series of positions constituting the writing stroke with a line segment connecting the adjacent positions within the unit area (A) among a series of positions constituting the deletion stroke by the use of the specified coordinate data. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、手書き入力可能な電子機器に関する。   The present invention relates to an electronic device capable of handwriting input.

従来より、ペンや指などの指示物で画面上の位置を指示することによって文字や図形を手書き入力可能な電子機器が知られている。このような電子機器では、指示物に指示された位置の軌跡(ストローク)が入力される。例えば、画面に表示された画像に文字「T」を書き込む場合には、使用者が指示物によって縦棒と横棒の二つの書込ストロークを入力することにより、画像に「T」が書き込まれる。   2. Description of the Related Art Conventionally, electronic devices that can input characters and figures by handwriting by indicating a position on a screen with an indicator such as a pen or a finger are known. In such an electronic device, the locus (stroke) of the position designated by the indicator is input. For example, when writing the letter “T” on the image displayed on the screen, the user inputs two writing strokes of a vertical bar and a horizontal bar with an instruction, whereby “T” is written on the image. .

このような電子機器の一種として、消去ストロークを入力することにより、当該消去ストロークと交差する書込ストロークを消去可能なものが知られている。このような電子機器としては、特許文献1の段落0005に記載のように、消去ストロークを構成する一連の位置(座標点)のうち隣同士の二点を結ぶ線分と、書込ストロークを構成する一連の位置のうち隣同士の二点を結ぶ線分との交差を総当りで判定し、当該書込ストロークを消去するか否かを決定するものが一般的である。   As one type of such an electronic device, one that can erase a writing stroke that intersects the erasing stroke by inputting the erasing stroke is known. As such an electronic device, as described in paragraph 0005 of Patent Document 1, a line segment connecting two adjacent points in a series of positions (coordinate points) constituting an erasing stroke and a writing stroke are constituted. In general, it is determined whether or not to erase the writing stroke by determining the intersection with a line segment connecting two adjacent points in a series of positions to be erased.

特開2000−259335号公報JP 2000-259335 A

しかし、交差の判定のための演算量は膨大であり、位置検出のサンプリング期間が短いほど多くなり、画面が広いほど多くなる。
そこで、本発明は、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる電子機器の提供を目的としている。
However, the amount of calculation for determining the intersection is enormous, and increases as the sampling period for position detection is shorter, and increases as the screen is wider.
Therefore, an object of the present invention is to provide an electronic apparatus that can reduce the amount of calculation for erasing a writing stroke that intersects an erasing stroke.

本発明に係る電子機器は、複数の単位領域に分割され、画像が表示される画面と、前記画面内の指示された位置を繰り返し検出して座標データを出力するタブレットと、前記画面内の位置の指示の開始から終了までの間に検出される一連の位置で構成される軌跡をストロークとし、前記画像に書き込まれる前記ストロークを書込ストロークとしたとき、前記タブレットから出力された座標データのうち、前記書込ストロークを構成する位置の座標データを順次格納する書込バッファと、前記書込ストロークを消去するための前記ストロークを消去ストロークとしたとき、前記タブレットから出力された座標データのうち、前記消去ストロークを構成する位置の座標データを順次格納する消去バッファと、前記書き込みバッファに格納された座標データのうち、消去されていない前記書込ストロークを構成する一連の位置の座標データを用いて、消去されていない前記書込ストロークが書き込まれた前記画像を生成する画像生成部と、前記一連の位置の座標データが前記消去バッファに格納されると、消去されていない前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを対象ストロークとして特定する候補特定部と、前記対象ストロークとして特定された前記書込ストロークの各々について、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のいずれかにおいて、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、前記一部判定処理の結果が肯定の前記書込ストロークを消去する一部判定消去部とを備え、前記一部判定消去部は、一つの前記書込ストロークに係る前記一部判定処理において、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のうち一つの前記単位領域について、前記書込バッファに格納されている座標データのうち、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データと、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定することを特徴とする。
一般に、消去ストロークと交差する書込ストロークを消去する場合、ある書込ストロークを消去するか否かの判定は、消去ストロークを構成する総ての線分と当該書込ストロークを構成する総ての線分とを総当りで比較して行われる。これに対して、本発明では、画面が複数の単位領域に分割され、当該書込ストロークを構成する線分のうち当該単位領域内の線分と、消去ストロークを構成する線分のうち当該単位領域内の線分とが総当りで比較され、前者の線分のいずれかと後者の線分のいずれかとが交差する場合には、当該書込ストロークが消去される。したがって、本発明によれば、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる。
An electronic apparatus according to the present invention includes a screen that is divided into a plurality of unit areas and displays an image, a tablet that repeatedly detects a designated position in the screen and outputs coordinate data, and a position in the screen Of the coordinate data output from the tablet when the trajectory composed of a series of positions detected from the start to the end of the instruction is a stroke and the stroke written in the image is a writing stroke. A writing buffer for sequentially storing coordinate data of positions constituting the writing stroke, and when the stroke for erasing the writing stroke is an erasing stroke, among the coordinate data output from the tablet, An erasure buffer for sequentially storing coordinate data of positions constituting the erasure stroke, and a position stored in the write buffer. Among the data, an image generation unit that generates the image in which the writing stroke that has not been erased is written using coordinate data of a series of positions that constitute the writing stroke that has not been erased, and the series of data When the coordinate data of the position is stored in the erasure buffer, the writing stroke that enters at least one unit area among the unit areas that the erasing stroke enters among the writing strokes that are not erased. In each of the unit areas in which the writing stroke and the erasing stroke enter together for each of the candidate specifying unit specified as the target stroke and the writing stroke specified as the target stroke, the writing stroke One of the line segments that connect the series of positions adjacent to each other, and the erasing stroke A partial determination process is performed to determine whether or not any of the line segments connecting the series of constituent positions adjacent to each other intersects, and the writing stroke in which the result of the partial determination process is affirmative is erased A partial determination erasure unit, wherein the partial determination erasure unit is configured to include a part of the unit area in which the write stroke and the erasure stroke enter together in the partial determination process related to one write stroke. For one unit area, out of the coordinate data stored in the write buffer, the coordinate data of the position in the unit area of the series of positions constituting the write stroke and the erase stroke are configured. The coordinate data of the position in the unit area among the series of positions to be identified, and using the identified coordinate data, the coordinate data in the series of positions constituting the writing stroke A round robin is used to determine whether or not there is an intersection between a line segment that connects positions in the unit area adjacent to each other, and a line segment that connects positions in the unit area adjacent to each other among the series of positions constituting the erasing stroke. It is characterized by that.
Generally, when erasing a writing stroke that intersects with an erasing stroke, whether or not to erase a certain writing stroke is determined by determining all the lines constituting the erasing stroke and all the lines constituting the writing stroke. This is done by comparing the line segment with the brute force. On the other hand, in the present invention, the screen is divided into a plurality of unit areas, and the line segment in the unit area among the line segments constituting the writing stroke and the unit among the line segments constituting the erasing stroke. The line segments in the area are compared brute force, and if any of the former line segment and any of the latter line segment intersect, the writing stroke is erased. Therefore, according to the present invention, it is possible to reduce the amount of calculation for erasing the writing stroke that intersects the erasing stroke.

この電子機器において、1又は複数の前記書込ストロークの集合をセッションとしたとき、前記書込ストロークは1又は複数の前記セッションのいずれか一つに属し、前記候補特定部は、前記セッションに外接する矩形で囲まれた領域をセッション領域としたとき、前記一連の位置の座標データが前記消去バッファに格納されると、当該一連の位置で構成される前記消去ストロークに外接する矩形で囲まれた領域と重なる前記セッション領域を特定し、特定した前記セッション領域に係る前記セッションに属する前記書込ストロークを特定するセッション特定部と、前記セッション特定部で特定された前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを前記対象ストロークとして特定する対象ストローク特定部とを備えることが好ましい。
この電子機器によれば、消去ストロークに外接する矩形で囲まれた領域と重ならないセッション領域に係るセッションに属する書込ストロークについて、消去ストロークと当該書込ストロークとが共に進入する単位領域は存在しないとみなすことができる。これは、上記の演算量の更なる削減に寄与する。もちろん、セッション特定部と対象ストローク特定部とを備えず、総ての書込ストロークについて、消去ストロークが進入する単位領域のうち当該書込ストロークが進入する単位領域を特定するようにしてもよい。なお、各セッションには、当該セッションに係る条件を満たす一連の書込ストロークのみが属する。例えば、画面内の位置の指示の終了から開始までの期間が一定の基準時間より短い一連の書込ストロークが同一のセッションに属するようにしてもよい。
In this electronic apparatus, when a set of one or more writing strokes is a session, the writing stroke belongs to one of the one or more sessions, and the candidate specifying unit circumscribes the session. When the coordinate data of the series of positions is stored in the erasure buffer, the area enclosed by the rectangles to be enclosed is surrounded by a rectangle circumscribing the erasure stroke composed of the series of positions. A session specifying unit that specifies the session region that overlaps with a region, specifies the writing stroke belonging to the session related to the specified session region, and the erasure among the writing strokes specified by the session specifying unit The writing straw that enters at least one of the unit areas in which a stroke enters. It is preferable to provide a target stroke identification unit that identifies as the target stroke.
According to this electronic apparatus, there is no unit area where both the erase stroke and the write stroke enter the write stroke belonging to the session related to the session area that does not overlap the area surrounded by the rectangle circumscribing the erase stroke. Can be considered. This contributes to further reduction in the amount of computation. Of course, the session specifying unit and the target stroke specifying unit may not be provided, and the unit area into which the writing stroke enters may be specified among all the writing strokes in the unit area into which the erasing stroke enters. Note that each session includes only a series of writing strokes that satisfy the conditions relating to the session. For example, a series of writing strokes in which the period from the end to the start of the position instruction in the screen is shorter than a certain reference time may belong to the same session.

この電子機器において、前記セッション特定部に特定された前記書込ストロークのうち、前記対象ストロークとして特定されなかった前記書込ストロークの各々について、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する全部判定処理を実行し、前記全部判定処理の結果が肯定の前記書込ストロークを消去する全部判定消去部とを備え、前記全部判定消去部は、一つの前記書込ストロークに係る前記全部判定処理において、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定するようにしてもよい。
この電子機器によれば、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについても、消去ストロークとの交差の有無を判定することができるから、消去の精度が向上する。もちろん、全部判定消去部を備えず、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについては消去しないようにしてもよい。この場合、演算量が削減される。
In this electronic apparatus, for each of the writing strokes not specified as the target stroke among the writing strokes specified by the session specifying unit, a series of positions constituting the writing stroke are adjacent to each other. All determination processing is performed to determine whether any of the connecting line segments and any of the line segments connecting the series of positions constituting the erasing stroke adjacent to each other, and the result of the all determination processing is An all-determination erasing unit that erases the affirmative writing stroke, and the all-determination erasing unit determines the series of positions constituting the writing stroke in the all-determination process relating to one writing stroke. Whether or not there is a crossover between the line segment connecting adjacent lines and the line segment connecting the series of positions constituting the erasing stroke adjacent to each other It may be.
According to this electronic apparatus, it is possible to determine whether or not a writing stroke that does not enter any of the unit areas to which the erasing stroke enters can determine whether or not it intersects with the erasing stroke, thereby improving the erasing accuracy. Of course, it is also possible not to provide a complete determination erasure unit and not to erase a writing stroke that does not enter any unit area into which the erasing stroke enters. In this case, the calculation amount is reduced.

上記の各電子機器において、前記全部判定消去部は、前記一部判定処理の判定結果が肯定でない前記書込ストロークの各々についても前記全部判定処理を実行する、ようにしてもよい。
この電子機器によれば、消去の精度が向上する。もちろん、全部判定消去部が、前記一部判定処理の判定結果が肯定でない前記書込ストロークのいずれについても前記全部判定処理を実行しない、ようにしてもよい。つまり、一部判定処理の判定結果が肯定でない書込ストロークについては消去しないようにしてもよい。この場合、演算量が削減される。
In each of the electronic devices described above, the all determination erasure unit may execute the all determination processing for each of the writing strokes for which the determination result of the partial determination processing is not positive.
According to this electronic device, the erasure accuracy is improved. Of course, the complete determination erasure unit may not execute the complete determination process for any of the writing strokes for which the determination result of the partial determination process is not positive. In other words, the writing stroke for which the determination result of the partial determination process is not affirmative may not be erased. In this case, the calculation amount is reduced.

本発明の一実施形態に係る電子機器100の外観を示す平面図である。It is a top view which shows the external appearance of the electronic device 100 which concerns on one Embodiment of this invention. 電子機器100の動作(消去モード)を示す平面図である。6 is a plan view showing an operation (erase mode) of electronic device 100. FIG. 電子機器100の電気的な構成を示すブロック図である。2 is a block diagram showing an electrical configuration of electronic device 100. FIG. 電子機器100の画面11と単位領域Aとの関係を模式的に示す図である。3 is a diagram schematically showing a relationship between a screen 11 of an electronic device 100 and a unit area A. FIG. 電子機器100のRAM60に記憶される書込データWDと消去データEDの内容例を模式的に示す図である。4 is a diagram schematically showing an example of contents of write data WD and erase data ED stored in a RAM 60 of the electronic device 100. FIG. 書込データWD及び消去データEDの更新例を模式的に示す図である。It is a figure which shows typically the update example of the write data WD and the erasure | elimination data ED. 書込データWD及び消去データEDの更新例を模式的に示す図である。It is a figure which shows typically the update example of the write data WD and the erasure | elimination data ED. 書込データWD及び消去データEDの更新例を模式的に示す図である。It is a figure which shows typically the update example of the write data WD and the erasure | elimination data ED. 書込データWD及び消去データEDの更新例を模式的に示す図である。It is a figure which shows typically the update example of the write data WD and the erasure | elimination data ED. 電子機器100が行う消去処理の流れを示す図である。It is a figure which shows the flow of the erasure | elimination process which the electronic device 100 performs. 電子機器100が行う消去処理の流れを示す図である。It is a figure which shows the flow of the erasure | elimination process which the electronic device 100 performs. 電子機器100が行う消去処理の流れを示す図である。It is a figure which shows the flow of the erasure | elimination process which the electronic device 100 performs. 電子機器100の状態の一例を模式的に示す図である。It is a figure which shows an example of the state of the electronic device 100 typically.

<1.構成>
図1は、本発明の一実施形態に係る電子機器100の外観を示す平面図である。この図に示すように、電子機器100は、画像が表示される画面11を備え、画面11内の位置を指示するペン200によって操作される。ペン200による位置の指示は、ペン200を画面11に接触または近接させるペンダウン操作によって開始し、ペン200を画面11から遠ざけるペンアップ操作によって終了する。
<1. Configuration>
FIG. 1 is a plan view showing an appearance of an electronic device 100 according to an embodiment of the present invention. As shown in this figure, the electronic device 100 includes a screen 11 on which an image is displayed, and is operated by a pen 200 that indicates a position in the screen 11. The position instruction by the pen 200 is started by a pen-down operation for bringing the pen 200 into contact with or close to the screen 11, and is ended by a pen-up operation for moving the pen 200 away from the screen 11.

電子機器100は、ペンダウン操作からペンアップ操作までのペン200の軌跡を入力する。入力した軌跡の扱いは、電子機器100の動作モード(書込モード/消去モード)に応じて異なる。書込モードでは、図1に示すように、入力した軌跡が書き込まれた画像が画面11に表示される。消去モードでは、図2に示すように、入力した軌跡に交差する軌跡が消去された画像が画面11に表示される。なお、消去モードにおいて入力された軌跡は、各図において破線で示されているが、実際には表示されない。   The electronic device 100 inputs the locus of the pen 200 from the pen-down operation to the pen-up operation. The handling of the input locus differs depending on the operation mode (write mode / erase mode) of the electronic device 100. In the writing mode, as shown in FIG. 1, an image in which the input locus is written is displayed on the screen 11. In the erasing mode, as shown in FIG. 2, an image from which a trajectory that intersects the input trajectory is erased is displayed on the screen 11. In addition, although the locus | trajectory input in deletion mode is shown with the broken line in each figure, it is not actually displayed.

図1に示すように、画面11には、動作モードを切り替えるための切替ボタン21が表示される。電子機器100の使用者は、ペン200を操作して切替ボタン21を押すことにより、電子機器100の動作モードを切り替えることができる。切替ボタン21を押すためのペン200の操作の内容は任意である。例えば、切替ボタン21上でのペンダウン操作によって切替ボタン21が押されるようにしてもよいし、切替ボタン21上でのペンアップ操作によって切替ボタン21が押されるようにしてもよい。   As shown in FIG. 1, a switching button 21 for switching the operation mode is displayed on the screen 11. The user of the electronic device 100 can switch the operation mode of the electronic device 100 by operating the pen 200 and pressing the switching button 21. The content of the operation of the pen 200 for pressing the switching button 21 is arbitrary. For example, the switching button 21 may be pressed by a pen-down operation on the switching button 21, or the switching button 21 may be pressed by a pen-up operation on the switching button 21.

図3は、電子機器100の電気的な構成を示すブロック図である。この図に示すように、電子機器100は、表示部10と、タブレット30と、CPU(Central Processing Unit)40と、ROM50(Read Only Memory)と、RAM(Random Access Memory)60と、VRAM(Video RAM)70と、ストレージ80とを備える。   FIG. 3 is a block diagram illustrating an electrical configuration of the electronic device 100. As shown in this figure, the electronic device 100 includes a display unit 10, a tablet 30, a CPU (Central Processing Unit) 40, a ROM 50 (Read Only Memory), a RAM (Random Access Memory) 60, and a VRAM (Video RAM) 70 and storage 80.

表示部10は、例えばLCD(液晶ディスプレイ)であり、画面11を有し、VRAM70に記憶された画像データで示される画像を画面11に表示する。タブレット30は、画面11内の位置のうち、ペン200によって指示された位置を繰り返し検出し、検出した位置の座標を示す座標データを順次出力する。これらの座標データはCPU40へ供給される。   The display unit 10 is, for example, an LCD (Liquid Crystal Display), has a screen 11, and displays an image indicated by image data stored in the VRAM 70 on the screen 11. The tablet 30 repeatedly detects the position indicated by the pen 200 among the positions in the screen 11 and sequentially outputs coordinate data indicating the coordinates of the detected position. These coordinate data are supplied to the CPU 40.

ストレージ80は、ハードディスク等の書き換え可能な不揮発性の記憶装置であり、各種のデータを記憶する。RAM60は、CPU40のワークメモリとして機能し、後述の書込データWD及び消去データEDを記憶する。ROM50はCPU40に実行されるプログラムを記憶している。CPU40は、RAM60をワークメモリとして上記プログラムを実行することによって各種の処理を実行する。   The storage 80 is a rewritable nonvolatile storage device such as a hard disk, and stores various data. The RAM 60 functions as a work memory for the CPU 40 and stores write data WD and erase data ED described later. The ROM 50 stores a program executed by the CPU 40. The CPU 40 executes various processes by executing the above program using the RAM 60 as a work memory.

CPU40が実行する処理には、VRAM70に画像データを記憶させる処理や、タブレット30からの座標データに基づいて動作モードを切り替える処理、タブレット30からの座標データに基づいて書込データWD及び消去データEDを更新する処理、ストレージ80との間でデータを読み書きする処理などが含まれる。   The processing executed by the CPU 40 includes processing for storing image data in the VRAM 70, processing for switching the operation mode based on the coordinate data from the tablet 30, and writing data WD and erasing data ED based on the coordinate data from the tablet 30. For example, a process for updating data, a process for reading / writing data from / to the storage 80, and the like.

ここで、「ストローク」、「セッション」及び「単位領域」について説明する。
「ストローク」は、ペンダウン操作からペンアップ操作までのペン200の軌跡であり、詳しくは、ペンダウン操作からペンアップ操作までの間にタブレット30で検出される一連の位置で構成される軌跡である。ストロークのうち、画面11に表示される画像に書き込まれるストロークが「書込ストローク」であり、書込ストロークを消去するためのストロークが「消去ストローク」である。書込ストロークは、複数の書込ストロークを個々に識別するストローク番号を用いて管理される。
Here, “stroke”, “session”, and “unit area” will be described.
The “stroke” is a trajectory of the pen 200 from the pen-down operation to the pen-up operation. Specifically, the “stroke” is a trajectory configured by a series of positions detected by the tablet 30 from the pen-down operation to the pen-up operation. Of the strokes, a stroke written in the image displayed on the screen 11 is a “writing stroke”, and a stroke for erasing the writing stroke is an “erasing stroke”. The writing stroke is managed using a stroke number that individually identifies a plurality of writing strokes.

「セッション」は1又は複数の書込ストロークの集合であり、書込ストロークは1又は複数のセッションのいずれか一つに属する。各セッションには、当該セッションに係る条件を満たす一連の書込ストロークのみが属する。本実施形態では、原則として、同一のセッションには、ペンアップ操作からペンダウン操作までの期間が予め定められた基準時間よりも短い一連の書込ストロークが属する。   A “session” is a set of one or more writing strokes, and the writing stroke belongs to one of the one or more sessions. Each session includes only a series of writing strokes that satisfy the conditions relating to the session. In this embodiment, in principle, a series of writing strokes in which a period from a pen-up operation to a pen-down operation is shorter than a predetermined reference time belongs to the same session.

例えば、図1では、先頭の「This is a pen.」を構成する総ての書込ストロークが一つのセッションに含まれ、次の「This is a pen. This is a pen. This is a pen.」を構成する総ての書込ストロークが別のセッションに含まれ、末尾の「This is a pen. Thi」を構成する総ての書込ストロークが更に別のセッションに含まれる。   For example, in FIG. 1, all writing strokes constituting the first “This is a pen.” Are included in one session, and the next “This is a pen. This is a pen.” All writing strokes constituting "" are included in another session, and all writing strokes constituting the last "This is a pen. Thi" are included in another session.

ただし、本実施形態では、ある書込ストロークのペンアップ操作と次の書込ストロークのペンダウン操作との間に動作モードが切り替えられた場合には、当該ペンアップ操作から当該ペンダウン操作までの期間が基準時間よりも短くても、これら二つの書込ストロークは、互いに異なるセッションに属する。なお、セッションは、複数のセッションを個々に識別するセッション番号を用いて管理される。   However, in this embodiment, when the operation mode is switched between the pen-up operation of a certain writing stroke and the pen-down operation of the next writing stroke, the period from the pen-up operation to the pen-down operation is Even if it is shorter than the reference time, these two writing strokes belong to different sessions. The sessions are managed using session numbers that individually identify a plurality of sessions.

「単位領域」は、画面11内の領域である。画面11と単位領域Aとの関係は、図4に示す通りである。この図には、図2の左側の画面11の一部が拡大されて示されている。図4に示すように、CPU40は、画面11を、54行42列の単位領域Aに分割して管理する。単位領域Aは、54行42列の単位領域Aを個々に識別する単位領域番号を用いて管理される。例えば、第2行第1列の単位領域Aの単位領域番号は「43」である。以降、kを自然数とし、単位領域番号がkの単位領域Aを「単位領域Ak」と記す。もちろん、単位領域Aの行数および列数は54行42列に限られない。   The “unit area” is an area in the screen 11. The relationship between the screen 11 and the unit area A is as shown in FIG. In this figure, a part of the screen 11 on the left side of FIG. 2 is shown enlarged. As shown in FIG. 4, the CPU 40 manages the screen 11 by dividing it into unit areas A of 54 rows and 42 columns. The unit area A is managed using a unit area number that individually identifies the unit area A of 54 rows and 42 columns. For example, the unit region number of the unit region A in the second row and first column is “43”. Hereafter, k is a natural number, and the unit area A whose unit area number is k is referred to as “unit area Ak”. Of course, the number of rows and the number of columns in the unit area A is not limited to 54 rows and 42 columns.

図5は、RAM60に記憶される書込データWD及び消去データEDの内容を例示する図であり、図4に対応している。書込データWDは、書込ストローク及びセッションに関するデータであり、座標データc1,c2,…と、書込ストロークデータWS1,WS2,…と、セッションデータSS1,SS2,…とを含む。   FIG. 5 is a diagram illustrating the contents of the write data WD and the erase data ED stored in the RAM 60, and corresponds to FIG. The write data WD is data related to the write stroke and session, and includes coordinate data c1, c2,..., Write stroke data WS1, WS2,.

座標データc1,c2,…は、書込モードにおいてタブレット30から順次出力された座標データであり、RAM60内の書込バッファWBに順次格納される。書込バッファWBは、座標データを一つずつ格納する複数の単位記憶領域を連ねた記憶領域であり、これらの単位記憶領域には、先頭から順にアドレス「w1」、「w2」、…が付与されている。つまり、書込モードにおいてタブレット30からk番目に出力された座標データckは、アドレスが「wk」の単位記憶領域に格納される。   The coordinate data c1, c2,... Are coordinate data sequentially output from the tablet 30 in the writing mode, and are sequentially stored in the write buffer WB in the RAM 60. The write buffer WB is a storage area in which a plurality of unit storage areas for storing coordinate data one by one are connected, and addresses “w1”, “w2”,... Are assigned to these unit storage areas in order from the top. Has been. That is, the coordinate data ck output k-th from the tablet 30 in the writing mode is stored in the unit storage area whose address is “wk”.

書込ストロークデータWSkは、書込バッファWBに格納された座標データのうち、ストローク番号が「k」の書込ストローク(書込モードにおいてk番目に入力されたストローク)を構成する一連の位置の座標データを特定する。この特定には、書込バッファWBにおけるアドレスが用いられる。例えば、書込ストロークデータWS1は、ストローク番号が「1」の書込ストローク(図4における「T」の横棒)を構成する一連の位置の座標データc1〜c51の格納位置の先頭アドレス「w1」と末尾アドレス「w51」とを示す。   The writing stroke data WSk is a series of positions constituting the writing stroke having the stroke number “k” (the kth input stroke in the writing mode) among the coordinate data stored in the writing buffer WB. Specify coordinate data. For this specification, an address in the write buffer WB is used. For example, the write stroke data WS1 includes the start address “w1” of the storage position of the coordinate data c1 to c51 of a series of positions constituting the write stroke (the horizontal bar “T” in FIG. 4) having the stroke number “1”. "And the end address" w51 ".

また、書込ストロークデータWSkは、ストローク番号が「k」の書込ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aの各々と、当該単位領域Aに対する当該書込ストロークの進入アドレスとを対応付ける。ある単位領域Aに対するある書込ストロークの進入アドレスとは、当該書込ストロークが当該単位領域Aに進入した直後にタブレット30から出力された座標データの格納位置のアドレスである。   The writing stroke data WSk includes each of the unit areas A including one or more positions in a series of positions constituting the writing stroke whose stroke number is “k”, and the writing stroke for the unit area A. Is associated with the entry address. The entry address of a certain writing stroke with respect to a certain unit area A is the address of the storage position of the coordinate data output from the tablet 30 immediately after the writing stroke has entered the unit area A.

例えば、ストローク番号が「1」の書込ストローク(図4における「T」の横棒)を構成する一連の位置のうちの一以上の位置を含む単位領域Aは単位領域A130、A131及びA132であり、これら三つの単位領域Aに対する当該書込ストロークの進入アドレスは「w1」、「w18」及び「w37」であるから、書込ストロークデータWS1は、単位領域番号「130」、「131」、「131」と進入アドレス「w1」、「w18」、「w37」とをそれぞれ対応付ける。   For example, unit areas A including one or more positions in a series of positions constituting a writing stroke having a stroke number “1” (horizontal bar “T” in FIG. 4) are unit areas A130, A131, and A132. Yes, since the entry addresses of the writing strokes for these three unit areas A are “w1”, “w18”, and “w37”, the writing stroke data WS1 includes unit area numbers “130”, “131”, “131” is associated with the entry addresses “w1”, “w18”, and “w37”, respectively.

セッションデータSSkは、セッション番号がkのセッションに含まれる書込スロストロークを示すデータであり、セッション番号「k」と、当該セッションに含まれる総ての書込ストロークのストローク番号とを対応付ける。例えば、セッションデータSS1は、セッション番号が「1」のセッション(図1における先頭の「This is a pen.」)に含まれる総ての書込スロストロークを示し、セッション番号「1」と、当該セッションに含まれる総ての書込ストロークのストローク番号「1」、「2」、…、「14」とを対応付ける。   The session data SSk is data indicating a writing stroke included in the session having the session number k, and associates the session number “k” with the stroke numbers of all writing strokes included in the session. For example, the session data SS1 indicates all the writing strokes included in the session having the session number “1” (the first “This is a pen.” In FIG. 1), and the session number “1” The stroke numbers “1”, “2”,..., “14” of all writing strokes included in the session are associated with each other.

消去データEDは、消去ストロークに関するデータであり、座標データd1,d2,…と、消去ストロークデータESとを含む。座標データd1,d2,…は、消去モードにおいてタブレット30から順次出力された座標データであり、RAM60内の消去バッファEBに順次格納される。消去バッファEBは、座標データを一つずつ格納する複数の単位記憶領域を連ねた記憶領域であり、これらの単位記憶領域には、先頭から順にアドレス「e1」、「e2」、…が付与されている。ただし、消去バッファEBにおける座標データの格納位置は、消去ストローク毎に初期化される。つまり、消去バッファEBへの座標データの格納は、消去ストローク毎に上書きとなる。   The erase data ED is data relating to the erase stroke, and includes coordinate data d1, d2,... And erase stroke data ES. The coordinate data d1, d2,... Are coordinate data sequentially output from the tablet 30 in the erase mode, and are sequentially stored in the erase buffer EB in the RAM 60. The erasing buffer EB is a storage area in which a plurality of unit storage areas for storing coordinate data one by one are connected. Addresses “e1”, “e2”,... Are assigned to these unit storage areas in order from the top. ing. However, the storage position of the coordinate data in the erase buffer EB is initialized for each erase stroke. That is, the storage of the coordinate data in the erase buffer EB is overwritten for each erase stroke.

消去ストロークデータESは、消去バッファEBに格納された座標データのうち、最新の消去ストローク(現在の消去モードにおいて最後に入力されたストローク)を構成する一連の位置の座標データを特定する。この特定には、消去バッファEBにおけるアドレスが用いられる。ここでは、図4における破線が最新の消去ストロークであり、消去ストロークデータESは、当該消去ストロークを構成する一連の位置の座標データd1〜d22の格納位置の末尾アドレス「e22」を示す。   The erase stroke data ES specifies coordinate data of a series of positions constituting the latest erase stroke (the last input stroke in the current erase mode) among the coordinate data stored in the erase buffer EB. For this specification, an address in the erase buffer EB is used. Here, the broken line in FIG. 4 is the latest erase stroke, and the erase stroke data ES indicates the end address “e22” of the storage position of the coordinate data d1 to d22 of a series of positions constituting the erase stroke.

また、消去ストロークデータESは、最新の消去ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aの各々と、当該単位領域Aに対する当該消去ストロークの進入アドレスとを対応付ける。ある単位領域Aに対する消去ストロークの進入アドレスとは、当該消去ストロークが当該単位領域Aに進入した直後にタブレット30から出力された座標データの格納位置のアドレスである。   Further, the erase stroke data ES associates each unit area A including one or more positions among a series of positions constituting the latest erase stroke with the entry address of the erase stroke for the unit area A. The erase stroke entry address for a certain unit area A is the address of the storage position of the coordinate data output from the tablet 30 immediately after the erase stroke enters the unit area A.

ここでは、図4における破線が最新の消去ストロークであるから、最新の消去ストロークを構成する一連の位置のうちの一以上の位置を含む単位領域Aは、単位領域A174及びA132である。そして、これら二つの単位領域Aに対する消去ストロークの進入アドレスは「e1」及び「e14」である。よって、消去ストロークデータESは、単位領域番号「174」、「132」と進入アドレス「e1」、「e14」とをそれぞれ対応付ける。   Here, since the broken line in FIG. 4 is the latest erase stroke, the unit areas A including one or more positions in the series of positions constituting the latest erase stroke are the unit areas A174 and A132. The entry addresses of the erase strokes for these two unit areas A are “e1” and “e14”. Therefore, the erase stroke data ES associates the unit area numbers “174” and “132” with the entry addresses “e1” and “e14”, respectively.

なお、CPU40は、書込バッファWBに格納された座標データのうち、消去されていない書込ストロークを構成する一連の位置の座標データを用いて、消去されていない書込ストロークが書き込まれた画像を生成する画像生成部として機能し、生成した画像の画像データをVRAM70に書き込む。また、CPU40は、使用者の指示に従って、RAM60上のデータをストレージ80に記憶させたり、ストレージ80に記憶されたデータを読み出したりすることができる。   Note that the CPU 40 uses the coordinate data of a series of positions constituting the writing stroke not erased among the coordinate data stored in the writing buffer WB, and the image in which the writing stroke not erased is written. The image data of the generated image is written in the VRAM 70. Further, the CPU 40 can store the data on the RAM 60 in the storage 80 or read the data stored in the storage 80 in accordance with a user instruction.

<2.動作>
前述したように、CPU40は、タブレット30からの座標データに基づいて書込データWD及び消去データEDを更新する。この更新の様子について、書込ストロークが書き込まれていない画像に「T」の横棒と縦棒を書き込んでから「T」の横棒を消去する場合を例に挙げて説明する。ただし、初期の動作モードは書込モードであるものとする。
<2. Operation>
As described above, the CPU 40 updates the write data WD and the erase data ED based on the coordinate data from the tablet 30. The state of this update will be described by taking as an example a case where a horizontal bar and a vertical bar of “T” are written in an image in which no writing stroke is written, and then the horizontal bar of “T” is deleted. However, the initial operation mode is the write mode.

まず使用者が、「T」の横棒(書込ストロークWST1)を入力するようにペン200を操作する。具体的には、図6に示すように、単位領域A130においてペンダウン操作を行い、単位領域A131を通過するようにペン200を動かし、単位領域A132においてペンアップ操作を行う。   First, the user operates the pen 200 so as to input a horizontal bar of “T” (writing stroke WST1). Specifically, as shown in FIG. 6, the pen-down operation is performed in the unit area A130, the pen 200 is moved so as to pass through the unit area A131, and the pen-up operation is performed in the unit area A132.

この際、CPU40は、タブレット30から順次供給された座標データc1〜c51を書込バッファWBに順次格納する。また、CPU40は、書込データWDを更新することにより、現在のセッションのセッション番号「1」と書込ストロークWST1のストローク番号「1」とを対応付ける。   At this time, the CPU 40 sequentially stores the coordinate data c1 to c51 sequentially supplied from the tablet 30 in the write buffer WB. CPU 40 also updates write data WD to associate session number “1” of the current session with stroke number “1” of write stroke WST1.

また、CPU40は、書込データWDを更新することにより、書込ストロークWST1について、ペンダウン操作の直後に供給された座標データの格納位置のアドレスを先頭アドレスとし、ペンアップ操作の直前に供給された座標データの格納位置のアドレスを末尾アドレスとする。
また、CPU40は、座標データが供給される度に、書込ストロークWST1が単位領域Aに進入したか否か、すなわちペン200が単位領域Aに進入したか否かを判定し、この判定の結果が肯定の場合には、書込データWDを更新することにより、書込ストロークWST1について、当該単位領域Aの単位領域番号と、当該座標データの格納位置のアドレス(進入アドレス)とを対応付ける。この判定の結果は、ペンダウン操作の直後に座標データが供給されたときにも肯定となる。
つまり、CPU40は、書込ストロークWST1について、「w1」を先頭アドレスとし、「w51」を末尾アドレスとし、単位領域番号「130」、「131」、「132」と進入アドレス「w1」、「w18」、「w37」とをそれぞれ対応付ける書込ストロークデータWS1をRAM60に書き込む。
Further, the CPU 40 updates the write data WD, so that the write stroke WST1 is supplied immediately before the pen-up operation with the address of the storage position of the coordinate data supplied immediately after the pen-down operation as the head address. The address of the coordinate data storage location is the end address.
Further, every time coordinate data is supplied, the CPU 40 determines whether or not the writing stroke WST1 has entered the unit area A, that is, whether or not the pen 200 has entered the unit area A, and the result of this determination Is affirmative, the write data WD is updated to associate the unit area number of the unit area A with the address (entrance address) of the storage position of the coordinate data for the write stroke WST1. The result of this determination is also affirmative when coordinate data is supplied immediately after the pen-down operation.
That is, with respect to the writing stroke WST1, the CPU 40 uses “w1” as the head address, “w51” as the tail address, unit area numbers “130”, “131”, “132” and the entry addresses “w1”, “w18”. ”And“ w37 ”are written in the RAM 60.

次に使用者が、「T」の縦棒(書込ストロークWST2)を入力するようにペン200を操作する。具体的には、図7に示すように、単位領域A131においてペンダウン操作を行い、単位領域A173を通過するようにペン200を動かし、単位領域A215においてペンアップ操作を行う。ただし、「T」の横棒のペンアップ操作から「T」の縦棒のペンダウン操作までの期間は前述の基準時間よりも短いものとする。   Next, the user operates the pen 200 so as to input a vertical bar of “T” (writing stroke WST2). Specifically, as shown in FIG. 7, a pen-down operation is performed in the unit area A131, the pen 200 is moved so as to pass through the unit area A173, and a pen-up operation is performed in the unit area A215. However, the period from the pen-up operation of the “T” horizontal bar to the pen-down operation of the “T” vertical bar is shorter than the above-described reference time.

この際、CPU40は、タブレット30から順次供給された座標データc52〜c91を書込バッファWBに順次格納する。また、CPU40は、書込データWDを更新することにより、現在のセッションのセッション番号「1」と、書込ストロークWST1のストローク番号「2」とを対応付ける。また、CPU40は、書込ストロークWST2について、「w52」を先頭アドレスとし、「w91」を末尾アドレスとし、単位領域番号「132」、「173」、「215」と進入アドレス「w52」、「w68」、「w86」とをそれぞれ対応付ける書込ストロークデータWS2をRAM60に書き込む。   At this time, the CPU 40 sequentially stores the coordinate data c52 to c91 sequentially supplied from the tablet 30 in the write buffer WB. CPU 40 also updates write data WD to associate session number “1” of the current session with stroke number “2” of write stroke WST1. Further, for the writing stroke WST2, the CPU 40 sets “w52” as a head address, “w91” as a tail address, unit area numbers “132”, “173”, “215” and entry addresses “w52”, “w68”. ”And“ w86 ”are written in the RAM 60.

次に使用者が、図1の切替ボタン21を操作し、電子機器100の動作モードを、書込モードから消去モードへ切り替える。これにより、その旨の操作信号がCPU40に供給される。CPU40は、この操作信号の供給を受けると、書込データWDを更新することにより、図8に示すように、セッション番号「1」とストローク番号「1」及び「2」とを対応付けるデータをセッションデータSS1とする。   Next, the user operates the switching button 21 in FIG. 1 to switch the operation mode of the electronic device 100 from the writing mode to the erasing mode. As a result, an operation signal to that effect is supplied to the CPU 40. When the CPU 40 receives the operation signal, the CPU 40 updates the write data WD so that the session number “1” is associated with the stroke numbers “1” and “2” as shown in FIG. The data is SS1.

次に、使用者が、書込ストロークWST1と交差する消去ストロークESTを入力するようにペン200を操作する。具体的には、図8に示すように、単位領域A174においてペンダウン操作を行い、単位領域A132においてペンアップ操作を行う。この際、CPU40は、タブレット30から順次供給された座標データd1〜c22を消去バッファEBに順次格納する。   Next, the user operates the pen 200 so as to input an erasing stroke EST that intersects the writing stroke WST1. Specifically, as shown in FIG. 8, a pen-down operation is performed in the unit area A174, and a pen-up operation is performed in the unit area A132. At this time, the CPU 40 sequentially stores the coordinate data d1 to c22 sequentially supplied from the tablet 30 in the erasure buffer EB.

また、CPU40は、消去データEDを更新することにより、消去ストロークESTについて、ペンアップ操作の直前に供給された座標データの格納位置のアドレスを末尾アドレスとする。
また、CPU40は、座標データが供給される度に、消去ストロークESTが単位領域Aに進入したか否か、すなわちペン200が単位領域Aに進入したか否かを判定し、この判定の結果が肯定の場合には、消去データEDを更新することにより、消去ストロークESTについて、当該単位領域Aの単位領域番号と、当該座標データの格納位置のアドレス(進入アドレス)とを対応付ける。この判定の結果は、ペンダウン操作の直後に座標データが供給されたときにも肯定となる。
つまり、CPU40は、消去ストロークESTについて、「e22」を末尾アドレスとし、単位領域番号「174」、「132」と進入アドレス「e1」、「e14」とをそれぞれ対応付ける消去ストロークデータESをRAM60に書き込む。
Further, the CPU 40 updates the erase data ED so that the address of the storage position of the coordinate data supplied immediately before the pen-up operation is set as the end address for the erase stroke EST.
Further, every time the coordinate data is supplied, the CPU 40 determines whether or not the erase stroke EST has entered the unit area A, that is, whether or not the pen 200 has entered the unit area A, and the result of this determination is If the determination is affirmative, the erase data ED is updated to associate the unit area number of the unit area A with the address (entrance address) of the storage position of the coordinate data for the erase stroke EST. The result of this determination is also affirmative when coordinate data is supplied immediately after the pen-down operation.
That is, for the erase stroke EST, the CPU 40 writes “e22” as the end address, and writes the erase stroke data ES that associates the unit area numbers “174” and “132” with the entry addresses “e1” and “e14” in the RAM 60. .

そして、CPU40は、消去ストロークESTに交差する書込ストロークWST1を消去する消去処理を行う。この消去処理により、図9に示すように書込データWD及び消去データEDが更新される。具体的には、セッションデータSS1が、セッション番号「1」とストローク番号「1」とを対応付けるデータとなり、書込ストロークデータWS1及び消去ストロークデータESが削除される。つまり、書込ストロークWST1が消去される。   Then, the CPU 40 performs an erasing process for erasing the writing stroke WST1 that intersects the erasing stroke EST. By this erasure process, the write data WD and the erasure data ED are updated as shown in FIG. Specifically, the session data SS1 is data that associates the session number “1” with the stroke number “1”, and the write stroke data WS1 and the erase stroke data ES are deleted. That is, write stroke WST1 is erased.

<3.消去処理>
以降、消去処理の内容について、図10〜図13を参照して説明する。図10〜図12は、消去処理の流れを示す図であり、同一の番号が付された接続点で接続されて一つのフローチャートを構成する。図13は電子機器100の状態の一例を模式的に示す図である。以降の説明では、基本的には、図10〜図12を参照して一般的に説明し、適宜、図13を参照して具体的に説明する。
<3. Erase process>
Hereinafter, the contents of the erasure process will be described with reference to FIGS. FIG. 10 to FIG. 12 are diagrams showing the flow of the erasing process, and they are connected at connection points assigned the same numbers to form one flowchart. FIG. 13 is a diagram schematically illustrating an example of the state of the electronic device 100. In the following description, the description will be basically made generally with reference to FIGS. 10 to 12 and specifically described with reference to FIG. 13 as appropriate.

図10に示すように、消去処理では、CPU40は、まず、消去ストロークが入力されたか否かを判定し(S1)、この判定の結果が否定(NO)の場合には、処理をステップS1に戻す。消去ストロークが入力され、ステップS1の判定の結果が肯定(YES)となると、CPU40は、消去データEDを参照し、消去ストロークの矩形領域を特定する(S2)。消去ストロークの矩形領域とは、消去ストロークに外接する矩形に囲まれた領域であり、図13では消去ストロークESTに外接する矩形に囲まれた矩形領域αである。   As shown in FIG. 10, in the erasing process, the CPU 40 first determines whether or not an erasing stroke has been input (S1). If the result of this determination is negative (NO), the process proceeds to step S1. return. When the erase stroke is input and the result of the determination in step S1 is affirmative (YES), the CPU 40 refers to the erase data ED and specifies a rectangular area of the erase stroke (S2). The rectangular area of the erasing stroke is an area surrounded by a rectangle circumscribing the erasing stroke, and in FIG. 13, is a rectangular area α surrounded by a rectangle circumscribing the erasing stroke EST.

次にCPU40は、最初のセッションを対象セッションとし(S3)、対象セッションのセッション領域と消去ストロークの矩形領域とが重なっているか否かを判定する(S4)。図13の場合には、セッション番号が「1」のセッションが対象セッションとなり、当該セッションに外接する矩形で囲まれた領域がセッション領域β1となり、矩形領域αとセッション領域β1とが重なっているか否かが判定される。なお、セッション領域β1は、書込データWDを参照して特定される。   Next, the CPU 40 sets the first session as the target session (S3), and determines whether or not the session area of the target session and the rectangular area of the erase stroke overlap (S4). In the case of FIG. 13, the session with the session number “1” is the target session, and a region surrounded by a rectangle circumscribing the session is the session region β1, and whether the rectangular region α and the session region β1 overlap each other. Is determined. The session area β1 is specified with reference to the write data WD.

対象セッションの矩形領域と消去ストロークの矩形領域とが重なっており、ステップS3の判定の結果が肯定となると、CPU40は、対象セッションに属する最初の書込ストロークを対象ストロークとし(S7)、消去ストロークの最初の単位領域Aを対象単位領域とする(S8)。図13の場合には、書込ストロークWST1が対象ストロークとなり、消去ストロークESTが進入した単位領域Aのうち、消去ストロークESTが最初に進入した単位領域A215が対象単位領域となる。   If the rectangular area of the target session and the rectangular area of the erasing stroke overlap, and the result of the determination in step S3 is affirmative, the CPU 40 sets the first writing stroke belonging to the target session as the target stroke (S7), and the erasing stroke. The first unit area A is set as the target unit area (S8). In the case of FIG. 13, the writing stroke WST1 is the target stroke, and among the unit areas A into which the erasing stroke EST has entered, the unit area A215 into which the erasing stroke EST has entered first becomes the target unit area.

次にCPU40は、書込データWDを参照し、対象ストロークが対象単位領域に進入しているか否かを判定する(S9)。この判定の結果が否定の場合、CPU40は、消去ストロークの次の単位領域Aがあるか否かを判定する(S10)。消去ストロークの次の単位領域Aとは、消去ストロークの単位領域Aのうち、当該消去ストロークが対象単位領域の次に進入する単位領域Aである。ステップS10の判定の結果が肯定の場合、CPU40は、消去ストロークの次の単位領域Aを対象単位領域とし(S11)、処理をステップS9に戻す。つまり、図13の場合には、対象単位領域は、単位領域A215、A173、A174、A132という順に変わる。   Next, the CPU 40 refers to the write data WD and determines whether or not the target stroke has entered the target unit area (S9). If the result of this determination is negative, the CPU 40 determines whether or not there is a unit area A next to the erase stroke (S10). The unit area A next to the erasing stroke is a unit area A in which the erasing stroke enters the target unit area among the unit areas A of the erasing stroke. If the determination result of step S10 is affirmative, the CPU 40 sets the unit area A next to the erasing stroke as the target unit area (S11), and returns the process to step S9. That is, in the case of FIG. 13, the target unit areas change in the order of unit areas A215, A173, A174, and A132.

対象ストロークが対象単位領域に進入しており、ステップS9の判定の結果が肯定となると、CPU40は、図11に示すように、書込データWD及び消去データEDを参照し、書込側開始アドレスと消去側開始アドレスを決定する(S12)。具体的には、対象ストロークについて対象単位領域に対応付けられた進入アドレスを書込側開始アドレスとし、消去ストロークについて対象単位領域に対応付けられた進入アドレスを消去側開始アドレスとする。図13の場合には、書込ストロークWST1について単位領域A132に対応付けられた進入アドレス「w52」が書込側開始アドレスとなり、消去ストロークESTについて単位領域A132に対応付けられた進入アドレス「e31」が消去側開始アドレスとなる。   If the target stroke has entered the target unit area and the result of determination in step S9 is affirmative, the CPU 40 refers to the write data WD and the erase data ED as shown in FIG. The erasure side start address is determined (S12). Specifically, the entry address associated with the target unit area for the target stroke is used as the write side start address, and the entry address associated with the target unit area for the erase stroke is used as the erase side start address. In the case of FIG. 13, the entry address “w52” associated with the unit area A132 for the write stroke WST1 is the write side start address, and the entry address “e31” associated with the unit area A132 for the erase stroke EST. Becomes the erase side start address.

次にCPU40は、書込データWDを参照し、対象ストロークの次の単位領域Aがあるか否かを判定し(S13)、この判定の結果が肯定の場合には、対象ストロークについて対象単位領域の次の単位領域Aと対応付けられた進入アドレスの直前のアドレスを書込側終了アドレスとし(S14)、この判定の結果が否定の場合には、対象ストロークの末尾アドレスを書込側終了アドレスとする(S15)。図13の場合にはステップS13の判定の結果が否定となり、書込ストロークWST1の末尾アドレス「w51」が書込側終了アドレスとなる。   Next, the CPU 40 refers to the write data WD to determine whether or not there is a next unit area A of the target stroke (S13). If the result of this determination is affirmative, the target unit area for the target stroke is determined. The address immediately before the entry address associated with the next unit area A is set as the write end address (S14). If the result of this determination is negative, the end address of the target stroke is set as the write end address. (S15). In the case of FIG. 13, the result of the determination in step S13 is negative, and the end address “w51” of the write stroke WST1 becomes the write side end address.

次にCPU40は、消去データEDを参照し、消去ストロークの次の単位領域Aがあるか否かを判定し(S16)、この判定の結果が肯定の場合には、消去ストロークについて対象単位領域の次の単位領域Aと対応付けられた進入アドレスの直前のアドレスを消去側終了アドレスとし(S17)、この判定の結果が否定の場合には、消去ストロークの末尾アドレスを消去側終了アドレスとする(S18)。図13の場合にはステップS16の判定の結果が否定となり、消去ストロークESTの末尾アドレス「e44」が消去側終了アドレスとなる。   Next, the CPU 40 refers to the erasure data ED and determines whether or not there is a unit area A next to the erasure stroke (S16). If the result of this determination is affirmative, The address immediately before the entry address associated with the next unit area A is set as the erasure end address (S17). If the result of this determination is negative, the end address of the erase stroke is set as the erasure end address ( S18). In the case of FIG. 13, the result of the determination in step S16 is negative, and the end address “e44” of the erase stroke EST becomes the erase side end address.

一方、図10のステップS10の判定の結果が否定の場合、すなわち、対象ストロークと消去ストロークとの双方が進入している単位領域が残っていない場合、CPU40は、図11に示すように、書込側開始アドレスと消去側開始アドレスを決定する(S19)。具体的には、書込データWDを参照して対象ストロークの先頭アドレスを書込側開始アドレスとする一方、消去ストロークの先頭アドレス(「e1」)を消去側開始アドレスとする。次にCPU40は、書込データWD及び消去データEDを参照し、対象ストロークの末尾アドレスを書込側終了アドレスとし、消去ストロークの末尾アドレスを消去側終了アドレスとする(S20)。   On the other hand, if the result of the determination in step S10 in FIG. 10 is negative, that is, if there is no unit area in which both the target stroke and the erasing stroke have entered, the CPU 40 writes the data as shown in FIG. The start side address and the erase side start address are determined (S19). Specifically, referring to the write data WD, the start address of the target stroke is set as the write side start address, and the start address (“e1”) of the erase stroke is set as the erase side start address. Next, the CPU 40 refers to the write data WD and the erase data ED, sets the end address of the target stroke as the write side end address, and sets the end address of the erase stroke as the erase side end address (S20).

書込側開始アドレス、書込側終了アドレス、消去側開始アドレス及び消去側終了アドレスが決定されると、CPU40は、書込側開始アドレスの座標データを書込側第1座標データとし(S21)、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスであるか否かを判定する(S22)。この判定の結果が肯定の場合、CPU40は、消去側開始アドレスの座標データを消去側第1座標データとし(S23)、消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスであるか否かを判定する(S24)。   When the write side start address, write side end address, erase side start address and erase side end address are determined, the CPU 40 uses the write side start address coordinate data as the write side first coordinate data (S21). Then, it is determined whether or not the address of the storage position next to the storage position of the writing side first coordinate data is an address before the writing side end address (S22). When the result of this determination is affirmative, the CPU 40 uses the coordinate data of the erase side start address as the erase side first coordinate data (S23), and the address of the storage position next to the storage position of the erase side first coordinate data is the erase side. It is determined whether the address is before the end address (S24).

この判定の結果が肯定の場合、CPU40は、書込側第1座標データの格納位置の次の格納位置に格納された座標データを書込側第2座標データとする一方、消去側第1座標データの格納位置の次の格納位置に格納された座標データを消去側第2座標データとする(S25)。そしてCPU40は、書込側第1座標データに係る位置と書込側第2座標データに係る位置とを結ぶ線分(書込側線分)と、消去側第1座標データに係る位置と消去側第2座標データに係る位置とを結ぶ線分(消去側線分)とが交差するか否かを判定する(S26)。   If the result of this determination is affirmative, the CPU 40 uses the coordinate data stored at the storage position next to the storage position of the write side first coordinate data as the write side second coordinate data, while the erase side first coordinate. The coordinate data stored at the storage position next to the data storage position is set as the erase-side second coordinate data (S25). The CPU 40 then forms a line segment (write side line segment) connecting the position related to the write side first coordinate data and the position related to the write side second coordinate data, and the position related to the erase side first coordinate data and the erase side. It is determined whether or not a line segment (erase-side line segment) connecting with the position related to the second coordinate data intersects (S26).

この判定の結果が肯定の場合、CPU40は、対象ストロークを消去する(S27)。具体的には、対象ストロークに係るデータがRAM60から削除されるように書込データWDを更新する。なお、本実施形態では、書込ストロークについて先頭アドレスと末尾アドレスが保持されるから、書込バッファWBから座標データを削除する必要はない。   If the result of this determination is affirmative, the CPU 40 deletes the target stroke (S27). Specifically, the write data WD is updated so that the data related to the target stroke is deleted from the RAM 60. In this embodiment, since the start address and the end address are held for the writing stroke, it is not necessary to delete the coordinate data from the writing buffer WB.

一方、ステップS26の判定の結果が否定の場合、CPU40は、消去側第2座標データを消去側第1座標データとし(S28)、処理をステップS24へ戻す。よって、対象ストロークが消去されるか、消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスでなくなるかするまで、ステップS24〜S28の処理が繰り返し実行される。   On the other hand, when the result of the determination in step S26 is negative, the CPU 40 sets the erasure side second coordinate data as the erasure side first coordinate data (S28), and returns the process to step S24. Therefore, the processes of steps S24 to S28 are repeatedly executed until the target stroke is erased or the address of the storage position next to the storage position of the erase-side first coordinate data is not the address before the erase-side end address. The

消去側第1座標データの格納位置の次の格納位置のアドレスが消去側終了アドレス以前のアドレスでなくなり、ステップS24の判定の結果が否定となると、CPU40は、書込側第2座標データを書込側第1座標データとし(S29)、処理をステップS22へ戻す。よって、対象ストロークが消去されるか、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスでなくなるかするまで、ステップS22〜S29の処理が繰り返し実行される。   When the address of the storage position next to the storage position of the erase side first coordinate data is not the address before the erase side end address and the result of the determination in step S24 is negative, the CPU 40 writes the write side second coordinate data. The first-side coordinate data is set to the insertion side (S29), and the process returns to step S22. Therefore, the processes in steps S22 to S29 are repeated until the target stroke is deleted or the address of the storage position next to the storage position of the writing side first coordinate data is not the address before the writing side end address. Executed.

つまり、CPU40は、書込バッファWBの書込側開始アドレスから書込側終了アドレスまでの一連の座標データである書込側座標データと、消去バッファEBの消去側開始アドレスから消去側終了アドレスまでの一連の座標データである消去側座標データとを用いて、書込側座標データに係る一連の位置を隣同士で結ぶ線分と、消去側座標データに係る一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定し、1回でも交差する場合には、対象ストロークを消去する。   That is, the CPU 40 writes the write side coordinate data, which is a series of coordinate data from the write side start address to the write side end address of the write buffer WB, and the erase side start address to the erase side end address of the erase buffer EB. A line segment that connects a series of positions related to the write side coordinate data adjacent to each other and a line that connects a series of positions related to the erase side coordinate data adjacent to each other using the erase side coordinate data that is a series of coordinate data of The presence / absence of intersection with the minute is determined by brute force, and the target stroke is deleted when it intersects even once.

例えば、図13の場合には、座標データc1が示す位置と座標データc2が示す位置とを結ぶ線分を書込側線分とし、まず当該書込側線分と座標データd1が示す位置と座標データd2が示す位置とを結ぶ消去側線分との交差の有無を判定し、次に当該書込側線分と座標データd2が示す位置と座標データd3が示す位置とを結ぶ消去側線分との交差の有無を判定し、…、次に当該書込側線分と座標データd43が示す位置と座標データd44が示す位置とを結ぶ消去側線分との交差の有無を判定し、次に、座標データc1が示す位置と座標データc2が示す位置とを結ぶ線分を書込側線分とし、…というように線分の交差の有無が順次判定され、結局、書込ストロークWST1が消去される。   For example, in the case of FIG. 13, a line segment connecting the position indicated by the coordinate data c1 and the position indicated by the coordinate data c2 is set as a write side line segment. First, the position and coordinate data indicated by the write side line segment and the coordinate data d1 are used. It is determined whether or not there is an intersection with the erase side line connecting the position indicated by d2, and then the intersection of the write side line segment and the erase side line connecting the position indicated by the coordinate data d2 and the position indicated by the coordinate data d3. Next, it is determined whether or not there is an intersection between the write side line segment, the position indicated by the coordinate data d43, and the erase side line segment connecting the position indicated by the coordinate data d44, and then the coordinate data c1 is The line segment connecting the indicated position and the position indicated by the coordinate data c2 is defined as the writing side line segment, and the presence / absence of the intersection of the line segments is sequentially determined, and as a result, the writing stroke WST1 is erased.

対象ストロークが消去されるか、書込側第1座標データの格納位置の次の格納位置のアドレスが書込側終了アドレス以前のアドレスでなくなるかして、ステップS22の判定結果が否定となると、CPU40は、次の書込ストロークがあるか否かを判定する(S30)。この判定の結果は、対象セッションに対象ストロークとなっていない書込ストロークが残っている場合に肯定となり、他の場合に否定となる。   If the target stroke is erased, or the address of the storage position next to the storage position of the writing side first coordinate data is no longer the address before the writing side end address, the determination result in step S22 is negative. The CPU 40 determines whether or not there is a next writing stroke (S30). The result of this determination is affirmative when a writing stroke that is not a target stroke remains in the target session, and negative in other cases.

ステップS30の判定の結果が肯定の場合、CPU40は、次の書込ストロークを対象ストロークとし(S31)、処理をステップS8へ戻す。つまり、対象セッションに属する総ての書込ストロークについて、上記の処理が行われる。なお、図13の場合には、対象セッションに対象ストロークとなっていない書込ストロークWST2が残っているから、書込ストロークWST2が対象ストロークとなる。対象ストロークが書込ストロークWST2の場合、ステップS12の処理が2回行われた後にステップS19の処理が行われるが、対象ストロークは消去されない。   If the determination result of step S30 is affirmative, the CPU 40 sets the next writing stroke as the target stroke (S31), and returns the process to step S8. That is, the above processing is performed for all writing strokes belonging to the target session. In the case of FIG. 13, since the writing stroke WST2 that is not the target stroke remains in the target session, the writing stroke WST2 becomes the target stroke. When the target stroke is the writing stroke WST2, the process of step S12 is performed after the process of step S12 is performed twice, but the target stroke is not erased.

一方、ステップS30の判定の結果が否定の場合、CPU40は、対象セッションの次のセッションがあるか否かを判定し(S5)、この判定の結果が肯定の場合には、次のセッションを対象セッションとし(S6)、処理をステップS4に戻す。つまり、総てのセッションについて、上記の処理が行われる。ただし、図13の場合には、セッション領域β2もβ3も矩形領域αと重ならないから、セッション番号が「1」のセッションとは異なるセッションについて線分の交差の有無が判定されることはない。   On the other hand, if the result of the determination in step S30 is negative, the CPU 40 determines whether there is a session next to the target session (S5). If the result of this determination is affirmative, the CPU 40 targets the next session. A session is set (S6), and the process returns to step S4. That is, the above processing is performed for all sessions. However, in the case of FIG. 13, since neither the session area β2 nor β3 overlaps the rectangular area α, it is not determined whether or not the line segment intersects for a session different from the session having the session number “1”.

そして、次のセッションがなくなり、ステップS5の判定の結果が否定となると、CPU40は、消去ストロークに係るデータがRAM60から削除されるように消去データEDを更新し、処理をステップS1へ戻す。なお、本実施形態では、消去ストロークについて末尾アドレスが保持されるから、消去バッファEBから座標データを削除する必要はない。   When there is no next session and the result of the determination in step S5 is negative, the CPU 40 updates the erase data ED so that the data related to the erase stroke is deleted from the RAM 60, and the process returns to step S1. In the present embodiment, since the end address is held for the erase stroke, it is not necessary to delete the coordinate data from the erase buffer EB.

以上説明したように、CPU40は、一連の位置の座標データが消去バッファEBに格納されると、消去されていない書込ストロークのうち、消去ストロークが進入する単位領域Aのうち少なくとも一つの単位領域Aに進入する書込ストロークを対象ストローク(ステップS9の判定の結果が肯定となる書込ストローク)として特定する候補特定部と、対象ストロークとして特定された書込ストロークの各々について、当該書込ストロークと消去ストロークとが共に進入する単位領域Aのいずれかにおいて、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、消去ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、当該一部判定処理の結果が肯定の書込ストロークを消去する一部判定消去部として機能する。
さらに、CPU40は、一部判定消去部として、一つの書込ストロークに係る一部判定処理において、当該書込ストロークと消去ストロークとが共に進入する単位領域Aのうち一つの単位領域Aについて、書込バッファWBに格納されている座標データのうち、当該書込ストロークを構成する一連の位置のうち当該単位領域A内の位置の座標データと、消去ストロークを構成する一連の位置のうち当該単位領域A内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する一連の位置のうち当該単位領域A内の位置を隣同士で結ぶ線分と、消去ストロークを構成する一連の位置のうち当該単位領域A内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する。
よって、本発明によれば、消去ストロークに交差する書込ストロークを消去するための演算量を削減することができる。
As described above, when coordinate data of a series of positions is stored in the erasure buffer EB, the CPU 40 stores at least one unit area among the unit areas A into which the erasure stroke enters among the non-erasable write strokes. For each of the candidate specifying unit that specifies the writing stroke entering A as the target stroke (the writing stroke for which the determination result of step S9 is affirmative), and the writing stroke specified as the target stroke, the writing stroke In either of the unit areas A where the erasing stroke and the erasing stroke enter together, one of the line segments connecting the series of positions constituting the writing stroke to each other and the series of positions constituting the erasing stroke are connected to each other. A partial determination process is performed to determine whether any of the line segments intersects, and the result of the partial determination process is positive Functions as a part determining erasing unit for erasing the writing strokes.
Further, as a partial determination erasure unit, the CPU 40 performs writing for one unit area A among the unit areas A in which both the writing stroke and the erasing stroke enter in the partial determination processing related to one writing stroke. Among the coordinate data stored in the insertion buffer WB, the coordinate data of the position in the unit area A among the series of positions constituting the writing stroke and the unit area of the series of positions constituting the erasing stroke The coordinate data of the position in A is specified, and using the specified coordinate data, the line segment that connects the positions in the unit area A next to each other out of a series of positions constituting the writing stroke, and the erasing stroke The presence or absence of intersection with the line segment that connects the positions in the unit area A adjacent to each other in the series of positions constituting the area is determined brute force.
Therefore, according to the present invention, it is possible to reduce the amount of calculation for erasing the writing stroke that intersects the erasing stroke.

また、CPU40は、消去ストロークを構成する一連の位置の座標データが消去バッファに格納されると、消去されていない書込ストロークのうち、当該一連の位置で構成される消去ストロークに外接する矩形で囲まれた領域(矩形領域)と重なるセッション領域を特定し、特定したセッション領域に係るセッションに属する書込ストロークを特定するセッション特定部と、セッション特定部で特定された書込ストロークのうち、消去ストロークが進入する単位領域Aのうち少なくとも一つの単位領域Aに進入する書込ストロークを対象ストロークとして特定する対象ストローク特定部として機能する。
よって、電子機器100によれば、消去ストロークに外接する矩形で囲まれた領域と重ならないセッション領域に係るセッションに属する書込ストロークについて、ステップS7以降の処理を行わずに済む。これは、上記の演算量の更なる削減に寄与する。
Further, when the coordinate data of a series of positions constituting the erase stroke is stored in the erase buffer, the CPU 40 is a rectangle circumscribing the erase stroke constituted by the series of positions among the write strokes that are not erased. The session area that overlaps the enclosed area (rectangular area) is identified, and the session identifying unit that identifies the writing stroke belonging to the session related to the identified session area, and the erasure among the writing strokes identified by the session identifying unit It functions as a target stroke specifying unit that specifies, as a target stroke, a writing stroke that enters at least one unit area A among the unit areas A into which the stroke enters.
Therefore, according to the electronic device 100, it is not necessary to perform the processing after step S7 on the writing stroke belonging to the session related to the session area that does not overlap the area surrounded by the rectangle circumscribing the erasing stroke. This contributes to further reduction in the amount of computation.

また、CPU40は、セッション特定部に特定された書込ストロークのうち、対象ストロークとして特定されなかった書込ストローク(ステップS10の判定の結果が否定となる書込ストローク)の各々について、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、消去ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する全部判定処理を実行し、当該全部判定処理の結果が肯定の書込ストロークを消去する全部判定消去部として機能し、当該全部判定消去部として、一つの書込ストロークに係る全部判定処理において、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分と、消去ストロークを構成する一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する。
よって、電子機器100によれば、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについても、消去ストロークとの交差の有無が判定されるから、消去の精度が向上する。
In addition, the CPU 40 writes the writing for each of the writing strokes that are not specified as the target stroke among the writing strokes that are specified by the session specifying unit (the writing stroke in which the determination result of step S10 is negative). Execute all judgment processing to determine whether one of the line segments that connect a series of positions that make up a stroke intersects with one of the line segments that connect a series of positions that make up an erasure stroke The all-determination process functions as an all-determination erasing unit that erases a positive writing stroke, and the all-determination erasing unit constitutes the writing stroke in the all-determination process for one writing stroke. Whether or not there is a crossing between a line segment connecting a series of positions adjacent to each other and a line segment connecting a series of positions constituting an erasure stroke A constant.
Therefore, according to the electronic device 100, since it is determined whether or not a writing stroke that does not enter any of the unit areas into which the erasing stroke enters is determined to intersect with the erasing stroke, the erasing accuracy is improved.

また、CPU40は、全部判定消去部として、前述の一部判定処理の判定結果が肯定でない書込ストロークの各々についても全部判定処理を実行する。僅かではあるが、一部判定処理の判定結果が肯定でない書込ストロークと消去ストロークとが交差する可能性があるから、電子機器100によれば消去の精度が向上する。   Further, the CPU 40 performs all determination processing for each writing stroke for which the determination result of the partial determination processing described above is not affirmative as the all determination erasure unit. Although there is a slight possibility that the writing stroke and the erasing stroke in which the determination result of the partial determination process is not affirmative may intersect, the electronic device 100 improves the erasing accuracy.

なお、本実施形態では、ストレージ80に記憶されたデータについても、書込ストロークを消去することができる。この機能の実現方法としては、CPU40が、書込データWD及び消去データEDとバッファのアドレスに相当する識別情報とをストレージ80に記憶させ、この識別情報を用いて座標データにアクセスする方法が挙げられる。   In the present embodiment, the writing stroke can be erased for the data stored in the storage 80. As a method for realizing this function, there is a method in which the CPU 40 stores the write data WD and the erase data ED and identification information corresponding to the address of the buffer in the storage 80, and uses this identification information to access the coordinate data. It is done.

<4.変形例>
本発明は、上述した実施形態に限らず、上述した実施形態を変形して得られる各種の変形例やその組み合わせを範囲に含みうる。そのような変形例を以下に例示する。
例えば、セッション特定部と対象ストローク特定部とを備えず、総ての書込ストロークについて、消去ストロークが進入する単位領域のうち当該書込ストロークが進入する単位領域を特定するようにしてもよい。
また例えば、全部判定消去部を備えず、消去ストロークが進入する単位領域のいずれにも進入しない書込ストロークについては消去しないようにしてもよい。この変形例によれば、演算量が削減される。
また例えば、全部判定消去部が、一部判定処理の判定結果が肯定でない書込ストロークのいずれについても全部判定処理を実行しないようにしてもよい。つまり、一部判定処理の判定結果が肯定でない書込ストロークについては消去しないようにしてもよい。この変形例によれば、演算量が削減される。
<4. Modification>
The present invention is not limited to the above-described embodiment, and may include various modifications obtained by modifying the above-described embodiment and combinations thereof. Such a modification is illustrated below.
For example, the session specifying unit and the target stroke specifying unit may not be provided, and the unit region where the writing stroke enters may be specified among all the writing strokes among the unit regions where the erasing stroke enters.
Further, for example, the entire determination erasure unit may not be provided, and a writing stroke that does not enter any unit area in which the erasing stroke enters may not be erased. According to this modification, the amount of calculation is reduced.
Further, for example, the all determination erasing unit may not execute the all determination process for any writing stroke for which the determination result of the partial determination process is not affirmative. In other words, the writing stroke for which the determination result of the partial determination process is not affirmative may not be erased. According to this modification, the amount of calculation is reduced.

100……電子機器、200……ペン、10……表示部、11……画面、21……切替ボタン、30……タブレット、40……CPU、60……RAM、A……単位領域、EB……消去バッファ、EST……消去ストローク、WB……書込バッファ、WSTk……書込ストローク、ck,dk……座標データ、wk,ek……アドレス、α……矩形領域、β1〜β3……セッション領域。
100 …… Electronic device, 200 …… Pen, 10 …… Display, 11 …… Screen, 21 …… Switch button, 30 …… Tablet, 40 …… CPU, 60 …… RAM, A …… Unit area, EB ... Erase buffer, EST ... Erase stroke, WB ... Write buffer, WSTk ... Write stroke, ck, dk ... Coordinate data, wk, ek ... Address, α ... Rectangle area, β1-β3 ... ... session area.

Claims (4)

複数の単位領域に分割され、画像が表示される画面と、
前記画面内の指示された位置を繰り返し検出して座標データを出力するタブレットと、
前記画面内の位置の指示の開始から終了までの間に検出される一連の位置で構成される軌跡をストロークとし、前記画像に書き込まれる前記ストロークを書込ストロークとしたとき、前記タブレットから出力された座標データのうち、前記書込ストロークを構成する位置の座標データを順次格納する書込バッファと、
前記書込ストロークを消去するための前記ストロークを消去ストロークとしたとき、前記タブレットから出力された座標データのうち、前記消去ストロークを構成する位置の座標データを順次格納する消去バッファと、
前記書き込みバッファに格納された座標データのうち、消去されていない前記書込ストロークを構成する一連の位置の座標データを用いて、消去されていない前記書込ストロークが書き込まれた前記画像を生成する画像生成部と、
前記一連の位置の座標データが前記消去バッファに格納されると、消去されていない前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを対象ストロークとして特定する候補特定部と、
前記対象ストロークとして特定された前記書込ストロークの各々について、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のいずれかにおいて、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する一部判定処理を実行し、前記一部判定処理の結果が肯定の前記書込ストロークを消去する一部判定消去部とを備え、
前記一部判定消去部は、一つの前記書込ストロークに係る前記一部判定処理において、当該書込ストロークと前記消去ストロークとが共に進入する前記単位領域のうち一つの前記単位領域について、前記書込バッファに格納されている座標データのうち、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データと、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置の座標データとを特定し、特定した座標データを用いて、当該書込ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置のうち当該単位領域内の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する、
ことを特徴とする電子機器。
A screen on which an image is displayed divided into a plurality of unit areas;
A tablet that repeatedly detects the indicated position in the screen and outputs coordinate data;
When the locus composed of a series of positions detected from the start to the end of the position indication in the screen is a stroke, and the stroke written in the image is a writing stroke, it is output from the tablet. A write buffer for sequentially storing coordinate data of positions constituting the write stroke among the coordinate data;
When the stroke for erasing the writing stroke is an erasing stroke, among the coordinate data output from the tablet, an erasing buffer that sequentially stores coordinate data of positions constituting the erasing stroke;
Of the coordinate data stored in the write buffer, the coordinate data of a series of positions constituting the write stroke not erased is used to generate the image in which the write stroke not erased is written. An image generator;
When the coordinate data of the series of positions is stored in the erasure buffer, the writing that enters at least one unit area of the unit areas that the erasing stroke enters among the writing strokes that are not erased. A candidate identifying unit that identifies the included stroke as the target stroke;
For each of the writing strokes specified as the target stroke, in any one of the unit regions where the writing stroke and the erasing stroke enter together, the series of positions constituting the writing stroke are adjacent to each other. Executing a partial determination process for determining whether or not one of the line segments connecting with each other and one of the line segments connecting the series of positions constituting the erasing stroke adjacent to each other, and performing the partial determination process A partial determination erasing unit for erasing the writing stroke with a positive result of
The partial determination erasure unit is configured to perform the write operation on one unit area of the unit areas in which the write stroke and the erase stroke enter together in the partial determination process related to one write stroke. Among the coordinate data stored in the buffer, the coordinate data of the position in the unit area among the series of positions constituting the writing stroke and the unit of the series of positions constituting the erasing stroke Specifying the coordinate data of the position in the area, and using the specified coordinate data, the line segment connecting the positions in the unit area adjacent to each other in the series of positions constituting the writing stroke, and the erasing Determining the presence or absence of intersection with the line segment connecting the positions in the unit area adjacent to each other among the series of positions constituting the stroke,
An electronic device characterized by that.
1又は複数の前記書込ストロークの集合をセッションとしたとき、前記書込ストロークは1又は複数の前記セッションのいずれか一つに属し、
前記候補特定部は、
前記セッションに外接する矩形で囲まれた領域をセッション領域としたとき、前記一連の位置の座標データが前記消去バッファに格納されると、当該一連の位置で構成される前記消去ストロークに外接する矩形で囲まれた領域と重なる前記セッション領域を特定し、特定した前記セッション領域に係る前記セッションに属する前記書込ストロークを特定するセッション特定部と、
前記セッション特定部で特定された前記書込ストロークのうち、前記消去ストロークが進入する前記単位領域のうち少なくとも一つの前記単位領域に進入する前記書込ストロークを前記対象ストロークとして特定する対象ストローク特定部とを備える、
ことを特徴とする請求項1に記載の電子機器。
When a set of one or more of the writing strokes is a session, the writing stroke belongs to any one of the one or more of the sessions,
The candidate specifying unit
When an area surrounded by a rectangle circumscribing the session is defined as a session area, a rectangle circumscribing the erasure stroke constituted by the series of positions when the coordinate data of the series of positions is stored in the erasure buffer. A session identifying unit that identifies the session region that overlaps with the region surrounded by, and identifies the writing stroke belonging to the session associated with the identified session region;
A target stroke specifying unit that specifies, as the target stroke, the writing stroke that enters at least one of the unit areas that the erasing stroke enters among the writing strokes specified by the session specifying unit. With
The electronic device according to claim 1.
前記セッション特定部に特定された前記書込ストロークのうち、前記対象ストロークとして特定されなかった前記書込ストロークの各々について、当該書込ストロークを構成する一連の位置を隣同士で結ぶ線分のいずれかと、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分のいずれかとが交差するか否かを判定する全部判定処理を実行し、前記全部判定処理の結果が肯定の前記書込ストロークを消去する全部判定消去部とを備え、
前記全部判定消去部は、一つの前記書込ストロークに係る前記全部判定処理において、当該書込ストロークを構成する前記一連の位置を隣同士で結ぶ線分と、前記消去ストロークを構成する前記一連の位置を隣同士で結ぶ線分との交差の有無を総当りで判定する、
ことを特徴とする請求項2に記載の電子機器。
Among the writing strokes specified by the session specifying unit, for each of the writing strokes not specified as the target stroke, any of line segments connecting a series of positions constituting the writing stroke adjacent to each other And an all-determination process that determines whether or not one of the line segments that connect the series of positions constituting the erasing stroke intersects each other, and the result of the all-determination process is affirmative An all judgment erasing unit that erases the stroke,
The all determination erasure unit, in the all determination process related to one of the writing strokes, the line segment connecting the series of positions constituting the writing stroke next to each other, and the series of the erasing strokes Judgment of round-robin presence or absence of intersection with the line segment that connects the positions next to each other,
The electronic device according to claim 2.
前記全部判定消去部は、前記一部判定処理の判定結果が肯定でない前記書込ストロークの各々についても前記全部判定処理を実行する、
ことを特徴とする請求項1乃至3のうちいずれか一項に記載の電子機器。
The all determination erasure unit also executes the all determination processing for each of the writing strokes for which the determination result of the partial determination processing is not positive.
The electronic device according to any one of claims 1 to 3, wherein
JP2010012888A 2010-01-25 2010-01-25 Electronics Expired - Fee Related JP5482225B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010012888A JP5482225B2 (en) 2010-01-25 2010-01-25 Electronics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010012888A JP5482225B2 (en) 2010-01-25 2010-01-25 Electronics

Publications (2)

Publication Number Publication Date
JP2011150619A true JP2011150619A (en) 2011-08-04
JP5482225B2 JP5482225B2 (en) 2014-05-07

Family

ID=44537516

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010012888A Expired - Fee Related JP5482225B2 (en) 2010-01-25 2010-01-25 Electronics

Country Status (1)

Country Link
JP (1) JP5482225B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021033805A (en) * 2019-08-28 2021-03-01 株式会社リコー Display unit, display method, and display program
WO2021225033A1 (en) * 2020-05-07 2021-11-11 ブラザー工業株式会社 Editing program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775429A (en) * 2017-03-08 2017-05-31 青岛海信电器股份有限公司 A kind of method and apparatus based on setting-out storage on touch-screen

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60129829A (en) * 1983-12-16 1985-07-11 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Electronic type hand-writing real time erasion
JPH0636073A (en) * 1992-07-16 1994-02-10 Toshiba Corp Handwriting editing device
JPH09258716A (en) * 1996-03-25 1997-10-03 Sanyo Electric Co Ltd Stroke information processing method
JP2000259335A (en) * 1999-03-12 2000-09-22 Seiko Epson Corp Method and processor for handwriting information deletion, and storage medium recording handwriting information delletion program
JP2001014096A (en) * 1999-06-25 2001-01-19 Toshiba Corp Pen input device and character input method in the device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60129829A (en) * 1983-12-16 1985-07-11 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Electronic type hand-writing real time erasion
JPH0636073A (en) * 1992-07-16 1994-02-10 Toshiba Corp Handwriting editing device
JPH09258716A (en) * 1996-03-25 1997-10-03 Sanyo Electric Co Ltd Stroke information processing method
JP2000259335A (en) * 1999-03-12 2000-09-22 Seiko Epson Corp Method and processor for handwriting information deletion, and storage medium recording handwriting information delletion program
JP2001014096A (en) * 1999-06-25 2001-01-19 Toshiba Corp Pen input device and character input method in the device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021033805A (en) * 2019-08-28 2021-03-01 株式会社リコー Display unit, display method, and display program
JP7467842B2 (en) 2019-08-28 2024-04-16 株式会社リコー Display device, display method, and display program
WO2021225033A1 (en) * 2020-05-07 2021-11-11 ブラザー工業株式会社 Editing program
JP2021177273A (en) * 2020-05-07 2021-11-11 ブラザー工業株式会社 Editing program
JP7419959B2 (en) 2020-05-07 2024-01-23 ブラザー工業株式会社 editing program

Also Published As

Publication number Publication date
JP5482225B2 (en) 2014-05-07

Similar Documents

Publication Publication Date Title
JP4560062B2 (en) Handwriting determination apparatus, method, and program
US9141134B2 (en) Utilization of temporal and spatial parameters to enhance the writing capability of an electronic device
US9360955B2 (en) Text entry for electronic devices
CN109407954B (en) Writing track erasing method and system
JP5536690B2 (en) Touch drawing display device and operation method thereof
CN104238768A (en) Handwriting input apparatus and control method
US20040196255A1 (en) Method for implementing a partial ink layer for a pen-based computing device
JP5482225B2 (en) Electronics
JP3292752B2 (en) Gesture processing device and gesture processing method
US20090253505A1 (en) Method for controlling selection of multiple objects displayed on a display device
CN109358799B (en) Method for adding handwritten annotation information input by user on handwriting equipment
JPH10124239A (en) Tabelt input device
CN106371644B (en) Method and device for simultaneously writing by multiple persons on screen
WO2022160619A1 (en) Handwriting recognition method and apparatus, handwriting recognition system and interactive board
CN106933486B (en) Touch implementation method and device for android system
JP5278058B2 (en) Display device
JP2917187B2 (en) Vector data erasure method
JP5801920B2 (en) Touch drawing display device and operation method thereof
JPH09258716A (en) Stroke information processing method
JP2012243230A (en) Display control device and program
JP7388483B2 (en) Display control device, display control method, and program
JP3658947B2 (en) GRAPH DISPLAY DEVICE, GRAPH DISPLAY CONTROL METHOD, AND RECORDING MEDIUM CONTAINING GRAPH DISPLAY CONTROL PROGRAM
JP3578917B2 (en) Image processing apparatus, image processing system, image processing method, and computer-readable recording medium
JP2001243421A (en) Character processor and character processing method
JPH064713A (en) Handwritten character input device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130709

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130902

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140203

R150 Certificate of patent or registration of utility model

Ref document number: 5482225

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees