CN111459593B - Drawing method, device and equipment - Google Patents
Drawing method, device and equipment Download PDFInfo
- Publication number
- CN111459593B CN111459593B CN202010245749.8A CN202010245749A CN111459593B CN 111459593 B CN111459593 B CN 111459593B CN 202010245749 A CN202010245749 A CN 202010245749A CN 111459593 B CN111459593 B CN 111459593B
- Authority
- CN
- China
- Prior art keywords
- handwriting
- screenshot
- drawing area
- serial number
- target
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/80—Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a drawing method, a drawing device and drawing equipment, wherein the drawing method comprises the following steps: in the process of drawing handwriting in the designated drawing area, when detecting that the handwriting editing operation is completed, storing operation information of the handwriting editing operation, wherein the operation information comprises: the whole screenshot of the specified drawing area; when detecting that a designated shortcut operation is triggered, the designated shortcut operation at least comprises the following steps: undo or restore operations; and finding out a target screenshot related to the appointed shortcut operation from all the stored screenshots, and displaying the target screenshot in the appointed drawing area. The processing efficiency when performing the undo or redo operation can be improved.
Description
Technical Field
The invention relates to the technical field of software, in particular to a drawing method, a drawing device and drawing equipment.
Background
In some drawing software, such as electronic whiteboards, a user may draw handwriting (otherwise known as stroke graphics) in a drawing area, and the specific content may include characters, patterns, and the like. When drawing, handwriting editing operation needs to be performed according to user instructions. In some cases, if the user finds that a malfunction occurs after the handwriting editing operation is completed, the handwriting on the drawing area is changed back to the handwriting before the malfunction, typically by undoing the operation. In some cases, if the user finds the handwriting before the undo operation is useful after the undo operation is completed, the handwriting on the drawing area is changed back to the handwriting before the undo operation, typically by a restore operation.
In the related drawing mode, all handwriting on the drawing area before the misoperation is redrawn on the drawing area every time the undo operation is executed, all handwriting on the drawing area before the undo operation is redrawn on the drawing area every time the recovery operation is executed, and the handwriting before the redrawn is still displayed on the drawing area during the redrawn period. However, redrawing the handwriting may require a long time, and the more the handwriting is, the longer the redrawing time is, in the above manner, the user may need to wait for a long time to see the redrawed handwriting, that is, to complete the undo or the recovery of the handwriting after the operation, which results in poor user experience.
Disclosure of Invention
In view of this, the present invention provides a drawing method, apparatus and device, which can improve user experience.
A first aspect of the present invention provides a rendering method, including:
in the process of drawing handwriting in the designated drawing area, when detecting that the handwriting editing operation is completed, storing operation information of the handwriting editing operation, wherein the operation information comprises: the whole screenshot of the designated drawing area;
when detecting that a designated shortcut operation is triggered, the designated shortcut operation at least comprises the following steps: undo or restore operations; and finding out a target screenshot related to the appointed shortcut operation from all the stored screenshots, and displaying the target screenshot in the appointed drawing area.
According to an embodiment of the present invention, the saving operation information of the handwriting editing operation includes:
assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
and correspondingly storing the operation serial number and the operation information.
According to an embodiment of the present invention, finding the target screenshot related to the designated shortcut operation from all the saved screenshots includes:
when the designated shortcut operation is a cancel operation, calculating a difference between a recorded current operation serial number and a set value to obtain a first operation serial number;
finding the screenshot corresponding to the first operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
According to an embodiment of the present invention, finding the target screenshot related to the designated shortcut operation from all the saved screenshots includes:
when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
finding the screenshot corresponding to the second operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
According to an embodiment of the present invention, the operation information further includes: point location information of all handwriting in the specified drawing area;
after the target screenshot is displayed in the designated drawing area, the method further comprises:
if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the saved operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
According to an embodiment of the present invention, the operation information further includes: point location information of all handwriting in the specified drawing area;
after the target screenshot is displayed in the designated drawing area, the method further comprises:
finding out target operation information containing the target screenshot from all the stored operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
In accordance with one embodiment of the present invention,
the appointed drawing area is a drawing area of the electronic whiteboard;
the handwriting editing operation comprises the following steps: handwriting adding operation, handwriting erasing operation and handwriting modifying operation.
A second aspect of the present invention provides a drawing apparatus comprising:
an operation information storage module, configured to store operation information of a handwriting editing operation when it is detected that the handwriting editing operation is completed in a process of drawing a handwriting in a specified drawing area, where the operation information includes: the whole screenshot of the specified drawing area;
the revocation or recovery module is used for detecting that the designated shortcut operation is triggered, and the designated shortcut operation at least comprises the following steps: undo or redo operations; and finding out a target screenshot related to the appointed shortcut operation from all the stored screenshots, and displaying the target screenshot in the appointed drawing area.
According to an embodiment of the present invention, when the operation information storage module stores the operation information of the handwriting editing operation, the operation information storage module is specifically configured to:
assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
and correspondingly storing the operation serial number and the operation information.
According to an embodiment of the present invention, when the revocation or recovery module finds the target screenshot related to the designated shortcut operation from all the stored screenshots, the revocation or recovery module is specifically configured to:
when the designated shortcut operation is a cancel operation, calculating a difference between a recorded current operation serial number and a set value to obtain a first operation serial number;
finding the screenshot corresponding to the first operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
According to an embodiment of the present invention, when the revoking or resuming module finds the target screenshot related to the designated shortcut operation from all the saved screenshots, the revoking or resuming module is specifically configured to:
when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
finding the screenshot corresponding to the second operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
According to an embodiment of the present invention, the operation information further includes: point location information of all handwriting in the designated drawing area;
after the undo or redo module displays the target screenshot in the designated drawing area, the undo or redo module is further configured to:
if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the saved operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
According to an embodiment of the invention, the operation information further comprises: point location information of all handwriting in the specified drawing area;
the undo or redo module, after displaying the target screenshot in the designated drawing area, is further configured to:
finding out target operation information containing the target screenshot from all the stored operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
In accordance with one embodiment of the present invention,
the appointed drawing area is a drawing area of the electronic whiteboard;
the handwriting editing operation comprises the following steps: handwriting adding operation, handwriting erasing operation and handwriting modifying operation.
A third aspect of the invention provides an electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the rendering method as described in the foregoing embodiments.
A fourth aspect of the present invention provides a machine-readable storage medium on which a program is stored, the program, when executed by a processor, implementing the rendering method according to the foregoing embodiments.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, in the process of drawing the handwriting in the appointed drawing area, when the completion of the handwriting editing operation is detected every time, the appointed drawing area can be completely captured, the operation information at least containing the captured image is stored, when the triggering of the appointed shortcut operation is detected, the target captured image related to the appointed shortcut operation can be found from all the stored captured images, and the target captured image is displayed in the appointed drawing area.
In addition, because the processing amount required for displaying the screenshot and the redrawing handwriting is much smaller, the embodiment of the invention realizes the mode of appointed shortcut operations such as undo operation or recovery operation, greatly shortens the processing time and can improve the processing efficiency when the undo or recovery operation is executed.
Drawings
FIG. 1 is a schematic flow chart diagram of a rendering method according to an embodiment of the invention;
FIGS. 2-4 are schematic diagrams of a designated drawing area when three handwriting editing operations are completed, respectively;
fig. 5 is a block diagram of a drawing apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one type of device from another. For example, a first device may also be referred to as a second device, and similarly, a second device may also be referred to as a first device, without departing from the scope of the present invention. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
The following is a detailed description of the drawing method according to the embodiment of the present invention, but the invention should not be limited thereto. In one embodiment, referring to fig. 1, a method of rendering, comprises the steps of:
s100: in the process of drawing handwriting in the designated drawing area, when detecting that the handwriting editing operation is completed, storing operation information of the handwriting editing operation, wherein the operation information comprises: the whole screenshot of the specified drawing area;
s200: when detecting that a designated shortcut operation is triggered, the designated shortcut operation at least comprises the following steps: undo or restore operations; and finding out a target screenshot related to the appointed shortcut operation from all the stored screenshots, and displaying the target screenshot in the appointed drawing area.
In the embodiment of the present invention, an execution subject of the drawing method may be an electronic device, and the type of the electronic device may be a computer device, a mobile device, or the like, and the specific type is not limited. The electronic equipment can be provided with drawing software, and the drawing method of the embodiment of the invention can realize the handwriting cancellation and recovery functions in the drawing software.
The drawing software may be, for example, an electronic whiteboard, but is not particularly limited thereto, and other software having a drawing function is applicable. In the embodiment of the present invention, description is given by taking drawing software as an electronic whiteboard as an example, and the designated drawing area may be a drawing area of the electronic whiteboard.
In step S100, in the process of drawing a handwriting in the designated drawing area, when it is detected that the handwriting editing operation is completed, storing operation information of the handwriting editing operation, where the operation information includes: and the whole screenshot of the specified drawing area.
The user can trigger corresponding handwriting editing operation in the designated drawing area to realize handwriting drawing. The user can trigger corresponding handwriting editing operation in the designated drawing area through input modes such as finger touch, mouse click or touch pen triggering.
The handwriting editing operation is different from the designated shortcut operation, and the handwriting editing operation is an operation for editing the handwriting of the designated drawing area other than the designated shortcut operation. Specifically, the handwriting editing operation may include a handwriting adding operation, a handwriting erasing operation, a handwriting modifying operation, and the like.
The handwriting modification operation may include operations such as handwriting movement, handwriting font change, and handwriting thickness change. For example, in the process of drawing the handwriting in the designated drawing area, when the handwriting needs to be added, a painting brush function in the electronic whiteboard can be selected, and corresponding handwriting adding operation is triggered according to the gesture of the user so as to add the corresponding handwriting in the designated drawing area.
When the handwriting editing operation is detected to be completed, the operation information of the handwriting editing operation is stored, the operation information at least comprises the whole screenshot of the appointed drawing area, and the screenshot comprises all the handwriting in the appointed drawing area when the handwriting editing operation is completed. The specified drawing area may be subjected to screenshot by using a screenshot tool already set on the electronic device, so as to obtain a whole screenshot of the specified drawing area, and certainly, the screenshot obtaining manner is not limited to this.
Of course, the operation information may also include other information, such as point location information specifying handwriting in the drawing area, and the like. The handwriting can be composed of one or more points, and the point location information can be the location information of all the points on the handwriting in the designated drawing area.
In step S200, when it is detected that a designated shortcut operation is triggered, the designated shortcut operation at least includes: undo or restore operations; and finding out a target screenshot related to the appointed shortcut operation from all the stored screenshots, and displaying the target screenshot in the appointed drawing area.
The user can click the shortcut button for designating shortcut operation to trigger the designated shortcut operation. When the electronic equipment detects that the designated shortcut operation is triggered, the target screenshot related to the designated shortcut operation can be found from all stored screenshots, wherein the target screenshot comprises handwriting required by a user, and generally the handwriting is different from the current handwriting in the designated drawing area. And displaying the target screenshot in the specified drawing area, so that handwriting required by the user is presented in the specified drawing area, and the requirement of the user for triggering the specified shortcut operation is visually met.
The designated shortcut operation at least includes a cancel operation or a restore operation, and certainly, the designated shortcut operation is not limited thereto, and for example, the designated shortcut operation may also include returning to the first N operations, and N may be greater than 1.
Taking the designated shortcut operation as an example of the undo operation, if the undo operation is triggered when a certain handwriting editing operation is completed, the handwriting in the target screenshot displayed on the designated drawing area is the same as the handwriting presented in the designated drawing area before the handwriting editing operation is executed.
Taking the designated shortcut operation as the recovery operation as an example, if the recovery operation is triggered after a certain undo operation is executed, the handwriting in the target screenshot displayed on the designated drawing area is the same as the handwriting presented in the designated drawing area before the undo operation is executed.
In the embodiment of the invention, in the process of drawing the handwriting in the appointed drawing area, when the completion of the handwriting editing operation is detected every time, the appointed drawing area can be completely captured, the operation information at least containing the captured image is stored, when the triggering of the appointed shortcut operation is detected, the target captured image related to the appointed shortcut operation can be found from all the stored captured images, and the target captured image is displayed in the appointed drawing area.
In addition, because the processing amount required for displaying the screenshot and the redrawing handwriting is much smaller, the embodiment of the invention realizes the mode of appointed shortcut operations such as undo operation or recovery operation, greatly shortens the processing time and can improve the processing efficiency when the undo or recovery operation is executed.
In one embodiment, in step S100, the saving operation information of the handwriting editing operation includes:
s101: assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
s102: and correspondingly storing the operation serial number and the operation information.
Assigning an operation sequence number to the handwriting editing operation, which may include: and taking the sum of the recorded current operation serial number and the set value as the operation serial number of the handwriting editing operation. Meanwhile, the recorded current operation serial number can be modified into the operation serial number of the handwriting editing operation.
The setting value may be, for example, 1, and the recorded current operation sequence number may be added to 1 to obtain the operation sequence number of the handwriting editing operation. For example, the recorded current operation sequence number is 3, and when the handwriting editing operation is completed, the recorded current operation sequence number is updated from 3 to 4. The current operation sequence number of the initial record may be 0, and is not limited specifically. Of course, the set value may be other values, which are determined according to the requirement.
After the operation serial number is allocated to the handwriting editing operation, the operation serial number and the operation information are correspondingly stored, and can be correspondingly stored in a designated storage space.
Specifically, the method can comprise the following steps:
checking whether operation information corresponding to the operation serial number exists in a designated storage space;
if so, replacing the operation information corresponding to the operation serial number in the designated storage space with the operation information of the handwriting editing operation;
if not, determining the quantity of the operation information stored in the specified storage space, and if the quantity reaches a set quantity, replacing the earliest operation serial number in the specified storage space with the operation serial number, and replacing the operation information corresponding to the earliest operation serial number with the operation information of the handwriting editing operation; and if the number does not reach the set number, correspondingly adding the operation information of the handwriting editing operation and the operation serial number into the specified storage space.
The set number is, for example, 10, if the operation information of the handwriting editing operation with the operation serial number of 1-10 has been previously stored, then, when the 11 th handwriting editing operation is completed, the operation information when the 11 th handwriting editing operation is completed needs to be stored, and since the number of the operation information stored in the specified storage space has reached 10, at this time, the stored operation serial number 1 and the corresponding operation information are deleted, and the operation serial number 11 and the corresponding operation information are stored to the original position of the deleted operation serial number 1 and the corresponding operation information.
Therefore, the operation information stored in the appointed storage space can be ensured to be uniquely corresponding to the operation serial number, and the problem that the wrong screenshot is displayed when the appointed shortcut operation is triggered due to the fact that the wrong screenshot is displayed or the wrong handwriting is redrawn when the operation information is cancelled or recovered is avoided; meanwhile, the quantity of the stored operation information can be limited, and the problem of overlarge occupied memory is avoided.
In an embodiment, in step S200, finding the target screenshot related to the designated shortcut operation from all the saved screenshots may include the following steps:
s201: when the designated shortcut operation is a cancel operation, calculating a difference between a recorded current operation serial number and a set value to obtain a first operation serial number;
s202: and finding the screenshot corresponding to the first operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
The undo operation is to return to the state of the previous handwriting editing operation when the previous handwriting editing operation is completed, calculate the difference between the recorded current operation sequence number and the set value, and obtain the first operation sequence number which is the operation sequence number of the previous handwriting editing operation. Meanwhile, the recorded current operation sequence number may be updated to the first operation sequence number.
After the first operation serial number is determined, finding the screenshot corresponding to the first operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
The undo operation is divided into the following two cases:
in case 1, after the handwriting editing operation is completed, when it is detected for the first time that the undo operation is triggered, the state of the previous handwriting editing operation of the handwriting editing operation needs to be returned, so that the difference between the operation sequence number allocated to the handwriting editing operation (i.e. the recorded current operation sequence number) and the set value can be used as the operation sequence number of the previous handwriting editing operation, i.e. the first operation sequence number, and the recorded current operation sequence number is updated to the first operation sequence number;
case 2: after the last undo operation is performed, it is detected that the undo operation is triggered, at this time, the state of the handwriting editing operation before the handwriting editing operation returned after the last undo operation is performed needs to be returned, the difference between the recorded current operation serial number (i.e. the current operation serial number updated when the undo operation is performed last time) and the set value is used as the first operation serial number, and the recorded current operation serial number is updated to the first operation serial number.
The method comprises the steps of recording an operation serial number when handwriting editing operation is completed every time, and recording an operation serial number when undo operation is executed every time, and can find the required screenshot in time when undo operations of the two conditions are triggered.
Taking the setting value as 1 as an example, when a user clicks a cancel button on a shortcut toolbar, assuming that the recorded current operation serial number is 6, the electronic device detects that the cancel operation is triggered, calculates a first operation serial number as 5 according to the current operation serial number, finds out a screenshot corresponding to the operation serial number 5 from an appointed storage space, determines the screenshot as a target screenshot, displays the target screenshot on an appointed drawing area, and updates the recorded current operation serial number from 6 to 5.
In an embodiment, before finding the target screenshot related to the specified shortcut operation from all the saved screenshots, the method further includes:
when the designated shortcut operation is a revocation operation, adding the recorded revocation times to 1 to obtain the current revocation times;
checking whether the current revocation times are less than the number of all stored screenshots;
if yes, continuing to execute the step of finding the target screenshot related to the appointed shortcut operation from all the saved screenshots, and updating the recorded revocation times to the current revocation times.
Therefore, the number of continuous revocation times has an upper limit, the maximum number of all stored screenshots can be reached, if the current revocation number is smaller than the number of all stored screenshots, the revocation operation can be continuously executed, namely, the step of finding the target screenshot related to the designated shortcut operation from all stored screenshots is continuously executed, the recorded revocation number is updated to the current revocation number, and otherwise, the revocation operation is prohibited.
In an embodiment, in step S200, finding the target screenshot related to the designated shortcut operation from all the saved screenshots may include the following steps:
s203: when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
s204: and finding the screenshot corresponding to the second operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
The purpose of the recovery operation is to return to the state before the undo operation is performed, calculate the sum of the recorded current operation sequence number and the set value, and obtain the second operation sequence number which is the operation sequence number of the handwriting editing operation before the undo operation is performed. Meanwhile, the recorded current operation sequence number may be updated to the first operation sequence number.
After the second operation serial number is determined, finding the screenshot corresponding to the second operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
The recovery operation can also be divided into two cases, namely, a first recovery operation after the undo operation or a non-first recovery operation (2 nd, 3 rd, and the like), the operation serial number is recorded when the handwriting editing operation is completed every time, the operation serial number is recorded when the recovery operation is executed every time, and the required screenshot can be found in time when the recovery operations of the two cases are triggered.
Taking the set value as 1 as an example, when a user clicks a recovery button on a shortcut toolbar, assuming that the recorded current operation serial number is 3, the electronic device detects that recovery operation is triggered, calculates a second operation serial number to be 4 according to the current operation serial number, finds out a screenshot corresponding to the operation serial number 4 from a specified storage space, determines the screenshot to be a target screenshot, displays the target screenshot on a specified drawing area, and updates the recorded current operation serial number from 3 to 4.
In one embodiment, the operation information further includes: point location information of all handwriting in the specified drawing area;
after the target screenshot is displayed in the designated drawing area, the method further comprises the following steps:
s300: if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the saved operation information;
s400: and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
Displaying the target screenshot in the designated drawing area can meet the requirement of a user visually, and if the user does not need to perform handwriting editing operation on the handwriting in the target screenshot at the moment but continues to cancel or restore the handwriting, the user does not need to redraw the handwriting in the designated drawing area; if a user needs to perform handwriting editing operation on the handwriting in the target screenshot, for example, handwriting adding operation, handwriting erasing operation and handwriting modifying operation need to be performed, since the handwriting in the target screenshot can not be edited, handwriting redrawing is required at this time.
After the target screenshot is displayed in the designated drawing area, if a redrawing event triggered by the designated drawing area is detected, it is indicated that a user needs to perform handwriting editing operation on the handwriting, but the handwriting on the target screenshot cannot be moved or erased, so at this time, target operation information including the target screenshot is found out from all stored operation information, the handwriting is redrawn in the designated drawing area according to point location information of all the handwriting included in the target operation information, the target screenshot is cancelled to be displayed in the designated drawing area, and the drawn handwriting is consistent with the handwriting in the target screenshot.
The redrawing trigger event is triggered when the user touches the designated drawing area (including a touch when the user needs to add, erase, or modify handwriting), but may also be triggered in other ways, and is not limited thereto. After redrawing the handwriting in the designated drawing area, the user can continue handwriting editing.
The mode of displaying the target screenshot in the designated drawing area is cancelled, for example, the target screenshot in the designated drawing area may be hidden, or the target screenshot may be deleted from the designated drawing area, and the specific mode is not limited.
In the related mode, the handwriting needs to be redrawn for many times when the handwriting is withdrawn or recovered for many times, and if the operations of withdrawing or recovering for many times continuously occur, the times of redrawing the handwriting are also more, the time needed to be spent is longer, and the processing efficiency is low.
In the embodiment, only when a redrawing trigger event is detected, the target operation information including the target screenshot is found out from all the stored operation information, and the handwriting is redrawn in the specified drawing area according to the point location information of all the handwriting included in the target operation information, so that a user can further edit the handwriting, only one handwriting redrawn is generated if repeated cancellation or repeated recovery continuously occurs, and the rest of the handwriting only needs to display the screenshot, so that the user can continue handwriting editing on the basis of improving the processing efficiency when cancellation or recovery operation is performed.
In one embodiment, the operation information further includes: point location information of all handwriting in the specified drawing area;
after the target screenshot is displayed in the designated drawing area, the method further comprises:
s500: finding out target operation information containing the target screenshot from all the stored operation information;
s600: and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
After the target screenshot is displayed in the designated drawing area, no matter whether a user needs to perform handwriting editing operation on the handwriting or not, the target operation information containing the target screenshot can be found out from all the stored operation information, the handwriting is redrawn in the designated drawing area according to the point location information of all the handwriting contained in the target operation information, and the target screenshot is cancelled to be displayed in the designated drawing area.
In other words, each time the designated shortcut operation is executed, the required target screenshot is displayed in the designated drawing area, and then the handwriting is redrawn in the designated drawing area according to the point location information in the target operation information containing the target screenshot. Therefore, the visual requirement of the user can be met, the user is prevented from waiting for too long time, and the user can continue to perform handwriting editing operation on the handwriting no matter which time the shortcut operation is performed.
The following describes in detail the rendering method according to an embodiment of the present invention, with reference to the examples of fig. 2 to 4:
as shown in fig. 2, when the 2 nd handwriting editing operation (adding the handwriting "c" in the designated drawing area) is completed, the whole screenshot of the designated drawing area and point location information of all the handwriting "bc" are stored in the designated storage space, and correspond to the operation serial number 2, and the recorded current operation serial number is updated to 2;
as shown in fig. 3, when the 3 rd handwriting editing operation (adding the handwriting "d" in the designated drawing area) is completed, the whole screenshot of the designated drawing area and the point location information of all the handwriting "bcd" are stored in the designated storage space, and correspond to the operation serial number 3, and the recorded current operation serial number is updated to 3;
after the 3 rd handwriting editing operation is completed, the user triggers the undo operation, when the device detects that the undo operation is triggered, the difference between the recorded current operation serial number and 1 is calculated to obtain 2 as a first operation serial number, a target screenshot corresponding to the first operation serial number is found from the stored screenshots, the target screenshot is displayed in the specified drawing area to obtain the specified drawing area shown in fig. 2, and the recorded current operation serial number is updated to 2; at this time, if a redrawing trigger event triggered by a specified drawing area is detected, target operation information containing the target screenshot is found out from all stored operation information, the handwriting is redrawn in the specified drawing area according to point location information of all the handwriting contained in the target operation information, and the target screenshot is hidden, so that handwriting editing can be continued in the specified drawing area as shown in fig. 2;
as shown in fig. 4, the user adds an "e" to the designated rendering area, and when the whole screenshot of the designated rendering area shown in fig. 4 and the point location information of "bce" need to be saved, the operation information corresponding to the operation number 3 already exists in the designated storage space, so that the operation information corresponding to the operation number 3 in the designated storage space is replaced by the whole screenshot of the designated rendering area shown in fig. 4 and the point location information of "bce".
The present invention also provides a drawing apparatus, and referring to fig. 5, the drawing apparatus 100 includes:
an operation information storage module 101, configured to, in a process of drawing handwriting in a specified drawing area, when it is detected that a handwriting editing operation is completed, store operation information of the handwriting editing operation, where the operation information includes: the whole screenshot of the designated drawing area;
an undo or redo module 102, configured to, when it is detected that a specified shortcut operation is triggered, at least include: undo or redo operations; and finding out a target screenshot related to the appointed shortcut operation from all saved screenshots, and displaying the target screenshot in the appointed drawing area.
In one embodiment, when the operation information storage module stores the operation information of the handwriting editing operation, the operation information storage module is specifically configured to:
assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
and correspondingly storing the operation serial number and the operation information.
In an embodiment, when the revocation or recovery module finds the target screenshot related to the designated shortcut operation from all the stored screenshots, the revocation or recovery module is specifically configured to:
when the designated shortcut operation is a cancel operation, calculating a difference between a recorded current operation serial number and a set value to obtain a first operation serial number;
finding the screenshot corresponding to the first operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
In an embodiment, when the revocation or recovery module finds the target screenshot related to the designated shortcut operation from all the stored screenshots, the revocation or recovery module is specifically configured to:
when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
finding the screenshot corresponding to the second operation serial number from all the stored screenshots, and determining the found screenshot as the target screenshot.
In one embodiment, the operation information further includes: point location information of all handwriting in the specified drawing area;
after the undo or redo module displays the target screenshot in the designated drawing area, the undo or redo module is further configured to:
if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the stored operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
In one embodiment of the present invention,
the appointed drawing area is a drawing area of the electronic whiteboard;
the handwriting editing operation comprises the following steps: handwriting adding operation, handwriting erasing operation and handwriting modifying operation.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units.
The invention also provides an electronic device, which comprises a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the rendering method as described in the foregoing embodiments.
The embodiment of the drawing device can be applied to electronic equipment. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. In terms of hardware, as shown in fig. 6, fig. 6 is a hardware structure diagram of an electronic device where the drawing apparatus 100 is located, according to an exemplary embodiment of the present invention, and besides the processor 510, the memory 530, the interface 520, and the nonvolatile memory 540 shown in fig. 6, in an embodiment, the electronic device where the apparatus 100 is located may also include other hardware, which is not described again, generally according to an actual function of the electronic device.
The present invention also provides a machine-readable storage medium on which a program is stored, which when executed by a processor, implements the rendering method as described in any one of the foregoing embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Machine-readable storage media include both permanent and non-permanent, removable and non-removable media, and the storage of information may be accomplished by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of machine-readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (11)
1. A method of rendering, comprising:
in the process of drawing handwriting in the designated drawing area, when detecting that the handwriting editing operation is completed, storing operation information of the handwriting editing operation, wherein the operation information comprises: the whole screenshot of the specified drawing area and point location information of all handwriting in the specified drawing area;
when detecting that a designated shortcut operation is triggered, the designated shortcut operation at least comprises the following steps: undo or restore operations; finding out a target screenshot related to the appointed shortcut operation from all stored screenshots, and displaying the target screenshot in the appointed drawing area;
if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the saved operation information;
and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
2. The rendering method of claim 1, wherein said saving operation information of the handwriting editing operation comprises:
assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
and correspondingly storing the operation serial number and the operation information.
3. The rendering method of claim 2, wherein finding the target screenshot related to the specified shortcut operation from all the saved screenshots comprises:
when the designated shortcut operation is a cancel operation, calculating a difference between a recorded current operation serial number and a set value to obtain a first operation serial number;
and finding the screenshot corresponding to the first operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
4. The rendering method of claim 2, wherein finding the target screenshot related to the designated shortcut operation from all the saved screenshots comprises:
when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
and finding the screenshot corresponding to the second operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
5. The rendering method according to any one of claims 1 to 4,
the appointed drawing area is a drawing area of the electronic whiteboard;
the handwriting editing operation comprises the following steps: handwriting adding operation, handwriting erasing operation and handwriting modifying operation.
6. A rendering apparatus, comprising:
an operation information storage module, configured to store operation information of a handwriting editing operation when it is detected that the handwriting editing operation is completed in a process of drawing a handwriting in a specified drawing area, where the operation information includes: the whole screenshot of the specified drawing area and point location information of all handwriting in the specified drawing area;
the revocation or recovery module is used for detecting that the designated shortcut operation is triggered, and the designated shortcut operation at least comprises the following steps: undo or restore operations; finding out a target screenshot related to the appointed shortcut operation from all stored screenshots, and displaying the target screenshot in the appointed drawing area; if a redrawing event triggered by the appointed drawing area is detected, finding out target operation information containing the target screenshot from all the saved operation information; and redrawing the handwriting in the specified drawing area according to the point location information of all the handwriting contained in the target operation information, and canceling to display the target screenshot in the specified drawing area.
7. The drawing apparatus according to claim 6, wherein the operation information storing module, when storing the operation information of the handwriting editing operation, is specifically configured to:
assigning operation serial numbers to the handwriting editing operations, wherein the handwriting editing operations at different moments are assigned with different serial numbers;
and correspondingly storing the operation serial number and the operation information.
8. The rendering apparatus according to claim 7, wherein when the revocation or recovery module finds the target screenshot related to the designated shortcut operation from all the saved screenshots, the revocation or recovery module is specifically configured to:
when the designated shortcut operation is a cancel operation, calculating the difference between the recorded current operation serial number and a set value to obtain a first operation serial number;
and finding the screenshot corresponding to the first operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
9. The rendering apparatus according to claim 7, wherein when the revocation or recovery module finds the target screenshot related to the designated shortcut operation from all the saved screenshots, the revocation or recovery module is specifically configured to:
when the designated shortcut operation is a recovery operation, calculating the sum of the recorded current operation serial number and a set value to obtain a second operation serial number;
and finding the screenshot corresponding to the second operation serial number from all the saved screenshots, and determining the found screenshot as the target screenshot.
10. The rendering apparatus according to any one of claims 6 to 9,
the appointed drawing area is a drawing area of the electronic whiteboard;
the handwriting editing operation comprises the following steps: handwriting adding operation, handwriting erasing operation and handwriting modifying operation.
11. An electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the rendering method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010245749.8A CN111459593B (en) | 2020-03-31 | 2020-03-31 | Drawing method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010245749.8A CN111459593B (en) | 2020-03-31 | 2020-03-31 | Drawing method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111459593A CN111459593A (en) | 2020-07-28 |
CN111459593B true CN111459593B (en) | 2023-03-24 |
Family
ID=71686027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010245749.8A Active CN111459593B (en) | 2020-03-31 | 2020-03-31 | Drawing method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111459593B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112083865B (en) * | 2020-09-24 | 2022-07-12 | Oppo广东移动通信有限公司 | Image generation method and device, terminal and readable storage medium |
CN112462989A (en) * | 2020-11-25 | 2021-03-09 | 广州视源电子科技股份有限公司 | Operation method and device of intelligent interaction panel, intelligent interaction panel and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006277509A (en) * | 2005-03-30 | 2006-10-12 | Tokyo Univ Of Agriculture & Technology | Dot texture superposition notation part shape restoration method and program therefor |
JP2009181360A (en) * | 2008-01-30 | 2009-08-13 | Fuji Xerox Co Ltd | Handwriting information-generating device, program, and handwriting information management system |
CN103218152A (en) * | 2012-12-17 | 2013-07-24 | 上海海知信息技术有限公司 | Method for touch screen editing on handwriting images |
CN104238865A (en) * | 2013-06-08 | 2014-12-24 | 深圳联友科技有限公司 | Method and system for canceling and repeating interface operations in electronic device |
CN108038094A (en) * | 2017-10-17 | 2018-05-15 | 广州视源电子科技股份有限公司 | Document annotation method and device and electronic equipment |
CN109803153A (en) * | 2019-01-15 | 2019-05-24 | 网宿科技股份有限公司 | A kind of the blank method for drafting and device of live video |
CN109947334A (en) * | 2017-12-21 | 2019-06-28 | 珠海金山办公软件有限公司 | A kind of ink marks cancelling method, device and electronic equipment |
CN110798638A (en) * | 2019-10-30 | 2020-02-14 | 深圳市闪联信息技术有限公司 | Electronic whiteboard and picture storage and backtracking method based on time axis |
-
2020
- 2020-03-31 CN CN202010245749.8A patent/CN111459593B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006277509A (en) * | 2005-03-30 | 2006-10-12 | Tokyo Univ Of Agriculture & Technology | Dot texture superposition notation part shape restoration method and program therefor |
JP2009181360A (en) * | 2008-01-30 | 2009-08-13 | Fuji Xerox Co Ltd | Handwriting information-generating device, program, and handwriting information management system |
CN103218152A (en) * | 2012-12-17 | 2013-07-24 | 上海海知信息技术有限公司 | Method for touch screen editing on handwriting images |
CN104238865A (en) * | 2013-06-08 | 2014-12-24 | 深圳联友科技有限公司 | Method and system for canceling and repeating interface operations in electronic device |
CN108038094A (en) * | 2017-10-17 | 2018-05-15 | 广州视源电子科技股份有限公司 | Document annotation method and device and electronic equipment |
CN109947334A (en) * | 2017-12-21 | 2019-06-28 | 珠海金山办公软件有限公司 | A kind of ink marks cancelling method, device and electronic equipment |
CN109803153A (en) * | 2019-01-15 | 2019-05-24 | 网宿科技股份有限公司 | A kind of the blank method for drafting and device of live video |
CN110798638A (en) * | 2019-10-30 | 2020-02-14 | 深圳市闪联信息技术有限公司 | Electronic whiteboard and picture storage and backtracking method based on time axis |
Non-Patent Citations (2)
Title |
---|
Android画板开发(三) 撤销反撤销功能实现;5281 收藏 7;《https://blog.csdn.net/niubitianping/article/details/78408603》;20171031;全文 * |
android项目 之 记事本(8) ----- 画板功能之撤销、恢;jesson20121020;《https://blog.csdn.net/jesson20121020/article/details/39397015》;20140919;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111459593A (en) | 2020-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9423929B2 (en) | Predictive scrolling | |
US4633436A (en) | Real-time rub-out erase for an electronic handwriting facility | |
CN102508572B (en) | Touch gesture notification dismissal techniques | |
US5825360A (en) | Method for arranging windows in a computer workspace | |
CN105184839B (en) | Seamless representation of video and geometry | |
CN111459593B (en) | Drawing method, device and equipment | |
US20040061723A1 (en) | Method of implementing a plurality of system tray areas | |
CN107170026B (en) | Method and device for drawing line on display screen and terminal equipment | |
CN112596661A (en) | Writing track processing method and device and interactive panel | |
US9880986B2 (en) | Information display apparatus, non-transitory computer-readable storage medium and display control method | |
US8542207B1 (en) | Pencil eraser gesture and gesture recognition method for touch-enabled user interfaces | |
CN111524211B (en) | Handwriting erasing method, handwriting erasing device and handwriting erasing equipment | |
KR101768897B1 (en) | Touch screen device for moving or copying of an object based on the touch input and operating method thereof | |
CN113608667B (en) | Electronic handwriting writing and erasing method, storage medium and device | |
US11334295B2 (en) | Transparent interactive interface for ballot marking and methods of using the same | |
CN111782114B (en) | Element display method, device, equipment and medium in manuscript editing application | |
CN114041111A (en) | Handwriting drawing method, apparatus, electronic device, medium, and program product | |
CN110297558B (en) | Multi-touch control method and device, intelligent interaction panel and storage medium | |
US9170733B2 (en) | Information processing apparatus, information processing method, and non-transitory computer readable medium | |
EP2712433B1 (en) | User interface for drawing with electronic devices | |
CN105045484B (en) | Operation processing method and electronic equipment | |
JP6168406B2 (en) | Object operation system, control program, and control method | |
US9791994B2 (en) | User interface for application interface manipulation | |
CN115048023A (en) | Electronic note restoring method, device, medium and interactive panel | |
JP5442812B2 (en) | Object processing apparatus, object processing method, and object processing program |
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 |