The invention relates to a split application, which is an original application with the application number of 201611160197.0 and the application date of 2016, 12 and 15 and is named as a method and a device for annotating.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide an annotation method and apparatus, which are simple in annotation operation, and can perform secondary editing on annotation content, so as to meet the use requirements of users.
The invention provides a commenting method, which comprises the following steps:
monitoring the annotating operation of a user on a globally transparent editing view covered on a current display page in an annotating state;
displaying the annotation handwriting corresponding to the annotation operation, and simultaneously recording the annotation handwriting;
and when the switching operation of the user is detected, storing the currently recorded annotation handwriting as an annotation page file, and clearing the annotation handwriting drawn on the editing view.
Preferably, the switching operation is a page turning operation or an annotation adding operation.
Preferably, in the annotating state, before monitoring an annotating operation of a user on a globally transparent editing view overlaid on a current display page, the method further includes:
when entering an annotation state, screen capturing is carried out on a current display page, a screen capture of the current display page is obtained, and a globally transparent editing view is covered on the current display page;
when detecting the switching operation of the user, saving the currently recorded annotation handwriting as an annotation page file, and clearing the annotation handwriting drawn on the editing view, the method further includes:
and generating an annotation preview page according to the annotation page file and the screenshot of the current display page, and adding the annotation preview page to a preview list of the current display page.
Preferably, the switching operation is a page turning operation;
generating an annotation preview page according to the annotation page file and the screenshot of the current display page, and adding the annotation preview page to a preview list of the current display page, and further including:
skipping to a target page pointed by the page turning operation, performing screen capture on the target page, and storing a screenshot obtained by screen capture;
loading an annotation preview page in a preview list of the target page;
and when detecting that the annotation preview page positioned in the preview list is selected by the user, reading an annotation page file corresponding to the annotation preview page, and drawing the annotation handwriting recorded in the annotation page file on the editing view.
Preferably, when entering the annotation state, the method further comprises:
generating a globally floating visible toolbar on a current display page; wherein the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
The invention also provides a batch injection device, which comprises:
the monitoring unit is used for monitoring the annotating operation of a user on the globally transparent editing view covered on the current display page in the annotating state;
the display recording unit is used for displaying the annotation handwriting corresponding to the annotation operation and simultaneously recording the annotation handwriting;
and the switching unit is used for storing the currently recorded annotation handwriting as an annotation page file and clearing the annotation handwriting drawn on the editing view when the switching operation of the user is detected.
Preferably, the switching operation is a page turning operation or an annotation adding operation.
Preferably, the method further comprises the following steps:
the comment entering unit is used for capturing a screen of a current display page when entering a comment state, acquiring a screenshot of the current display page, and covering a globally transparent editing view on the current display page;
and the annotation preview page generating unit is used for generating an annotation preview page according to the annotation page file and the screenshot of the current display page, and adding the annotation preview page to a preview list of the current display page.
Preferably, the switching operation is a page turning operation;
the annotating device further comprises:
the skipping unit is used for skipping to a target page pointed by the page turning operation, performing screen capture on the target page and storing a screenshot obtained by screen capture;
the loading unit is used for loading the comment preview page in the preview list of the target page;
and the annotation handwriting drawing unit is used for reading an annotation page file corresponding to the annotation preview page and drawing the annotation handwriting recorded in the annotation page file on the editing view when the fact that the user selects the annotation preview page in the preview list is detected.
Preferably, the method further comprises the following steps:
the toolbar generating unit is used for generating a toolbar which is globally visible in a floating mode on the current display page; wherein the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
According to the annotating method and the annotating device, the annotating handwriting is recorded in the annotating process of the user, the currently recorded annotating handwriting is stored as the annotating page file when the switching operation is executed, and the annotating handwriting drawn on the editing view is removed. On one hand, when the user turns pages or adds the annotation pages, the annotation can be directly performed without performing the operation of entering the annotation or deleting the current annotation handwriting, so that the operation of the user is facilitated; on the other hand, because the annotation handwriting in the annotation page file is stored in a data form instead of a picture format, the annotation handwriting can be drawn in the edit view again, and the drawn annotation handwriting is allowed to be edited for the second time by the user, so that the use requirement of the user is met, and the user experience is good.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides an annotating method, which can be executed by an annotating device and at least includes the following steps:
s101, monitoring annotation operation of a user on a globally transparent editing view covered on a current display page in an annotation state.
In the embodiment of the invention, when a user needs to annotate a current display page of an opened document (such as a PPT document, a word document and the like), a button for entering annotation can be clicked, at the moment, after the annotation device detects the click operation of the user, the annotation device is switched from an editing state to an annotation state, and a globally transparent editing view is covered on the current display page for the user to annotate.
In an embodiment of the present invention, for an android system, the globally transparent edit view may be a surface view, which has an independent drawing surface, that is, does not share the same drawing surface with its host window. Because of having an independent drawing surface, the User Interface (UI) of surfeview can be drawn in an independent thread. And because the main thread resource is not occupied, the surfaceView can realize a complex and efficient UI on one hand, and cannot cause that the user input cannot be responded in time on the other hand. It should be noted that, for different systems, the edit view may have different names or implementation methods, but only the implementation principle or the effect of the edit view is similar to that of the surface view of the android system, which is within the protection scope of the present invention, and is not described herein again.
In addition, it should be noted that the document may be opened and displayed by the self-contained related software on the smart tablet, may also be opened on a common PC or a handwriting-enabled computer, and displayed on the smart tablet after being connected to the smart tablet through HDMI and VGA, or may also be opened on a common PC or a handwriting-enabled computer, and then transmitted to the smart tablet through a wireless screen for display, and the like, which is not limited in the present invention.
And S102, displaying the annotation handwriting corresponding to the annotation operation, and simultaneously recording the annotation handwriting.
In the embodiment of the present invention, as shown in fig. 2, after the edit view is generated, a user may perform an annotation operation on the edit view, for example, writing or drawing a line (e.g., drawing line 01 in fig. 2) on the edit view to mark a content that needs to be focused on. When the user carries out annotating operation in real time, the annotating device can control and display the annotating handwriting corresponding to the annotating operation on one hand, and record the annotating handwriting on the other hand. Wherein, the annotation handwriting recorded here at least comprises the following information: the coordinates of each pixel point and the color value of each pixel point forming the handwriting.
S103, when the switching operation of the user is detected, the currently recorded annotation handwriting is stored as an annotation page file, and the annotation handwriting drawn on the editing view is removed.
In the embodiment of the present invention, the annotating device may store the annotation handwriting as an annotating page file (for example, as an XML file), and associate the annotating page file with the current display page, so that when the annotation handwriting needs to be displayed on the current display page again, the stored annotating page file only needs to be loaded, and the annotation handwriting recorded in the annotating page file is redrawn on the editing view.
It should be noted that, in the embodiment of the present invention, the switching operation may be a page turning operation or an annotation adding operation, which are separately described below.
1. The switching operation is a page turning operation
When a user turns pages by clicking a page turning button, the annotating device stores the currently recorded annotation handwriting as an annotation page file through a background thread, and simultaneously empties the annotation handwriting on the editing view and then jumps to a target page. When the target page is jumped to, the smart tablet is still in an annotation state, that is, the target page is still covered with the globally transparent editing view, so that a user can directly perform annotation operation on the editing view. Furthermore, if the target page has a corresponding stored annotation page file before, the annotation page file can also be read, and the annotation handwriting in the annotation page file is redrawn on the editing view and edited for the second time.
2. The switching operation is an operation of adding an annotation page
When a user adds a new annotation page on a current display page by clicking the new annotation page or adding the annotation page, the annotation device stores the currently recorded annotation handwriting as an annotation page file through a background thread, and simultaneously empties the annotation handwriting on an editing view, at this time, the smart tablet is still in an annotation state, that is, the current display page is still covered with the globally transparent editing view, so that the user can directly annotate on the editing view. In this embodiment, different annotation pages can be added to the same current display page, that is, the effect of annotating multiple pages of one screen of content is achieved.
In summary, in the annotation method provided in the embodiment of the present invention, in the user annotation process, the annotation handwriting is recorded, and when the switching operation is performed, the currently recorded annotation handwriting is stored as the annotation page file, and the annotation handwriting drawn on the edit view is cleared. On one hand, when the user turns pages or adds the annotation pages, the annotation can be directly performed without performing the operation of entering the annotation or deleting the current annotation handwriting, so that the operation of the user is facilitated; on the other hand, because the annotation handwriting in the annotation page file is stored in a data form instead of a picture format, the annotation handwriting can be drawn in the edit view again, and the drawn annotation handwriting is allowed to be edited for the second time by the user, so that the use requirement of the user is met, and the user experience is good.
In order to facilitate an understanding of the invention, some preferred embodiments of the invention will now be described.
First preferred embodiment:
preferably, when entering the annotation state, the current display page is subjected to screen capture to obtain a screen capture of the current display page, and a globally transparent editing view is overlaid on the current display page.
And after step S103, further comprising:
and S104, generating an annotation preview page according to the annotation page file and the screenshot of the current display page, and adding the annotation preview page to a preview list of the current display page.
In the preferred embodiment, the annotation preview page can be generated by directly drawing the annotation handwriting in the annotation page file on the screenshot.
In the preferred embodiment, particularly, for the case that the same display page has a plurality of annotation page files, when a user wants to load a certain annotation page file, the annotation handwriting in the annotation page file can be previewed through the annotation preview page, and the required annotation content is selected, so that the selection of the user is facilitated, and the operation steps and time are saved.
In addition, the annotating device also allows a user to drag and adjust the position sequence of the annotation page files and delete one annotation page file in the preview list, and meanwhile, the annotating device also provides a function of playing the annotation preview in a full screen mode, so that the user can conveniently review the content.
Second preferred embodiment:
preferably, when the switching operation is a page turning operation, after step S104, the method further includes:
s105, jumping to a target page pointed by the page turning operation, performing screen capture on the target page, and storing a screenshot obtained by screen capture.
In the preferred embodiment, after jumping to a target page, a screen shot is performed on the target page first, and a screenshot obtained by the screen shot is saved for subsequently generating an annotation preview page.
And S106, loading the comment preview page in the preview list of the target page.
S107, when it is detected that the user selects the annotation preview page in the preview list, reading an annotation page file corresponding to the annotation preview page, and drawing the annotation handwriting recorded in the annotation page file on the editing view.
In the preferred embodiment, after jumping to the target page, a new annotation page is generated by default, but if the target page has already been annotated before, that is, the preview list of the target page contains an annotation preview page, the user is allowed to select the already generated annotation page file to generate an annotation. Specifically, a user can select annotation content to be loaded by browsing annotation preview pages located in the preview list, and after the user selects a certain annotation preview page, the annotation device reads an annotation page file corresponding to the annotation preview page and draws annotation handwriting recorded in the annotation page file on the editing view.
In the preferred embodiment, the user is allowed to load the generated annotation page file, so that the use experience of the user is facilitated.
Third preferred embodiment:
preferably, when entering the annotation state, the method further comprises:
generating a globally floating visible toolbar on a current display page; wherein the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
As shown in fig. 2, in the preferred embodiment, in order to facilitate the operation of the user, the annotating device generates a globally floating-visible toolbar 02 on the current display page, wherein the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
Specifically, when the annotating operation is performed, the annotating device can judge that the user clicks a control on the toolbar to trigger corresponding event information, for example, when the user clicks a page turning control, the annotating device triggers a PageUp/PageDown button message, and at this time, page turning is performed. And if the user clicks the preview control, the whole preview of all the annotation preview pages can be carried out. If the user clicks the saving control, the annotating device can save the annotating page file and the screenshot, wherein the annotating page file and the screenshot can be saved in a PDF format, a picture format or the like, and can also be saved in an ENB file format, and after the annotating page file and the screenshot are saved in the ENB format, corresponding software (an Android-side electronic whiteboard, a PC-side EasiNote or the like) can be used for opening for secondary editing. And if the user clicks the annotation page adding control, saving the currently recorded annotation handwriting as an annotation page file, and clearing the annotation handwriting drawn on the editing view.
In the preferred embodiment, the overall suspension visible toolbar is provided, so that the annotation operation of a user is facilitated, and the user experience is good.
Referring to fig. 3, the present invention further provides an annotating device 100, including:
the monitoring unit 10 is configured to monitor an annotation operation of a user on a globally transparent editing view overlaid on a current display page in an annotation state;
the display recording unit 20 is used for displaying the annotation handwriting corresponding to the annotation operation and simultaneously recording the annotation handwriting;
and the switching unit 30 is configured to, when a switching operation of the user is detected, store the currently recorded annotation handwriting as an annotation page file, and clear the annotation handwriting drawn on the editing view.
The annotating device 100 provided by the embodiment of the invention records the annotating handwriting in the annotating process of the user, stores the currently recorded annotating handwriting as an annotating page file when the switching operation is executed, and removes the annotating handwriting drawn on the editing view. On one hand, when the user turns pages or adds the annotation pages, the annotation can be directly performed without performing the operation of entering the annotation or deleting the current annotation handwriting, so that the operation of the user is facilitated; on the other hand, because the annotation handwriting in the annotation page file is stored in a data form instead of a picture format, the annotation handwriting can be drawn in the edit view again, and the drawn annotation handwriting is allowed to be edited for the second time by the user, so that the use requirement of the user is met, and the user experience is good.
Preferably, the switching operation is a page turning operation or an annotation adding operation.
Preferably, referring to fig. 4, the annotating device 100 further comprises:
the annotation entering unit 40 is configured to capture a screen of a current display page when entering an annotation state, obtain a screenshot of the current display page, and cover a globally transparent editing view on the current display page;
and the annotation preview page generating unit 50 is configured to generate an annotation preview page according to the annotation page file and the screenshot of the current display page, and add the annotation preview page to a preview list of the current display page.
In the preferred embodiment, particularly, for a case that the same display page has a plurality of annotation page files, when a user wants to load a certain annotation page file, the annotation preview page generated by the annotation preview page generating unit 50 can preview the annotation handwriting in the annotation page file, and select the required annotation content, thereby facilitating the selection of the user and saving the operation steps and time.
Preferably, referring to fig. 5, the switching operation is a page turning operation;
the annotating device 100 further comprises:
and the skipping unit 60 is used for skipping to a target page pointed by the page turning operation, performing screen capture on the target page, and storing a screenshot obtained by screen capture.
And a loading unit 70, configured to load the annotation preview page in the preview list of the target page.
And the annotation handwriting drawing unit 80 is configured to, when it is detected that the user selects the annotation preview page located in the preview list, read an annotation page file corresponding to the annotation preview page, and draw the annotation handwriting recorded in the annotation page file on the edit view.
In the preferred embodiment, after jumping to the target page by the jumping unit 60, a new annotation page is generated by default, but if the target page has already been annotated before, that is, the preview list of the target page includes an annotation preview page, the user is allowed to select the already generated annotation page file to generate an annotation. Specifically, a user may select annotation content to be loaded by browsing annotation preview pages located in the preview list, and after the user selects a certain annotation preview page, the loading unit 70 reads an annotation page file corresponding to the annotation preview page, and the annotation trace drawing unit 80 draws annotation traces recorded in the annotation page file on the edit view.
In the preferred embodiment, the user is allowed to load the generated annotation page file, so that the use experience of the user is facilitated.
Preferably, referring to fig. 6 together, the annotating device 100 further comprises:
a toolbar generating unit 90, configured to generate a toolbar that is globally hovered visible on a current display page; wherein the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
As shown in fig. 2, in the preferred embodiment, in order to facilitate the operation of the user, the toolbar generating unit 90 generates a globally floating visible toolbar 02 on the current display page, where the toolbar includes at least one of the following controls: the page turning control, the saving control, the previewing control and the annotation page adding control.
In the preferred embodiment, the overall suspension visible toolbar is provided, so that the annotation operation of a user is facilitated, and the user experience is good.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.