[go: up one dir, main page]

CN106598928B - A method and system for annotating on a display screen - Google Patents

A method and system for annotating on a display screen Download PDF

Info

Publication number
CN106598928B
CN106598928B CN201611093450.5A CN201611093450A CN106598928B CN 106598928 B CN106598928 B CN 106598928B CN 201611093450 A CN201611093450 A CN 201611093450A CN 106598928 B CN106598928 B CN 106598928B
Authority
CN
China
Prior art keywords
annotation
view
line
view information
layer view
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.)
Active
Application number
CN201611093450.5A
Other languages
Chinese (zh)
Other versions
CN106598928A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201911002566.7A priority Critical patent/CN110866378B/en
Priority to CN201611093450.5A priority patent/CN106598928B/en
Publication of CN106598928A publication Critical patent/CN106598928A/en
Application granted granted Critical
Publication of CN106598928B publication Critical patent/CN106598928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种在显示屏上进行批注的方法,包括创建上层视图和下层视图,上层视图和下层视图在其父类视图坐标系统中的位置和大小相同;批注操作开始后,实时获取并存储批注标识物在显示屏上经过的批注线条的上层视图信息,并根据批注线条上层视图信息持续在上层视图中绘制批注线条;当前批注操作完成后,根据此次批注线条的上层视图信息和已有的批注线条下层视图信息,重新绘制下层视图中的批注线条;重新绘制下层视图中的批注线条后,清空批注线条的上层视图信息。本发明还提供一种在显示屏上进行批注的系统。本发明在批注线条数量较多时,绘制性能明显提升,减少了设备屏幕的整体刷新频率,节省CPU、内存等系统资源。

A method for annotating on a display screen includes creating an upper view and a lower view, wherein the upper view and the lower view have the same position and size in their parent view coordinate system; after the annotation operation begins, the upper view information of the annotation line that the annotation marker passes through on the display screen is obtained and stored in real time, and the annotation line is continuously drawn in the upper view according to the upper view information of the annotation line; after the current annotation operation is completed, the annotation line in the lower view is redrawn according to the upper view information of the current annotation line and the lower view information of the existing annotation line; after the annotation line in the lower view is redrawn, the upper view information of the annotation line is cleared. The present invention also provides a system for annotating on a display screen. When the number of annotation lines is large, the present invention significantly improves the drawing performance, reduces the overall refresh frequency of the device screen, and saves system resources such as CPU and memory.

Description

一种在显示屏上进行批注的方法及其系统A method and system for annotating on a display screen

技术领域technical field

本发明涉及一种显示技术,具体涉及一种在显示屏上进行批注的方法及其系统。The present invention relates to a display technology, in particular to a method and system for annotating on a display screen.

背景技术Background technique

随着移动式电子设备及触摸屏技术的发展,触摸屏已经应用到越来越多的移动设备中。伴随着触摸应用,出现了多种相应的应用软件,使得用户能够在移动设备上实现特定的操作。典型的,用户可以通过特定软件在触摸屏上对显示内容进行批注标记。With the development of mobile electronic equipment and touch screen technology, touch screens have been applied to more and more mobile devices. Along with the touch application, a variety of corresponding application software has emerged, enabling users to perform specific operations on the mobile device. Typically, the user can annotate and mark the displayed content on the touch screen through specific software.

在移动设备的触摸屏上实现实时批注画线标记操作时,现有的实现方案是在一个视图对象上频繁执行刷新操作来显示批注线条,也就是说,不管当前触摸屏上的批注线条数量多少,视图对象都必须在每次刷新时重新绘制所有之前批注的线条。When implementing real-time annotation and line marking operations on the touch screen of a mobile device, the existing implementation is to frequently perform refresh operations on a view object to display annotation lines, that is, regardless of the number of annotation lines on the current touch screen, the view Objects must redraw all previously annotated lines on each refresh.

当视图对象上存在过多的批注线条时,设备每次都需要重新绘制之前画过的所有线条,受限于移动设备的处理能力,其批注显示性能会受到明显的影响,导致批注时线条的显示有明显不跟随触摸点的现象出现。When there are too many annotation lines on the view object, the device needs to redraw all the previously drawn lines every time. Limited by the processing power of the mobile device, its annotation display performance will be significantly affected, resulting in the loss of lines when annotating. The display obviously does not follow the touch point.

发明内容Contents of the invention

本发明提供一种在显示屏上进行批注的方法,包括以下步骤:The invention provides a method for annotating on a display screen, comprising the following steps:

步骤1:创建上层视图和下层视图,上层视图和下层视图在其父类视图坐标系统中的位置和大小相同;Step 1: Create the upper layer view and the lower layer view, the upper layer view and the lower layer view have the same position and size in the coordinate system of their parent class view;

步骤2:批注操作开始后,实时获取并存储批注标识物在显示屏上经过的当前批注线条的上层视图信息,并根据所述批注线条上层视图信息持续在上层视图中绘制批注的线条;Step 2: After the annotation operation starts, obtain and store the upper layer view information of the current annotation line passing by the annotation marker on the display screen in real time, and continue to draw the annotation line in the upper layer view according to the upper layer view information of the annotation line;

步骤3:当前批注操作完成后,根据此次批注线条的上层视图信息和下层视图中已有的批注线条下层视图信息,重新绘制下层视图中的批注线条;Step 3: After the current annotation operation is completed, redraw the annotation line in the lower view according to the upper view information of the annotation line and the lower view information of the existing annotation line in the lower view;

步骤4:重新绘制下层视图中的批注线条后,清空批注线条的上层视图信息。Step 4: After redrawing the annotation lines in the lower view, clear the upper view information of the annotation lines.

进一步,步骤3中,通过存储完成的此次批注线条的上层视图信息,调用每次批注操作的批注线条上层视图信息,重新绘制下层视图中的批注线条。Further, in step 3, by storing the upper-layer view information of the annotation line completed this time, calling the upper-layer view information of the annotation line for each annotation operation, and redrawing the annotation line in the lower-layer view.

进一步,所存储的批注线条上层视图信息包括批注线条位置坐标和信息最后存储时间。Further, the stored upper layer view information of the annotation line includes the position coordinates of the annotation line and the last storage time of the information.

进一步,步骤3中,批注线条上层视图信息的存储和调用通过一个公共类进行,通过上层视图将批注线条上层视图信息添加到公共类的用于存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条批注线条上层视图信息;在下层视图中重新绘制批注线条时,在该公共类中按照批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的批注线条上层视图信息。Further, in step 3, the storage and calling of the upper-layer view information of the annotation line is carried out through a public class, and the upper-layer view information of the annotation line is added to the array of the public class for storing the upper-layer view information of the annotation line through the upper layer view, and each time it is completed The annotation operation stores the upper layer view information of an annotation line; when the annotation line is redrawn in the lower layer view, in this public class, the annotation line upper layer view information of each annotation operation is called sequentially according to the last storage time of the annotation line upper layer view information .

进一步,所存储的批注线条上层视图信息还包括批注线条的粗细、颜色和信息生成时间。Further, the stored upper layer view information of the annotation line also includes the thickness, color and information generation time of the annotation line.

进一步,所述批注标识物为手指或触摸笔时,当手指或触摸笔接触触摸显示屏时,此次批注操作开始;当手指或触摸笔离开触摸显示屏时,此次批注操作完成。Further, when the annotation marker is a finger or a touch pen, when the finger or the touch pen touches the touch screen, the annotation operation starts; when the finger or the touch pen leaves the touch screen, the annotation operation is completed.

进一步,所述批注标识物为鼠标时,当在显示屏上按下鼠标的特定按键时,此次批注操作开始;当鼠标的特定按键被松开时,此次批注操作完成。Further, when the annotation identifier is a mouse, when a specific button of the mouse is pressed on the display screen, the annotation operation starts; when the specific button of the mouse is released, the annotation operation is completed.

本发明还提供一种用于在显示屏上进行批注的系统,包括视图创建模块、当前批注线条上层视图信息获取与存储模块、上层视图批注线条绘制模块、下层视图批注线条绘制模块和上层视图批注线条删除模块,其中,The present invention also provides a system for annotating on a display screen, including a view creation module, an upper-layer view information acquisition and storage module for the current annotation line, an upper-layer view annotation line drawing module, a lower-layer view annotation line drawing module, and an upper-layer view annotation line removal module, where,

视图创建模块:创建上层视图和下层视图,上层视图和下层视图在其父类视图坐标系统中的位置和大小相同;View creation module: create the upper view and the lower view, the position and size of the upper view and the lower view are the same in the coordinate system of their parent class view;

当前批注线条上层视图信息获取与存储模块:批注操作开始后,实时获取并存储批注标识物在显示屏上经过的当前批注线条的上层视图信息;Obtaining and storing module of the upper layer view information of the current annotation line: after the annotation operation starts, obtain and store the upper layer view information of the current annotation line passing by the annotation marker on the display screen in real time;

上层视图批注线条绘制模块:根据所述批注线条上层视图信息持续在上层视图中绘制批注的线条;Upper-layer view annotation line drawing module: continuously draw the annotation line in the upper-layer view according to the upper-layer view information of the annotation line;

下层视图批注线条绘制模块:当前批注操作完成后,根据此次批注线条的上层视图信息和下层视图中已有的批注线条下层视图信息,重新绘制下层视图中的批注线条;Lower layer view annotation line drawing module: after the current annotation operation is completed, redraw the annotation line in the lower layer view according to the upper layer view information of the annotation line and the existing annotation line lower view information in the lower layer view;

上层视图批注线条删除模块:重新绘制下层视图中的批注线条后,将当前批注线条上层视图信息获取与存储模块中的批注线条的上层视图信息清空。Upper layer view annotation line deletion module: After redrawing the annotation lines in the lower view, clear the upper layer view information of the annotation lines in the current annotation line upper view information acquisition and storage module.

进一步,下层视图批注线条绘制模块包括批注线条上层视图信息存储模块和批注线条上层视图信息调用模块,Further, the lower layer view annotation line drawing module includes an annotation line upper layer view information storage module and an annotation line upper layer view information calling module,

批注线条上层视图信息存储模块:通过上层视图将批注线条上层视图信息添加到公共类的用于存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条批注线条上层视图信息;Annotation line upper-level view information storage module: add the annotation line upper-level view information to the array of the public class for storing the annotation line upper-level view information through the upper-level view, and store an annotation line upper-level view information every time an annotation operation is completed;

批注线条上层视图信息调用模块:在下层视图中重新绘制批注线条时,在所述公共类中按照批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的线条上层视图信息。Annotation line upper-layer view information calling module: when re-drawing annotation lines in the lower-layer view, in the public class, sequentially call the line upper-layer view information of each annotation operation according to the last storage time of the annotation line upper-layer view information.

进一步,所述系统为移动电子设备。Further, the system is a mobile electronic device.

本发明在批注时使用具有上下层级的两个不同视图对象,上层视图只在批注时暂时显示批注线条,下层视图则显示已批注完成的所有批注线条。在实时批注时,始终仅刷新/重绘上层视图,下层视图仅在批注完成后刷新一次。The present invention uses two different view objects with upper and lower levels when annotating. The upper view only temporarily displays the annotation lines when annotating, and the lower view displays all the annotation lines that have been annotated. When annotating in real time, only the upper view is always refreshed/redrawn, and the lower view is only refreshed once after the annotation is complete.

本发明的优点在于,批注线条数量较多时,批注线条绘制性能明显提升,减少了设备屏幕的整体刷新频率,节省CPU、内存等系统资源,尤其适用于移动电子设备。The invention has the advantages that when the number of annotation lines is large, the annotation line drawing performance is significantly improved, the overall refresh frequency of the device screen is reduced, and system resources such as CPU and memory are saved, and it is especially suitable for mobile electronic devices.

附图说明Description of drawings

图1是本发明的一种在显示屏上进行批注的方法流程图;Fig. 1 is a flow chart of a method for annotating on a display screen according to the present invention;

图2是本发明的方法中上层视图和下层视图显示内容的变化示意图;Fig. 2 is a schematic diagram of changes in the display content of the upper layer view and the lower layer view in the method of the present invention;

图3是本发明的一种在显示屏上进行批注的系统框图。Fig. 3 is a block diagram of a system for annotating on a display screen according to the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明进一步详细说明。但本领域技术人员知晓,本发明并不局限于附图和以下实施例。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with specific embodiments and with reference to the accompanying drawings. However, those skilled in the art know that the present invention is not limited to the drawings and the following embodiments.

在本发明的一个优选实施例中,参照图1、图2,在包括触摸显示屏上利用手指(或触摸笔)进行批注的方法,包括以下步骤:In a preferred embodiment of the present invention, with reference to Fig. 1, Fig. 2, the method that utilizes finger (or touch pen) to carry out annotation on comprising touch display screen, comprises the following steps:

步骤1:创建两个在其父类视图坐标系统中的位置和大小相同的视图——上层视图和下层视图,并将其依次添加到父类视图中,其中上层视图在下层视图之上。Step 1: Create two views with the same position and size in the coordinate system of its parent class view - the upper view and the lower view, and add them to the parent view in turn, where the upper view is above the lower view.

所创建的两个视图对象长宽相同、坐标原点相同,会直接显示出显示屏的图像。创建两个视图的原因在于,其中上层视图用于在显示屏上显示出实时批注的线条,下层视图会在一次批注完成后显示已完成的所有批注的线条,其中上层视图在没有任何批注笔迹时是完全透明的。The two created view objects have the same length and width, and the same origin of coordinates, and will directly display the image on the display screen. The reason for creating two views is that the upper view is used to display the real-time annotation lines on the display screen, and the lower view will display all the completed annotation lines after one annotation is completed, and the upper view is without any annotation handwriting is completely transparent.

步骤2:当在显示屏上按下手指时,表示批注操作开始,获取并存储手指在显示屏上经过的当前批注线条的上层视图信息,并根据所述批注线条上层视图信息在上层视图中绘制批注的线条,直至手指从显示屏上抬起,此次批注操作结束。Step 2: When the finger is pressed on the display screen, it means that the annotation operation starts, acquire and store the upper layer view information of the current annotation line passed by the finger on the display screen, and draw in the upper layer view according to the upper layer view information of the annotation line The annotated line until the finger is lifted from the display screen, and the annotation operation ends.

在此步骤中,在批注过程中,即显示屏上按下手指、手指在显示屏上移动、手指从显示屏上抬起过程中,均不断刷新上层视图,重新绘制批注的线条,从而保证上层视图实时显示当前批注的线条。In this step, during the annotation process, that is, when the finger is pressed on the display screen, the finger is moved on the display screen, and the finger is lifted from the display screen, the upper layer view is constantly refreshed and the lines of the annotation are redrawn, so as to ensure that the upper layer The view displays the currently annotated line in real time.

此外,所存储的批注线条上层视图信息包括位置坐标、粗细、颜色、生成时间和最后存储时间。其中,位置坐标为手指在触摸显示屏上划过的连续轨迹坐标;线条粗细可通过检测触摸压力值转换得到或由用户事先选择;线条颜色信息由用户事先选择;当开始存储批注线条上层视图信息的时间为其生成时间,完成当前批注操作时刻为其最后存储时间。In addition, the stored upper view information of the annotation line includes position coordinates, thickness, color, generation time and last storage time. Among them, the position coordinates are the continuous trajectory coordinates of the fingers across the touch screen; the line thickness can be converted by detecting the touch pressure value or selected by the user in advance; the line color information is selected by the user in advance; when the annotation line upper layer view information is stored The time of is its generation time, and the moment when the current annotation operation is completed is its last storage time.

由于批注线条上层视图信息要由下层视图显示并存储,所以步骤2中对批注线条上层视图信息进行存储,存储如笔迹的坐标、粗细、颜色、生成时间和最后存储时间等关键数据,存储这些数据还可用于批注线条的撤销和恢复。Since the upper-level view information of the annotation line is displayed and stored by the lower-level view, the upper-level view information of the annotation line is stored in step 2, and key data such as the coordinates, thickness, color, generation time, and last storage time of the handwriting are stored, and these data are stored Can also be used to undo and redo annotation lines.

步骤3:手指从显示屏上抬起后,表明当前批注操作完成,将批注线条上层视图信息传递到下层视图,并重新绘制下层视图中的批注线条。Step 3: After the finger is lifted from the display screen, it indicates that the current annotation operation is completed, and the upper view information of the annotation line is passed to the lower view, and the annotation line in the lower view is redrawn.

存储每次批注操作后的批注线条上层视图信息,供下层视图调用。批注线条上层视图信息的存储和调用通过一个公共类进行,即上层视图把批注线条上层视图信息添加到公共类的专门存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条批注线条上层视图信息;下层视图重新绘制时则请求该公共类,按批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的批注线条上层视图信息。下层视图只需要刷新一次视图。Store the upper-layer view information of the annotation line after each annotation operation, and call it for the lower-layer view. The storage and calling of the upper-layer view information of the annotation line is carried out through a public class, that is, the upper-layer view adds the upper-layer view information of the annotation line to the array of the public class dedicated to storing the upper-layer view information of the annotation line, and stores a annotation line every time an annotation operation is completed The upper layer view information; when the lower layer view is redrawn, this public class is requested, and the annotation line upper layer view information of each annotation operation is called sequentially according to the last storage time of the annotation line upper layer view information. The underlying view only needs to refresh the view once.

在步骤3中,存储批注线条上层视图信息和调用线条上层视图信息的过程看似复杂,但是在CPU中对于此类存储和返回的运算所花时间,远少于批注时实时刷新上层视图所用时间,极大的节省了系统资源。In step 3, the process of storing the upper layer view information of the annotation line and calling the upper layer view information of the line seems complicated, but the time spent on such storage and return operations in the CPU is much less than the time it takes to refresh the upper layer view in real time when annotating , greatly saving system resources.

步骤4:重新绘制下层视图中的批注线条后,在上层视图中清除批注的线条。Step 4: After redrawing the annotated lines in the lower view, clear the annotated lines in the upper view.

由于步骤3中已经根据所有已完成批注的批注线条上层视图信息在下层视图中进行了绘制(包括刚刚在上层视图上完成的批注操作),此时,只需要将上层视图的批注线条清除掉,清空批注线条的上层视图信息。Since step 3 has already drawn in the lower view according to the upper view information of all the annotation lines that have been annotated (including the annotation operation just completed on the upper view), at this time, only the annotation lines of the upper view need to be cleared, Clear the upper layer view information of the annotation line.

重复步骤1-4完成后续的批注操作。Repeat steps 1-4 to complete subsequent annotation operations.

本发明中,显示屏会以相当快的频率刷新视图对象,而每次用手指批注时,上层视图都会被刷新。从步骤2中批注操作开始到步骤4上层视图清除批注的线条,上层视图都会不断刷新,从而可以保证在批注过程中显示屏显示的批注线条比较流畅,不会有迟钝感。In the present invention, the display screen will refresh the view objects at a fairly fast frequency, and every time an annotation is made with a finger, the upper view will be refreshed. From the start of the annotation operation in step 2 to the clearing of the annotation lines in the upper view in step 4, the upper view will be refreshed continuously, so as to ensure that the annotation lines displayed on the display screen are relatively smooth during the annotation process without feeling dull.

以上,以手指操作触摸屏为例,对本发明进行了详细说明。本领域技术人员可以理解,在一般的具有显示屏的家用电脑中,也可以使用上述方法。与上述实施例相比,仅是用鼠标进行批注操作代替用手指进行批注操作。当在显示屏上按下鼠标的特定按键时,表示批注操作开始,当鼠标的特定按键被松开时,表示此次批注操作结束,在批注过程中,同样获取并存储鼠标在显示屏上经过的批注线条的上层视图信息。Above, the present invention has been described in detail by taking finger operation on the touch screen as an example. Those skilled in the art can understand that the above method can also be used in a general home computer with a display screen. Compared with the above embodiment, only the mouse is used for the annotation operation instead of the finger for the annotation operation. When a specific button of the mouse is pressed on the display screen, it means that the annotation operation starts, and when the specific button of the mouse is released, it means that the annotation operation ends. The upper view information of the annotation line.

本发明的方法能够适用于现有的各种操作系统,如Windows、iOS或Android操作系统,尤其适用于移动设备的操作,所述移动设备例如为手机、平板。以下,以安装有iOS系统的具有触摸屏的移动电子设备为例进行说明。The method of the present invention can be applied to various existing operating systems, such as Windows, iOS or Android operating systems, and is especially suitable for the operation of mobile devices, such as mobile phones and tablets. Hereinafter, a mobile electronic device with a touch screen installed with an iOS system is taken as an example for description.

步骤21:在一个UIView中创建两个frame属性相同的UIView子视图对象——上层视图和下层视图,两个视图具有上下的层级关系,并且均能够实现drawRect方法,该方法在设备每次刷新视图时都会被调用。Step 21: Create two UIView subview objects with the same frame property in a UIView—the upper view and the lower view. The two views have a hierarchical relationship between top and bottom, and both can implement the drawRect method. This method is executed every time the device refreshes the view. will be called every time.

步骤22:当手指接触屏幕时,上层视图的touchesBegan:withEvent方法被调用,在该方法中实时调用setNeedsDisplay方法,实时刷新上层视图;Step 22: When the finger touches the screen, the touchesBegan:withEvent method of the upper view is called, and the setNeedsDisplay method is called in this method in real time to refresh the upper view in real time;

当手指在屏幕上移动时,上层视图的touchesMoved:withEvent方法被调用,在该方法中实时刷新上层视图的同时,将批注线条的UIBezierPath、UIColor等批注线条上层视图信息存储到一个SLAnnotationModel的临时对象中;When the finger moves on the screen, the touchesMoved:withEvent method of the upper view is called. In this method, while the upper view is refreshed in real time, the upper view information of the annotation line such as UIBezierPath and UIColor is stored in a temporary object of SLAnnotationModel ;

当手指离开屏幕时,上层视图的touchesEnded:withEvent方法被调用,在方法中将包含本次批注的批注线条上层视图信息的临时对象SLAnnotationModel添加到公共类SLAnnotationModelManager的数组属性中。When the finger leaves the screen, the touchesEnded:withEvent method of the upper layer view is called, and in the method, the temporary object SLAnnotationModel containing the annotation line upper layer view information of this annotation is added to the array property of the public class SLAnnotationModelManager.

步骤23:手指离开屏幕的同时下层视图从公共类SLAnnotationModelManager中请求每一条已完成的批注线条上层视图信息,并在drawRect方法中根据每条批注线条上层视图信息对批注线条进行重新绘制。Step 23: When the finger leaves the screen, the lower view requests the upper view information of each completed annotation line from the public class SLAnnotationModelManager, and redraws the annotation line according to the upper view information of each annotation line in the drawRect method.

步骤24:上层视图调用UIBezierPath的removeAllPoints方法清除本次批注画的线条。Step 24: The upper view calls the removeAllPoints method of UIBezierPath to clear the lines drawn in this annotation.

本发明还提供一种用于在显示屏上进行批注的系统,如图3所示,包括视图创建模块、当前批注线条上层视图信息获取与存储模块、上层视图批注线条绘制模块、下层视图批注线条绘制模块和上层视图批注线条删除模块。其中,The present invention also provides a system for annotating on the display screen, as shown in Figure 3, including a view creation module, an upper-layer view information acquisition and storage module for the current annotation line, an upper-layer view annotation line drawing module, and a lower-layer view annotation line The drawing module and the upper layer view annotation line deletion module. in,

视图创建模块:用于创建两个在其父类视图坐标系统中的位置和大小相同的视图——上层视图和下层视图,并将其依次添加到父类视图中,其中上层视图在下层视图之上。View creation module: used to create two views with the same position and size in the coordinate system of its parent class view—the upper view and the lower view, and add them to the parent view in turn, where the upper view is between the lower view superior.

所创建的两个视图对象长宽相同、坐标原点相同,会直接显示出显示屏的图像。创建两个视图的原因在于,其中上层视图用于在显示屏上显示出实时批注的线条,下层视图会在一次批注完成后显示已完成的所有批注的线条。The two created view objects have the same length and width, and the same origin of coordinates, and will directly display the image on the display screen. The reason for creating two views is that the upper view is used to display real-time annotation lines on the display, and the lower view will display all completed annotation lines after one annotation is completed.

当前批注线条上层视图信息获取与存储模块:用于在批注操作开始后,获取并存储批注标识物(手指或鼠标)在显示屏上经过的当前批注线条的上层视图信息。Obtaining and storing module of upper layer view information of current annotation line: used for acquiring and storing the upper layer view information of the current annotation line passed by the annotation marker (finger or mouse) on the display screen after the annotation operation starts.

上层视图批注线条绘制模块:用于根据所述批注线条上层视图信息在上层视图中绘制批注的线条,直至批注操作结束。An upper-layer view annotation line drawing module: used to draw annotated lines in the upper-layer view according to the upper-layer view information of the annotation lines until the annotation operation ends.

所存储的批注线条上层视图信息包括位置坐标、粗细、颜色、生成时间和最后存储时间。其中,位置坐标为手指在触摸显示屏上划过的连续轨迹坐标;线条粗细可通过检测触摸压力值转换得到或是用户事先选择的;线条颜色信息是用户事先选择的;当开始存储批注线条上层视图信息的时间为其生成时间,完成当前批注操作时刻为其最后存储时间。The stored upper layer view information of annotation lines includes position coordinates, thickness, color, generation time and last storage time. Among them, the position coordinates are the continuous trajectory coordinates of the fingers across the touch screen; the line thickness can be converted by detecting the touch pressure value or selected by the user in advance; the line color information is selected by the user in advance; when the upper layer of the annotation line is stored The time of view information is its generation time, and the moment when the current annotation operation is completed is its last storage time.

由于批注线条上层视图信息要由下层视图显示并存储,所以步骤2中对批注线条上层视图信息进行存储,存储如笔迹的坐标、粗细、颜色、生成时间和最后存储时间等关键数据,存储这些数据还可用于批注线条的撤销和恢复。Since the upper-level view information of the annotation line is displayed and stored by the lower-level view, the upper-level view information of the annotation line is stored in step 2, and key data such as the coordinates, thickness, color, generation time, and last storage time of the handwriting are stored, and these data are stored Can also be used to undo and redo annotation lines.

下层视图批注线条绘制模块:当前批注操作完成后,根据每次批注操作的线条上层视图信息,重新绘制下层视图中的批注线条。Lower layer view annotation line drawing module: after the current annotation operation is completed, redraw the annotation lines in the lower layer view according to the upper layer view information of each annotation operation.

下层视图批注线条绘制模块包括批注线条上层视图信息存储模块和批注线条上层视图信息调用模块,其中:The lower layer view annotation line drawing module includes an annotation line upper layer view information storage module and an annotation line upper layer view information calling module, wherein:

批注线条上层视图信息存储模块:存储每次批注操作后的线条上层视图信息。线条上层视图信息的存储和调用通过一个公共类进行,即上层视图把批注线条上层视图信息添加到公共类的专门存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条线条上层视图信息。Annotation line upper layer view information storage module: store the line upper layer view information after each annotation operation. The storage and calling of the upper layer view information of the line is carried out through a public class, that is, the upper layer view adds the upper layer view information of the annotation line to the array of the public class dedicated to storing the upper layer view information of the annotation line, and stores a line upper layer view every time an annotation operation is completed information.

批注线条上层视图信息调用模块:下层视图重新绘制时则请求所述公共类,按批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的线条上层视图信息。Annotation line upper-layer view information calling module: when the lower-layer view is redrawn, the public class is requested, and the line upper-layer view information of each annotation operation is called sequentially according to the last storage time of the annotation line upper-layer view information.

上层视图批注线条绘制模块:重新绘制下层视图中的批注线条后,将当前批注线条上层视图信息获取与存储模块中清空批注线条的上层视图信息。Upper view annotation line drawing module: After redrawing the annotation lines in the lower view, acquire the upper view information of the current annotation line and the upper view information of the empty annotation lines in the storage module.

以上,对本发明的实施方式进行了说明。但是,本发明不限定于上述实施方式。凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The embodiments of the present invention have been described above. However, the present invention is not limited to the above-mentioned embodiments. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (9)

1.一种在显示屏上进行批注的方法,其特征在于,包括以下步骤:1. A method for annotating on a display screen, comprising the following steps: 创建上层视图和下层视图,上层视图和下层视图在其父类视图坐标系统中的位置和大小相同;Create an upper layer view and a lower layer view, and the position and size of the upper layer view and the lower layer view in the coordinate system of its parent class view are the same; 批注操作开始后,实时获取并存储批注标识物在显示屏上经过的当前批注线条的上层视图信息,并根据所述批注线条上层视图信息持续在上层视图中绘制批注的线条;After the annotation operation starts, obtain and store the upper layer view information of the current annotation line that the annotation marker passes through on the display screen in real time, and continue to draw the annotation line in the upper layer view according to the upper layer view information of the annotation line; 当前批注操作完成后,存储完成的此次批注线条的上层视图信息,调用每次批注操作的批注线条上层视图信息,重新绘制下层视图中的批注线条;After the current annotation operation is completed, store the upper view information of the completed annotation line, call the upper layer view information of each annotation operation, and redraw the annotation line in the lower view; 重新绘制下层视图中的批注线条后,清空批注线条的上层视图信息。After redrawing the annotation lines in the lower view, clear the upper view information of the annotation lines. 2.如权利要求1所述的方法,其特征在于:所存储的批注线条上层视图信息包括批注线条位置坐标和信息最后存储时间。2. The method according to claim 1, wherein the stored upper-level view information of the annotation line includes the position coordinates of the annotation line and the last storage time of the information. 3.如权利要求2所述的方法,其特征在于:批注线条上层视图信息的存储和调用通过一个公共类进行,通过上层视图将批注线条上层视图信息添加到公共类的用于存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条批注线条上层视图信息;在下层视图中重新绘制批注线条时,在该公共类中按照批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的批注线条上层视图信息。3. The method according to claim 2, characterized in that: the storage and calling of the annotation line upper layer view information is carried out through a public class, and the annotation line upper layer view information is added to the upper layer of the public class for storing the annotation line by the upper layer view In the array of view information, every time an annotation operation is completed, the upper layer view information of an annotation line is stored; when the annotation line is redrawn in the lower layer view, in this public class, the last storage time of the upper layer view information of the annotation line is sequentially called. The upper layer view information of the annotation line for the annotation operation. 4.如权利要求2所述的方法,其特征在于:所存储的批注线条上层视图信息还包括批注线条的粗细、颜色和/或信息生成时间。4. The method according to claim 2, wherein the stored upper-layer view information of the annotation line further includes the thickness, color and/or information generation time of the annotation line. 5.如权利要求1所述的方法,其特征在于:所述批注标识物为手指或触摸笔时,当手指或触摸笔接触触摸显示屏时,此次批注操作开始;当手指或触摸笔离开触摸显示屏时,此次批注操作完成。5. The method according to claim 1, characterized in that: when the annotation marker is a finger or a touch pen, when the finger or the touch pen touches the touch screen, the annotation operation starts; when the finger or the touch pen leaves When the screen is touched, the annotation operation is completed. 6.如权利要求1所述的方法,其特征在于:所述批注标识物为鼠标时,当在显示屏上按下鼠标的特定按键时,此次批注操作开始;当鼠标的特定按键被松开时,此次批注操作完成。6. The method according to claim 1, characterized in that: when the annotation marker is a mouse, when a specific button of the mouse is pressed on the display screen, the annotation operation starts; when the specific button of the mouse is released When it is turned on, the annotation operation is completed. 7.一种用于在显示屏上进行批注的系统,其特征在于,包括视图创建模块、当前批注线条上层视图信息获取与存储模块、上层视图批注线条绘制模块、下层视图批注线条绘制模块和上层视图批注线条删除模块,其中,7. A system for annotating on a display screen, characterized in that it includes a view creation module, an upper layer view information acquisition and storage module for the current annotation line, an upper layer view annotation line drawing module, a lower layer view annotation line drawing module and an upper layer View annotation line deletion module, in which, 视图创建模块:创建上层视图和下层视图,上层视图和下层视图在其父类视图坐标系统中的位置和大小相同;View creation module: create the upper view and the lower view, the position and size of the upper view and the lower view are the same in the coordinate system of their parent class view; 当前批注线条上层视图信息获取与存储模块:批注操作开始后,实时获取并存储批注标识物在显示屏上经过的当前批注线条的上层视图信息;Obtaining and storing module of the upper layer view information of the current annotation line: after the annotation operation starts, obtain and store the upper layer view information of the current annotation line passing by the annotation marker on the display screen in real time; 上层视图批注线条绘制模块:根据所述批注线条上层视图信息持续在上层视图中绘制批注的线条;Upper-layer view annotation line drawing module: continuously draw the annotation line in the upper-layer view according to the upper-layer view information of the annotation line; 下层视图批注线条绘制模块:当前批注操作完成后,存储完成的此次批注线条的上层视图信息,调用每次批注操作的批注线条上层视图信息,重新绘制下层视图中的批注线条;Lower layer view annotation line drawing module: after the current annotation operation is completed, store the upper layer view information of the completed annotation line, call the upper layer view information of the annotation line for each annotation operation, and redraw the annotation line in the lower layer view; 上层视图批注线条删除模块:重新绘制下层视图中的批注线条后,将当前批注线条上层视图信息获取与存储模块中的批注线条的上层视图信息清空。Upper layer view annotation line deletion module: After redrawing the annotation lines in the lower view, clear the upper layer view information of the annotation lines in the current annotation line upper view information acquisition and storage module. 8.如权利要求7所述的系统,其特征在于:下层视图批注线条绘制模块包括批注线条上层视图信息存储模块和批注线条上层视图信息调用模块,8. The system according to claim 7, characterized in that: the lower layer view annotation line drawing module includes an annotation line upper layer view information storage module and an annotation line upper layer view information calling module, 批注线条上层视图信息存储模块:通过上层视图将批注线条上层视图信息添加到公共类的用于存储批注线条上层视图信息的数组中,每完成一次批注操作就存储一条批注线条上层视图信息;Annotation line upper-level view information storage module: add the annotation line upper-level view information to the array of the public class for storing the annotation line upper-level view information through the upper-level view, and store an annotation line upper-level view information every time an annotation operation is completed; 批注线条上层视图信息调用模块:在下层视图中重新绘制批注线条时,在所述公共类中按照批注线条上层视图信息的最后存储时间先后,顺序调用每次批注操作的线条上层视图信息。Annotation line upper-layer view information calling module: when re-drawing annotation lines in the lower-layer view, in the public class, sequentially call the line upper-layer view information of each annotation operation according to the last storage time of the annotation line upper-layer view information. 9.如权利要求8所述的系统,其特征在于:所述系统为移动电子设备。9. The system of claim 8, wherein the system is a mobile electronic device.
CN201611093450.5A 2016-12-01 2016-12-01 A method and system for annotating on a display screen Active CN106598928B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911002566.7A CN110866378B (en) 2016-12-01 2016-12-01 Method and system for annotating on display screen
CN201611093450.5A CN106598928B (en) 2016-12-01 2016-12-01 A method and system for annotating on a display screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611093450.5A CN106598928B (en) 2016-12-01 2016-12-01 A method and system for annotating on a display screen

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201911002566.7A Division CN110866378B (en) 2016-12-01 2016-12-01 Method and system for annotating on display screen

Publications (2)

Publication Number Publication Date
CN106598928A CN106598928A (en) 2017-04-26
CN106598928B true CN106598928B (en) 2019-09-17

Family

ID=58596773

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201611093450.5A Active CN106598928B (en) 2016-12-01 2016-12-01 A method and system for annotating on a display screen
CN201911002566.7A Active CN110866378B (en) 2016-12-01 2016-12-01 Method and system for annotating on display screen

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201911002566.7A Active CN110866378B (en) 2016-12-01 2016-12-01 Method and system for annotating on display screen

Country Status (1)

Country Link
CN (2) CN106598928B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874292B (en) * 2018-07-16 2021-12-03 广州视源电子科技股份有限公司 Comment display method and device and intelligent interactive panel
CN109614178A (en) * 2018-09-04 2019-04-12 广州视源电子科技股份有限公司 Comment display method, device, equipment and storage medium
CN109766151A (en) * 2018-11-28 2019-05-17 福建天泉教育科技有限公司 A kind of method and terminal for describing paintbrush person's handwriting
CN111415398B (en) * 2019-01-08 2024-01-05 杭州海康威视数字技术股份有限公司 Method and device for displaying annotation on display screen
CN114692580A (en) * 2021-04-22 2022-07-01 广州创知科技有限公司 Annotation control method and interactive tablet

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0767419A1 (en) * 1995-08-18 1997-04-09 International Business Machines Corporation Method and system in a data processing system windowing environment for displaying previously obscured information
CN102855079A (en) * 2011-05-24 2013-01-02 Lg电子株式会社 Mobile terminal
CN103049247A (en) * 2011-10-11 2013-04-17 永其科技股份有限公司 Method for annotating on computer screen
CN103207731A (en) * 2013-04-07 2013-07-17 广州视睿电子科技有限公司 Annotating method and device for multi-channel display of all-in-one machine
CN105912224A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 Method and device for WeChat annotation

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6793625B2 (en) * 2000-11-13 2004-09-21 Draeger Medical Systems, Inc. Method and apparatus for concurrently displaying respective images representing real-time data and non real-time data
CN101930779B (en) * 2010-07-29 2012-02-29 华为终端有限公司 A video annotation method and video player
CN105573702A (en) * 2015-12-16 2016-05-11 广州视睿电子科技有限公司 Method and system for synchronizing movement and scaling of remote annotation
CN105446689B (en) * 2015-12-16 2018-12-07 广州视睿电子科技有限公司 Method and system for remote annotation synchronization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0767419A1 (en) * 1995-08-18 1997-04-09 International Business Machines Corporation Method and system in a data processing system windowing environment for displaying previously obscured information
CN102855079A (en) * 2011-05-24 2013-01-02 Lg电子株式会社 Mobile terminal
CN103049247A (en) * 2011-10-11 2013-04-17 永其科技股份有限公司 Method for annotating on computer screen
CN103207731A (en) * 2013-04-07 2013-07-17 广州视睿电子科技有限公司 Annotating method and device for multi-channel display of all-in-one machine
CN105912224A (en) * 2015-12-14 2016-08-31 乐视网信息技术(北京)股份有限公司 Method and device for WeChat annotation

Also Published As

Publication number Publication date
CN110866378B (en) 2023-12-01
CN106598928A (en) 2017-04-26
CN110866378A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN106598928B (en) A method and system for annotating on a display screen
JP6427559B6 (en) Permanent synchronization system for handwriting input
JP6430197B2 (en) Electronic apparatus and method
US20120216113A1 (en) Touch gestures for text-entry operations
KR20150014083A (en) Method For Sensing Inputs of Electrical Device And Electrical Device Thereof
KR20140038568A (en) Multi-touch uses, gestures, and implementation
JP6100013B2 (en) Electronic device and handwritten document processing method
CN105579947A (en) Apparatus and method for displaying graphics in electronic equipment
JP6448639B2 (en) Text selection method, apparatus and terminal
US20140123036A1 (en) Touch screen display process
US9170733B2 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
US20150098653A1 (en) Method, electronic device and storage medium
US20130346893A1 (en) Electronic device and method for editing document using the electronic device
US20160062601A1 (en) Electronic device with touch screen and method for moving application functional interface
EP2818998A1 (en) Method and apparatus for creating an electronic document in a mobile terminal
US10970476B2 (en) Augmenting digital ink strokes
JP2016085547A (en) Electronic apparatus and method
TWI543068B (en) Single-finger operation mobile device screen interface method
US20180350121A1 (en) Global annotations across contents
JP2014175012A (en) Mouse pointer control method
CN104238921A (en) Custom polygon drawing method and device
CN110751417B (en) Storage model establishing method and device, electronic equipment and storage medium
JP6408273B2 (en) Information processing apparatus, information processing program, and information processing method
CN104463086B (en) A kind of information processing method and equipment
JP2019023888A (en) Information processing apparatus, information processing program and information processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant