Stroke rendering method, device, storage medium and terminal

By determining the operation area and non-operating strokes in the electronic artboard and re-rendering the strokes in the area, the problem of time-consuming and high power consumption in the erase and undo operations is solved, and the refresh fluency of the artboard is improved.

CN113282214BActive Publication Date: 2025-02-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110562084.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2025-02-25
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

In the erase scene and the undo scene, all remaining parts are redrawn, which has technical problems such as long time, high power consumption, and poor refreshing.

Method used

By determining the operation area and its non-operation strokes based on the user's erase operation or undo operation in the electronic artboard, then deleting all original strokes in the operation area and re-rendering the non-operation strokes in that area.

Benefits of technology

Reduces time and power consumption in erase or undo operations, and improves the refresh fluency of electronic artboards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113282214B_ABST
    Figure CN113282214B_ABST
Patent Text Reader

Abstract

The present application discloses a stroke rendering method, device, storage medium and terminal, and relates to the technical field of electronic drawing boards. First, based on the user's erase operation or undo operation in the electronic drawing board, the operation area and the non-operation strokes in the operation area are determined, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; then all the original strokes in the operation area are deleted, and the non-operation strokes in the operation area are re-rendered. Since a smaller operation area and non-operation strokes can be determined in the electronic drawing board based on the user's operation, then only all the original strokes in the operation area can be deleted, and the non-operation strokes in the operation area can be re-rendered, without deleting all the strokes in the electronic drawing board, and without rendering all the non-operation strokes in the electronic drawing board, the time and power consumption in the erase operation or undo operation can be greatly reduced, and the refresh smoothness of the electronic drawing board can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic drawing boards, and in particular to a stroke rendering method, device, storage medium and terminal. Background Art

[0002] With the development of science and technology, terminals are increasingly appearing in people's lives. People can run various applications in the terminals to implement various functions. For example, users can write with strokes through electronic drawing boards or drawing software. Therefore, stroke rendering methods have also become one of the research focuses of technicians in this field. Summary of the invention

[0003] The present application provides a stroke rendering method, device, storage medium and terminal, which can solve the technical problems in the related art of redrawing all remaining parts in erasing scenes and undoing scenes, which are time-consuming, power-intensive and non-smooth refreshing.

[0004] In a first aspect, an embodiment of the present application provides a stroke rendering method, the method comprising:

[0005] Based on an erase operation or an undo operation performed by a user on the electronic drawing board, determining an operation area in the electronic drawing board and non-operation strokes in the operation area, wherein an area of ​​the operation area is smaller than an area of ​​the electronic drawing board;

[0006] All original strokes in the operation area are deleted, and the non-operation strokes are re-rendered in the operation area.

[0007] In a second aspect, an embodiment of the present application provides a stroke rendering device, the device comprising:

[0008] A rendering determination module, used to determine an operation area in the electronic drawing board and non-operation strokes in the operation area based on an erase operation or an undo operation performed by a user in the electronic drawing board, wherein the area of ​​the operation area is smaller than the area of ​​the electronic drawing board;

[0009] The rendering implementation module is used to delete all original strokes in the operation area and re-render the non-operation strokes in the operation area.

[0010] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.

[0011] In a fourth aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0012] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0013] The present application provides a stroke rendering method, which first determines the operation area and non-operation strokes in the operation area of ​​the electronic drawing board based on the user's erase operation or undo operation in the electronic drawing board, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; then deletes all the original strokes in the operation area, and re-renders the non-operation strokes in the operation area. Since a smaller operation area and non-operation strokes can be determined in the electronic drawing board based on the user's operation, and then only all the original strokes in the operation area can be deleted, and the non-operation strokes in the operation area can be re-rendered, without deleting all the strokes in the electronic drawing board, and without rendering all the non-operation strokes in the electronic drawing board, the time and power consumption in the erase operation or undo operation can be greatly reduced, and the refresh smoothness of the electronic drawing board can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 An exemplary system architecture diagram of a stroke rendering method provided in an embodiment of the present application;

[0016] Figure 2 A system interaction diagram of a stroke rendering method provided in an embodiment of the present application;

[0017] Figure 3 A schematic flow chart of a stroke rendering method provided in another embodiment of the present application;

[0018] Figure 4 A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0019] Figure 5 A schematic flow chart of a stroke rendering method provided in another embodiment of the present application;

[0020] Figure 6 A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0021] Figure 7 A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0022] Figure 8A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0023] Fig. 9A A schematic diagram of a stroke structure provided in another embodiment of the present application;

[0024] Fig. 9B A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0025] Fig.10 A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0026] Fig.11 A schematic diagram of an electronic drawing board provided in another embodiment of the present application;

[0027] Fig.12 A structural schematic diagram of a stroke rendering device provided in another embodiment of the present application;

[0028] Fig.13 A structural schematic diagram of a stroke rendering device provided in another embodiment of the present application;

[0029] Fig.14 A schematic diagram of the structure of a terminal is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0031] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0032] Figure 1 An exemplary system architecture diagram of a stroke rendering method provided in an embodiment of the present application.

[0033] like Figure 1 As shown, the system architecture may include a processor 101 and an electronic drawing board 102 disposed in a terminal 100 .

[0034] When the terminal 100 is hardware, it can be various electronic devices, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers, etc. When the terminal 100 is software, it can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or as a single software or software module, which is not specifically limited here.

[0035] The electronic drawing board 102 can be considered as a virtual screen visible to the user in the terminal 100. The user can interact with the electronic drawing board 102 by using a touch pen, finger touch or mouse to control a virtual brush. The electronic drawing board 102 can receive the user's operations on the electronic drawing board 102 and generate corresponding signals to send to the processor 101. The processor 101 controls the electronic drawing board 102 to display relevant content based on the signal, and implements operations such as painting on the electronic drawing board 102.

[0036] It should be understood that Figure 1 The number of terminals, processors and electronic drawing boards in the figure is only illustrative, and any number of terminals, processors and electronic drawing boards may be used according to implementation requirements.

[0037] See also Figure 2 , Figure 2 A system interaction diagram of a stroke rendering method provided in an embodiment of the present application. It can be understood that in the embodiment of the present application, the execution subject can be a terminal or a processor in the terminal, and can also be a related service for executing stroke rendering in the terminal. For the convenience of description, the following takes the execution subject as the processor in the terminal as an example. Figure 1 and Figure 2 This paper introduces the system interaction process in a stroke rendering method.

[0038] S201: The user performs an erase operation or an undo operation on the electronic drawing board.

[0039] S202: The processor determines an operation area and non-operation strokes in the operation area in the electronic drawing board based on an erase operation or an undo operation performed by the user in the electronic drawing board, wherein the area of ​​the operation area is smaller than the area of ​​the electronic drawing board.

[0040] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area in the electronic drawing board and the non-operation strokes in the operation area are determined, including: obtaining the first operation of the user in the electronic drawing board, where the first operation is a point erase operation; determining the overlapping parts of all original strokes in the electronic drawing board with the point erase strokes corresponding to the first operation, and determining the overlapping parts as intersecting strokes; determining the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0041] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area and non-operation strokes in the operation area in the electronic drawing board are determined, including: obtaining a second operation performed by the user in the electronic drawing board, where the second operation is a line erase operation; determining the overlapping parts of all original strokes in the electronic drawing board and the line erase strokes corresponding to the second operation, and determining the strokes corresponding to all original strokes in the electronic drawing board as intersecting strokes; determining the operation area and non-operation strokes in the operation area in the electronic drawing board according to the intersecting strokes.

[0042] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area in the electronic drawing board and the non-operation strokes in the operation area are determined, including: obtaining a third operation of the user in the electronic drawing board, where the third operation is an undo operation; determining the original strokes to be undone corresponding to all the original strokes in the electronic drawing board of the undo operation, and determining the original strokes to be undone as intersecting strokes; and determining the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0043] Optionally, determining the operation area and non-operation strokes in the operation area in the electronic drawing board based on the intersecting strokes includes: obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate; determining the first coordinate based on the first maximum value and the second maximum value, determining the second coordinate based on the first maximum value and the second minimum value, determining the third coordinate based on the first minimum value and the second maximum value, and determining the fourth coordinate based on the first minimum value and the second minimum value; determining the operation area based on the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0044] Optionally, determining the operating area and non-operating strokes in the operating area in the electronic drawing board according to the intersecting strokes further includes: determining original strokes in the operating area excluding the intersecting strokes, and determining the original strokes excluding the intersecting strokes as non-operating strokes.

[0045] Optionally, obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value of the vertical coordinate, includes: obtaining the stroke point coordinates of all stroke points in the intersecting strokes in the electronic drawing board, the stroke point coordinates including horizontal coordinate values ​​and vertical coordinate values; using the maximum value of the horizontal coordinate values ​​in the stroke point coordinates as the first maximum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and using the minimum value of the horizontal coordinate values ​​in the stroke point coordinates as the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board; using the maximum value of the vertical coordinate value in the stroke point coordinates as the second maximum value of the vertical coordinate in the electronic drawing board, and using the minimum value of the vertical coordinate value in the stroke point coordinates as the second minimum value of the vertical coordinate in the electronic drawing board.

[0046] Optionally, when all stroke points in the intersecting strokes include original stroke points and point-erased stroke points, all original stroke points and / or all point-erased stroke points in the intersecting strokes are taken as all stroke points in the intersecting strokes.

[0047] S203: The processor deletes all original strokes in the operation area, and re-renders non-operation strokes in the operation area.

[0048] In an embodiment of the present application, firstly, based on the user's erase operation or undo operation in the electronic drawing board, the operation area and the non-operation strokes in the operation area are determined, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; then all the original strokes in the operation area are deleted, and the non-operation strokes in the operation area are re-rendered. Since a smaller operation area and non-operation strokes can be determined in the electronic drawing board based on the user's operation, then only all the original strokes in the operation area can be deleted, and the non-operation strokes in the operation area can be re-rendered, without deleting all the strokes in the electronic drawing board, and without rendering all the non-operation strokes in the electronic drawing board, the time and power consumption in the erase operation or undo operation can be greatly reduced, and the refresh smoothness of the electronic drawing board can be improved.

[0049] See also Figure 3 , Figure 3 A flowchart of a stroke rendering method provided in another embodiment of the present application.

[0050] like Figure 3 As shown, the method includes:

[0051] S301. Based on an erase operation or undo operation performed by a user on the electronic drawing board, determine an operation area and non-operation strokes in the operation area on the electronic drawing board, wherein the area of ​​the operation area is smaller than the area of ​​the electronic drawing board.

[0052] It can be understood that the stroke rendering method provided in the embodiment of the present application is mainly used in electronic drawing boards or drawing software with electronic drawing boards, wherein the electronic drawing board can be considered as a physical device or a virtual device, and the electronic drawing board is mainly used to receive various operations input by the user and display the content corresponding to the various operations.

[0053] See also Figure 4 , Figure 4 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Figure 4As shown, there may be a drawing software 410 in the terminal 400. The user 460 may enter the electronic drawing board 420 in the drawing software 410 by clicking the drawing software 410. The drawing software 410 may include at least a writing option 430, an erasing option 440, and an undo option 450. After the user 460 clicks the writing option 430 with a finger, a writing pen, or other external device, the electronic drawing board 420 is touched and a trajectory of a corresponding shape is formed in the electronic drawing board 420. This trajectory may be considered as a stroke 470. Various strokes 470 may constitute a picture or text.

[0054] After the user draws at least one stroke on the electronic drawing board, he may need to erase part of one or more strokes, or may need to completely erase one or more strokes, or may need to undo one or more complete strokes. In this case, the user needs to perform an erase or undo operation on the electronic drawing board. The specific way for the user to perform an erase or undo operation on the electronic drawing board may be that the user clicks the erase option or undo option in the drawing software and then performs an erase or undo operation on a specific location on the electronic drawing board; the user may also perform an erase or undo operation through voice commands or command line commands.

[0055] In the related art, writing, erasing and undoing are basic functions in electronic drawing boards or drawing software. In erasing and undoing scenarios, it is usually necessary to calculate the remaining part of the stroke after being erased or undone, and redraw the remaining part to ensure the consistency of the effect. However, redrawing all the remaining parts has technical problems such as long time consumption, high power consumption and unsmooth refresh.

[0056] In order to solve the above technical problems, in an embodiment of the present application, after obtaining the user's erase operation or undo operation in the electronic drawing board, the operation area in the electronic drawing board can be determined based on the user's erase operation or undo operation in the electronic drawing board, where the operation area is the area in the electronic drawing board corresponding to the strokes that need to be erased or undone. When the user does not erase or undo all the strokes in the electronic drawing board, the area of ​​the operation area must be smaller than the area of ​​the electronic drawing board.

[0057] Furthermore, after determining the operating area in the electronic drawing board, non-operating strokes in the operating area can also be determined. Non-operating strokes refer to the strokes remaining in the operating area after removing the strokes that need to be erased or undone, that is, non-operating strokes refer to the strokes in the operating area that do not need to be erased or undone.

[0058] S302: Delete all original strokes in the operation area, and re-render non-operation strokes in the operation area.

[0059] It can be understood that since the operation area is the area in the electronic drawing board where strokes need to be erased or undone, the area outside the operation area in the electronic drawing board does not need to erase or undone strokes, so only the strokes within the operation area can be erased or undone.

[0060] Furthermore, if an erase or undo operation is performed on one or more strokes within the direct operation area, the effects of the remaining strokes within the operation area will change after the erase or undo operation is performed.

[0061] Therefore, in order to avoid this problem in an embodiment of the present application, when erasing or undoing the strokes within the operation area, all the original strokes in the operation area can be deleted first, where the original strokes are normal strokes drawn by the user before the erasing or undoing operation is performed. Then, this operation deletes the strokes in the operation area that need to be erased or undone, and also deletes the strokes in the operation area that do not need to be erased or undone. Then, it is necessary to re-render the non-operation strokes in the operation area, that is, re-render (draw) the strokes in the operation area that do not need to be erased or undone, so as to restore the display effect of the strokes in the operation area that do not need to be erased or undone.

[0062] Based on the above-mentioned stroke rendering method, in the erasing or undoing scenario, since there is no need to delete all the strokes in the electronic drawing board, nor is there any need to render all the non-operation strokes in the electronic drawing board, the time and power consumption in the erasing or undoing operation can be greatly reduced. Then the user can complete an erasing or undoing operation in a shorter time, reducing the user's waiting time and improving the user experience; in addition, in the erasing operation, the erasing efficiency can be improved, ensuring that the position of the erasing rendering is transplanted closely follows the finger, reducing the delay, improving the user experience, and can reduce the dependence on GPU resources offline, and the stroke rendering method in this application can be applied on more models of devices, that is, it can be widely used in applications such as pen shape simulation.

[0063] In an embodiment of the present application, firstly, based on the user's erase operation or undo operation in the electronic drawing board, the operation area and the non-operation strokes in the operation area are determined, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; then all the original strokes in the operation area are deleted, and the non-operation strokes in the operation area are re-rendered. Since a smaller operation area and non-operation strokes can be determined in the electronic drawing board based on the user's operation, then only all the original strokes in the operation area can be deleted, and the non-operation strokes in the operation area can be re-rendered, without deleting all the strokes in the electronic drawing board, and without rendering all the non-operation strokes in the electronic drawing board, the time and power consumption in the erase operation or undo operation can be greatly reduced, and the refresh smoothness of the electronic drawing board can be improved.

[0064] See also Figure 5 , Figure 5 A flowchart of a stroke rendering method provided in another embodiment of the present application.

[0065] like Figure 5 As shown, the method includes:

[0066] S501: Acquire a first operation of a user in the electronic drawing board, where the first operation is a point erase operation.

[0067] It can be understood that in the embodiment of the present application, the erasing operation may include a point erasing operation and a line erasing operation, so the corresponding implementation processes of the point erasing operation and the line erasing operation are introduced separately in the embodiment of the present application.

[0068] Before the user performs an erasing operation on the electronic drawing board, the strokes drawn normally by the user, that is, the original strokes, already exist in the electronic drawing board. In actual scenarios, sometimes the user does not want to directly delete the entire original stroke, but only wants to delete part of the strokes in the entire original stroke, that is, the user needs to perform a point-erasing operation. At this time, the user can draw a point-erasing stroke on the electronic drawing board for the original stroke that he wants to erase. The point-erasing stroke can be considered to be continuous, so that the part that needs to be erased in the original stroke can be determined according to the contact position between the point-erasing stroke and the original stroke, that is, the user inputs the first operation, that is, the point-erasing operation, for the original stroke in the electronic drawing board.

[0069] S502: Determine the overlapped parts of all original strokes in the electronic drawing board and the point-erased strokes corresponding to the first operation, and determine the overlapped parts as intersecting strokes.

[0070] Because when the user inputs the first operation, that is, the point operation, it means that the user does not want to directly delete the entire original stroke, but only wants to delete part of the strokes in the entire original stroke. Therefore, it is possible to obtain the part of all the original strokes in the electronic drawing board that overlaps with the point-erased stroke corresponding to the first operation, where the size of the overlapping part is determined by the width of the original stroke, the width of the point-erased stroke, and the relative position between the original stroke and the point-erased stroke.

[0071] When performing a point erasing operation, the user can determine the overlapped portion of the point erasing stroke and the original stroke by controlling the trajectory of the point erasing stroke. Therefore, the overlapped portion can be considered as the portion that the user wants to erase, and the overlapped portion can be determined as an intersecting stroke.

[0072] S503: Determine an operation area in the electronic drawing board and non-operation strokes in the operation area according to the intersecting strokes.

[0073] It can be understood that the area of ​​the overlapping part of the erased stroke and the original stroke, that is, the area of ​​the intersecting stroke, is smaller than the total area of ​​all the original strokes in the electronic drawing board. Therefore, in order not to erase all the original strokes, we can first determine an approximate operating area of ​​the intersecting strokes in the electronic drawing board based on some attribute information of the intersecting strokes. The area of ​​the operating area is smaller than the area of ​​the electronic drawing board, and the operating area at least includes the intersecting strokes that need to be erased.

[0074] Furthermore, since the operation area is an approximate area including intersecting strokes, the operation area may also include other original strokes that do not require point erasing operations. Therefore, it is also necessary to determine the original strokes that do not require point erasing operations in the operation area, that is, non-operation strokes.

[0075] See also Figure 6 , Figure 6 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Figure 6 As shown, there may be a drawing software 610 in the terminal 600. The user clicks the drawing software 610 to enter the electronic drawing board 620 in the drawing software 610. The drawing software 610 may include at least a writing option 630, a point erase option 6401, a line erase option 6402, and an undo option 650. After the user 660 clicks the writing option 630 with a finger, a writing pen, or other external device, the electronic drawing board 620 is touched and a trajectory of a corresponding shape is formed in the electronic drawing board 620. This trajectory can be considered as an original stroke 670. Various original strokes 670 can form a picture or text.

[0076] When the user 660 wants to perform a point erase operation, he can click the point erase option 6401 with his finger, writing pen or other external device, and then draw a point erase stroke 680 on the electronic drawing board 620 with his finger, writing pen or other external device. The processor in the terminal can obtain the above-mentioned first operation, i.e., the point erase operation, input by the user 660 for the original stroke 670 in the electronic drawing board 620 through the electronic drawing board 620.

[0077] After determining the point erasing operation, the overlapping parts of all original strokes 670 in the electronic drawing board 620 and the point erasing strokes 680 corresponding to the first operation can be determined, and the overlapping parts can be determined as intersecting strokes 690. The operating area 6100 in the electronic drawing board 620 and the non-operating strokes 6110 in the operating area 6100 can also be determined based on the intersecting strokes 690.

[0078] S504: Acquire a second operation of the user in the electronic drawing board, where the second operation is a line erasing operation.

[0079] Before the user performs an erasing operation on the electronic drawing board, the strokes drawn normally by the user, that is, the original strokes, already exist in the electronic drawing board. In actual scenarios, sometimes the user wants to directly delete the entire original stroke, that is, the user needs to perform a line erasing operation. At this time, the user can draw a line erasing stroke on the electronic drawing board for the original stroke that the user wants to erase. The line erasing stroke can be considered to be continuous, so that the stroke to be erased can be determined based on the original stroke contacted by the line erasing stroke, that is, the user inputs the second operation, that is, the line erasing operation, for the original strokes in the electronic drawing board.

[0080] S505: Determine the overlapped parts of all original strokes in the electronic drawing board and the line-erased strokes corresponding to the second operation, and determine the strokes corresponding to all original strokes in the electronic drawing board in the overlapped parts as intersecting strokes.

[0081] Since when the user inputs the second operation, namely the line erasing operation, it means that the user wants to directly delete the entire original stroke, it is possible to obtain the parts of all the original strokes in the electronic drawing board that overlap with the line erasing strokes corresponding to the second operation, where the size of the overlapping parts is determined by the width of the original strokes, the width of the line erasing strokes, and the relative position between the original strokes and the line erasing strokes.

[0082] When performing a line erasing operation, the user can determine the overlapping part of the line erasing stroke and the original stroke by controlling the trajectory of the line erasing stroke. Therefore, the strokes corresponding to all the original strokes in the electronic drawing board of the overlapping part can be considered as the original strokes that the user wants to erase. In this way, the strokes corresponding to all the original strokes in the electronic drawing board of the overlapping part can be determined as intersecting strokes.

[0083] S506: Determine the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0084] It can be understood that the overlapping part of the original stroke and the line-erased stroke, that is, the area of ​​the intersecting stroke, is smaller than the total area of ​​all the original strokes in the electronic drawing board. Therefore, in order not to erase all the original strokes, we can first determine an approximate operating area of ​​the intersecting strokes in the electronic drawing board based on some attribute information of the intersecting strokes. The area of ​​the operating area is smaller than the area of ​​the electronic drawing board, and the operating area at least includes the intersecting strokes that need to be line-erased.

[0085] Furthermore, since the operation area is an approximate area including intersecting strokes, the operation area may also include other original strokes that do not require point and line erasing operations. Therefore, it is also necessary to determine the original strokes in the operation area that do not require line erasing operations, that is, non-operation strokes.

[0086] See also Figure 7 , Figure 7 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Figure 7 As shown, there may be a drawing software 710 in the terminal 700. The user clicks the drawing software 710 to enter the electronic drawing board 720 in the drawing software 710. The drawing software 710 may include at least a writing option 730, a point erase option 7401, a line erase option 7402, and an undo option 750. After the user 760 clicks the writing option 730 with a finger, a writing pen, or other external device, the electronic drawing board 720 is touched and a trajectory of a corresponding shape is formed in the electronic drawing board 720. This trajectory can be considered as an original stroke 770. Various original strokes 770 can form a picture or text.

[0087] When user 760 wants to perform a line erasing operation, he can click on the line erasing option 7402 with his finger, a writing pen or other external device, and then draw a line erasing stroke 780 on the electronic drawing board 720 with his finger, a writing pen or other external device. The processor in the terminal can obtain the above-mentioned second operation, i.e., the line erasing operation, input by user 760 for the original stroke 770 in the electronic drawing board 720 through the electronic drawing board 720.

[0088] After determining the line erasing operation, the overlapping parts of all the original strokes 770 in the electronic drawing board 720 and the line erasing strokes 780 corresponding to the second operation can be determined, and the strokes corresponding to all the original strokes 770 in the electronic drawing board 720 of the overlapping parts can be determined as intersecting strokes 790. The operating area 7100 in the electronic drawing board 720 and the non-operating strokes 7110 in the operating area 7100 can also be determined based on the intersecting strokes 790.

[0089] S507: Acquire a third operation of the user in the electronic drawing board, where the third operation is a cancel operation.

[0090] In an embodiment of the present application, in addition to being able to perform an erase operation on the original strokes, an undo operation can also be performed on the original strokes. Before the user is performing an undo operation in the electronic drawing board, the strokes normally drawn by the user, that is, the original strokes, already exist in the electronic drawing board. In actual scenarios, sometimes the user wants to directly undo the strokes drawn in the previous step, that is, the user needs to perform an undo operation. At this time, the user can enter an undo instruction in the electronic drawing board for the original strokes to be undone. The undo instruction may include the specific original strokes to be undone, so that the strokes to be undone can be determined according to the undo instruction, that is, the user has entered the third operation, that is, the undo operation, for the original strokes in the electronic drawing board.

[0091] S508: Determine the original strokes to be undone corresponding to all the original strokes in the electronic drawing board during the undo operation, and determine the original strokes to be undone as intersecting strokes.

[0092] Since when the user inputs the third operation, namely the undo operation, it means that the user wants to undo the original strokes drawn before, it is possible to determine which one or more original strokes need to be undone based on the original stroke information carried in the undo instruction corresponding to the third operation. These original strokes can be considered as original strokes to be undone, and these original strokes to be undone can also be determined as intersecting strokes.

[0093] S509: Determine the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0094] It can be understood that as long as not all the original strokes in the electronic drawing board are undone, the area of ​​the intersecting strokes, that is, the original strokes to be undone, is smaller than the total area of ​​all the original strokes in the electronic drawing board. In order not to erase all the original strokes, an approximate operating area of ​​the intersecting strokes in the electronic drawing board can be determined based on some attribute information of the intersecting strokes, that is, the original strokes to be undone. The area of ​​the operating area is smaller than the area of ​​the electronic drawing board, and the operating area at least includes the intersecting strokes that need to be undone.

[0095] Furthermore, since the operation area is an approximate area including intersecting strokes, the operation area may also include other original strokes that do not require point erasing operations. Therefore, it is also necessary to determine the original strokes in the operation area that do not require line erasing operations, that is, non-operation strokes.

[0096] See also Figure 8 , Figure 8 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Figure 8As shown, there may be a drawing software 810 in the terminal 800. The user clicks the drawing software 810 to enter the electronic drawing board 820 in the drawing software 810. The drawing software 810 may include at least a writing option 830, a point erase option 8401, a line erase option 8402, and an undo option 850. After the user 860 clicks the writing option 830 with a finger, a writing pen, or other external device, the electronic drawing board 820 is touched and a corresponding shape track is formed in the electronic drawing board 820. This track can be considered as an original stroke 870. Various original strokes 870 can form a picture or text.

[0097] When the user 860 wants to perform an undo operation, he can click the predicted number of times of the undo option 850 through his finger, writing pen or other external device, which means that one or more original strokes 870 need to be undone. For example, clicking the undo option 850 once means that the original strokes 870 in the previous step need to be undone; clicking the undo option 850 twice means that the original strokes 870 in the previous two steps need to be undone, and so on. In addition, after clicking the undo option 850 through his finger, writing pen or other external device, he can directly select the original strokes 870 to be undone, and the processor in the terminal can obtain the above-mentioned third operation, i.e., the undo operation, input by the user 860 for the original strokes 870 in the electronic drawing board 820 through the electronic drawing board 820.

[0098] After determining the undo operation, the original strokes to be undone corresponding to all the original strokes in the electronic drawing board 820 of the undo operation can be determined, and the original strokes to be undone can be determined as the intersecting strokes 890. The operation area 8100 in the electronic drawing board 820 and the non-operation strokes 8110 in the operation area 8100 can also be determined based on the intersecting strokes 890.

[0099] Furthermore, in the above steps, it is necessary to determine the operating area and non-operating strokes in the operating area in the electronic drawing board based on the intersecting strokes. Then a feasible implementation method is: in the first step, a coordinate system is established in the electronic drawing board, and the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate are obtained.

[0100] See also Fig. 9A , Fig. 9A This is a schematic diagram of a stroke structure provided by another embodiment of the present application. Fig. 9AAs shown, there may be a drawing software 910 in the terminal 900, and the drawing software 910 includes an electronic drawing board 920, wherein all strokes in the electronic drawing board 920 are composed of stroke points, that is, all original strokes 970 are composed of at least one original stroke point 9701, point-erased strokes are composed of at least one point-erased stroke point, and line-erased strokes are composed of at least one line-erased stroke point.

[0101] Then, a feasible implementation method for obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate includes: firstly obtaining the stroke point coordinates of all the stroke points in the intersecting strokes in the electronic drawing board, the stroke point coordinates include the horizontal coordinate value and the vertical coordinate value, wherein, since the intersecting strokes may be the intersecting strokes corresponding to the point erasing operation, the intersecting strokes may be the intersecting strokes corresponding to the line erasing operation, and the intersecting strokes may be the intersecting strokes corresponding to the undo operation, therefore, when the intersecting strokes are point erased, When the intersecting strokes correspond to the intersecting strokes in the deletion operation, all the stroke points in the intersecting strokes include the original stroke points and the point-erased stroke points, and all the original stroke points and / or all the point-erased stroke points in the intersecting strokes can be used as all the stroke points in the intersecting strokes; when the intersecting strokes are the intersecting strokes corresponding to the line erasing operation or the intersecting strokes corresponding to the undo operation, the intersecting strokes are the completed original strokes, so all the stroke points in the intersecting strokes can only include the original stroke points, and all the original stroke points in the intersecting strokes can be used as all the stroke points in the intersecting strokes.

[0102] Then the maximum value of the horizontal coordinate value in the stroke point coordinates is used as the first maximum value of the horizontal coordinate of the intersecting stroke on the electronic drawing board, and the minimum value of the horizontal coordinate value in the stroke point coordinates is used as the first minimum value of the horizontal coordinate of the intersecting stroke on the electronic drawing board; and the maximum value of the vertical coordinate value in the stroke point coordinates is used as the second maximum value of the vertical coordinate of the intersecting stroke on the electronic drawing board, and the minimum value of the vertical coordinate value in the stroke point coordinates is used as the second minimum value of the vertical coordinate of the intersecting stroke on the electronic drawing board.

[0103] In the second step, the first coordinate is determined according to the first maximum value and the second maximum value, that is, the first maximum value is used as the horizontal coordinate of the first coordinate, and the second maximum value is used as the vertical coordinate of the first coordinate; the second coordinate is determined according to the first maximum value and the second minimum value, that is, the first maximum value is used as the horizontal coordinate of the second coordinate, and the second minimum value is used as the vertical coordinate of the second coordinate; the third coordinate is determined according to the first minimum value and the second maximum value, that is, the first minimum value is used as the horizontal coordinate of the third coordinate, and the second maximum value is used as the vertical coordinate of the third coordinate; the fourth coordinate is determined according to the first minimum value and the second minimum value, that is, the first minimum value is used as the horizontal coordinate of the fourth coordinate, and the second minimum value is used as the vertical coordinate of the fourth coordinate; finally, a rectangular area is determined according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate, and the rectangular area is used as the operation area.

[0104] After determining the operation area in the electronic drawing board according to the intersecting strokes, the original strokes in the operation area excluding the intersecting strokes may be determined, and the original strokes excluding the intersecting strokes may be determined as non-operation strokes.

[0105] S510: Delete all original strokes in the operation area, and re-render non-operation strokes in the operation area.

[0106] It can be understood that since the operation area is the area in the electronic drawing board where strokes need to be erased or undone, the area outside the operation area in the electronic drawing board does not need to erase or undone strokes, so only the strokes within the operation area can be erased or undone.

[0107] Furthermore, if an erase or undo operation is performed on one or more strokes within the direct operation area, the effects of the remaining strokes within the operation area will change after the erase or undo operation is performed.

[0108] Therefore, in order to avoid this problem in an embodiment of the present application, when erasing or undoing the strokes within the operation area, all the original strokes in the operation area can be deleted first, where the original strokes are normal strokes drawn by the user before the erasing or undoing operation is performed. Then, this operation deletes the strokes in the operation area that need to be erased or undone, and also deletes the strokes in the operation area that do not need to be erased or undone. Then, it is necessary to re-render the non-operation strokes in the operation area, that is, re-render (draw) the strokes in the operation area that do not need to be erased or undone, so as to restore the display effect of the strokes in the operation area that do not need to be erased or undone.

[0109] See also Fig. 9B , Fig. 9BThis is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Fig. 9B As shown, there may be a drawing software in the terminal 900, and the user may enter the electronic drawing board 920 in the drawing software by clicking on the drawing software. After determining the user's first operation, that is, the point erase operation, the overlapping parts of all original strokes 970 in the electronic drawing board 920 and the point erase strokes 980 corresponding to the first operation may be determined, and the overlapping parts may be determined as intersecting strokes 990. The operating area 9100 in the electronic drawing board 920 and the non-operating strokes 9110 in the operating area 9100 may also be determined based on the intersecting strokes 990. Finally, all original strokes 970 in the operating area 9100 may be deleted, and the non-operating strokes 9110 in the operating area 9100 may be re-rendered.

[0110] See also Fig.10 , Fig.10 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Fig.10 As shown, there may be a drawing software in the terminal 1000, and the user can enter the electronic drawing board 1020 in the drawing software by clicking on the drawing software. After determining the line erasing operation, the overlapped parts of all original strokes 1070 in the electronic drawing board 1020 and the line erasing strokes corresponding to the second operation can be determined, and the strokes corresponding to all original strokes 1070 in the electronic drawing board 1020 of the overlapping parts are determined as intersecting strokes 1090. The operating area 10100 in the electronic drawing board 1020 and the non-operating strokes 10110 in the operating area 10100 can also be determined according to the intersecting strokes 1090. Finally, all original strokes 1070 in the operating area 10100 can be deleted, and the non-operating strokes 10110 in the operating area 10100 can be re-rendered.

[0111] See also Fig.11 , Fig.11 This is a schematic diagram of an electronic drawing board provided by another embodiment of the present application. Fig.11 As shown, there may be a drawing software in the terminal 1100. The user can enter the electronic drawing board 1120 in the drawing software by clicking on the drawing software. After determining the undo operation, the original strokes to be undone corresponding to all the original strokes 1170 in the electronic drawing board 1120 of the undo operation can be determined, and the original strokes to be undone can be determined as the intersecting strokes 1190. The operating area 11100 in the electronic drawing board 1120 and the non-operating strokes 11110 in the operating area 11100 can also be determined based on the intersecting strokes 1190. Finally, all the original strokes 1070 in the operating area 11100 can be deleted, and the non-operating strokes 11110 in the operating area 11100 can be re-rendered.

[0112] Based on the above-mentioned stroke rendering method, in the erasing or undoing scenario, since there is no need to delete all the strokes in the electronic drawing board, nor is there any need to render all the non-operation strokes in the electronic drawing board, the time and power consumption in the erasing or undoing operation can be greatly reduced. Then the user can complete an erasing or undoing operation in a shorter time, reducing the user's waiting time and improving the user experience; in addition, in the erasing operation, the erasing efficiency can be improved, ensuring that the position of the erasing rendering is transplanted closely follows the finger, reducing the delay, improving the user experience, and can reduce the dependence on GPU resources offline, and the stroke rendering method in this application can be applied on more models of devices, that is, it can be widely used in applications such as pen shape simulation.

[0113] See also Fig.12 , Fig.12 A structural schematic diagram of a stroke rendering device provided in another embodiment of the present application.

[0114] like Fig.12 As shown, the stroke rendering device 1200 includes:

[0115] The rendering determination module 1210 is used to determine the operation area and non-operation strokes in the operation area in the electronic drawing board based on the user's erase operation or undo operation in the electronic drawing board, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board.

[0116] The rendering implementation module 1220 is used to delete all original strokes in the operation area and re-render non-operation strokes in the operation area.

[0117] See also Fig.13 , Fig.13 A structural schematic diagram of a stroke rendering device provided in another embodiment of the present application.

[0118] like Fig.13 As shown, the stroke rendering device 1300 includes:

[0119] The first operation acquisition module 1310 is used to acquire the first operation of the user in the electronic drawing board, where the first operation is a point erase operation.

[0120] The first intersecting stroke determining module 1320 is used to determine the overlapped parts of all original strokes in the electronic drawing board and the point-erased strokes corresponding to the first operation, and determine the overlapped parts as intersecting strokes.

[0121] The first area determination module 1330 is used to determine the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0122] The second operation acquisition module 1340 is used to acquire the second operation of the user in the electronic drawing board, where the second operation is a line erasing operation.

[0123] The second intersecting stroke determining module 1350 is used to determine the overlapped parts of all original strokes in the electronic drawing board and the line erasing strokes corresponding to the second operation, and determine the strokes corresponding to all original strokes in the electronic drawing board as intersecting strokes.

[0124] The second area determination module 1360 is used to determine the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0125] The third operation acquisition module 1370 is used to acquire the third operation of the user in the electronic drawing board, where the third operation is a cancel operation.

[0126] The third intersecting stroke determining module 1380 is used to determine the original strokes to be undone corresponding to all the original strokes in the electronic drawing board in the undo operation, and determine the original strokes to be undone as intersecting strokes.

[0127] The third area determination module 1390 is used to determine the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0128] Among them, the first area determination module 1330, the second area determination module 1360 and the third area determination module 1390 are also used to obtain the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate; determine the first coordinate according to the first maximum value and the second maximum value, determine the second coordinate according to the first maximum value and the second minimum value, determine the third coordinate according to the first minimum value and the second maximum value, and determine the fourth coordinate according to the first minimum value and the second minimum value; determine the operation area according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0129] The first area determination module 1330, the second area determination module 1360 and the third area determination module 1390 are further used to determine the original strokes except the intersecting strokes in the operation area, and determine the original strokes except the intersecting strokes as non-operation strokes.

[0130] Among them, obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate, includes: obtaining the stroke point coordinates of all stroke points in the intersecting strokes in the electronic drawing board, the stroke point coordinates including horizontal coordinate values ​​and vertical coordinate values; using the maximum value of the horizontal coordinate values ​​in the stroke point coordinates as the first maximum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and using the minimum value of the horizontal coordinate values ​​in the stroke point coordinates as the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board; using the maximum value of the vertical coordinate value in the stroke point coordinates as the second maximum value of the vertical coordinate in the electronic drawing board, and using the minimum value of the vertical coordinate value in the stroke point coordinates as the second minimum value of the vertical coordinate in the electronic drawing board.

[0131] Further, when all stroke points in the intersecting strokes include original stroke points and point-erased stroke points, all original stroke points and / or all point-erased stroke points in the intersecting strokes are taken as all stroke points in the intersecting strokes.

[0132] The rendering implementation module 13100 is used to delete all original strokes in the operation area and re-render non-operation strokes in the operation area.

[0133] Based on the above-mentioned stroke rendering device, in the erasing or undoing scenario, since there is no need to delete all the strokes in the electronic drawing board, nor is there any need to render all the non-operation strokes in the electronic drawing board, the time and power consumption in the erasing or undoing operation can be greatly reduced. Then the user can complete an erasing or undoing operation in a shorter time, reducing the user's waiting time and improving the user experience; in addition, in the erasing operation, the erasing efficiency can be improved, ensuring that the position of the erasing rendering is transplanted closely follows the finger, reducing the delay, improving the user experience, and can reduce the dependence on GPU resources offline, and the stroke rendering device in this application can be applied on more models of devices, that is, it can be widely used in applications such as pen shape simulation.

[0134] In an embodiment of the present application, a stroke rendering device includes: a rendering determination module, which is used to determine the operation area and non-operation strokes in the operation area of ​​the electronic drawing board based on the user's erase operation or undo operation in the electronic drawing board, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; a rendering implementation module, which is used to delete all original strokes in the operation area and re-render the non-operation strokes in the operation area. Since a smaller operation area and non-operation strokes can be determined in the electronic drawing board based on the user's operation, and then only all original strokes in the operation area can be deleted, and non-operation strokes can be re-rendered in the operation area, without deleting all strokes in the electronic drawing board or rendering all non-operation strokes in the electronic drawing board, the time and power consumption in the erase operation or undo operation can be greatly reduced, and the refresh smoothness of the electronic drawing board can be improved.

[0135] An embodiment of the present application further provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.

[0136] For further information, see Fig.14 , Fig.14 A schematic diagram of the structure of a terminal is provided for an embodiment of the present application. Fig.14 As shown, the terminal 1400 may include: at least one central processor 1401 , at least one network interface 1404 , a user interface 1403 , a memory 1405 , and at least one communication bus 1402 .

[0137] The communication bus 1402 is used to realize the connection and communication between these components.

[0138] The user interface 1403 may include a display screen (Display) and a camera (Camera), and the optional user interface 1403 may also include a standard wired interface and a wireless interface.

[0139] The network interface 1404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0140] Among them, the central processing unit 1401 may include one or more processing cores. The central processing unit 1401 uses various interfaces and lines to connect various parts within the entire terminal 1400, and executes various functions and processes data of the terminal 1400 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1405, and calling data stored in the memory 1405. Optionally, the central processing unit 1401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The central processing unit 1401 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics central processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the central processing unit 1401, and can be implemented separately through a chip.

[0141] Among them, the memory 1405 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1405 includes a non-transitory computer-readable storage medium. The memory 1405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1405 may also be optionally at least one storage device located away from the aforementioned central processor 1401. As Fig.14 As shown, the memory 1405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a stroke rendering program.

[0142] exist Fig.14In the terminal 1400 shown, the user interface 1403 is mainly used to provide an input interface for the user and obtain the data input by the user; and the central processor 1401 can be used to call the stroke rendering program stored in the memory 1405 and specifically perform the following operations:

[0143] Based on the user's erase operation or undo operation in the electronic drawing board, the operation area in the electronic drawing board and the non-operation strokes in the operation area are determined, and the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; all original strokes in the operation area are deleted, and the non-operation strokes are re-rendered in the operation area.

[0144] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area in the electronic drawing board and the non-operation strokes in the operation area are determined, including: obtaining the first operation of the user in the electronic drawing board, where the first operation is a point erase operation; determining the overlapping parts of all original strokes in the electronic drawing board with the point erase strokes corresponding to the first operation, and determining the overlapping parts as intersecting strokes; determining the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0145] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area and non-operation strokes in the operation area in the electronic drawing board are determined, including: obtaining a second operation performed by the user in the electronic drawing board, where the second operation is a line erase operation; determining the overlapping parts of all original strokes in the electronic drawing board and the line erase strokes corresponding to the second operation, and determining the strokes corresponding to all original strokes in the electronic drawing board as intersecting strokes; determining the operation area and non-operation strokes in the operation area in the electronic drawing board according to the intersecting strokes.

[0146] Optionally, based on the erase operation or undo operation performed by the user in the electronic drawing board, the operation area in the electronic drawing board and the non-operation strokes in the operation area are determined, including: obtaining a third operation of the user in the electronic drawing board, where the third operation is an undo operation; determining the original strokes to be undone corresponding to all the original strokes in the electronic drawing board of the undo operation, and determining the original strokes to be undone as intersecting strokes; and determining the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes.

[0147] Optionally, determining the operation area and non-operation strokes in the operation area in the electronic drawing board based on the intersecting strokes includes: obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value on the vertical coordinate; determining the first coordinate based on the first maximum value and the second maximum value, determining the second coordinate based on the first maximum value and the second minimum value, determining the third coordinate based on the first minimum value and the second maximum value, and determining the fourth coordinate based on the first minimum value and the second minimum value; determining the operation area based on the first coordinate, the second coordinate, the third coordinate and the fourth coordinate.

[0148] Optionally, determining the operating area and non-operating strokes in the operating area in the electronic drawing board according to the intersecting strokes further includes: determining original strokes in the operating area excluding the intersecting strokes, and determining the original strokes excluding the intersecting strokes as non-operating strokes.

[0149] Optionally, obtaining the first maximum value and the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and the second maximum value and the second minimum value of the vertical coordinate, includes: obtaining the stroke point coordinates of all stroke points in the intersecting strokes in the electronic drawing board, the stroke point coordinates including horizontal coordinate values ​​and vertical coordinate values; using the maximum value of the horizontal coordinate values ​​in the stroke point coordinates as the first maximum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board, and using the minimum value of the horizontal coordinate values ​​in the stroke point coordinates as the first minimum value of the intersecting strokes on the horizontal coordinate in the electronic drawing board; using the maximum value of the vertical coordinate value in the stroke point coordinates as the second maximum value of the vertical coordinate in the electronic drawing board, and using the minimum value of the vertical coordinate value in the stroke point coordinates as the second minimum value of the vertical coordinate in the electronic drawing board.

[0150] Optionally, when all stroke points in the intersecting strokes include original stroke points and point-erased stroke points, all original stroke points and / or all point-erased stroke points in the intersecting strokes are taken as all stroke points in the intersecting strokes.

[0151] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0152] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0154] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0155] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0157] The above is a description of a stroke rendering method, device, storage medium and terminal provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A stroke rendering method, characterized in that: The method comprises: Based on an erase operation or an undo operation performed by a user on the electronic drawing board, determining an operation area in the electronic drawing board and non-operation strokes in the operation area, wherein an area of ​​the operation area is smaller than an area of ​​the electronic drawing board; Deleting all original strokes in the operation area, and re-rendering the non-operation strokes in the operation area to delete intersecting strokes; The determining of the operation area in the electronic drawing board and the non-operation strokes in the operation area based on the erasing operation or undo operation of the user in the electronic drawing board includes: Acquire a second operation of the user in the electronic drawing board, where the second operation is a line erasing operation; Determine the overlapped parts of all original strokes in the electronic drawing board and the line erasing strokes corresponding to the second operation, and determine the strokes corresponding to all original strokes in the electronic drawing board in the overlapped parts as the intersecting strokes; Determine an operation area in the electronic drawing board and non-operation strokes in the operation area according to the intersecting strokes; The step of determining the operation area in the electronic drawing board according to the intersecting strokes includes: Obtaining a first maximum value and a first minimum value of the intersecting strokes on the electronic drawing board on the horizontal coordinate, and a second maximum value and a second minimum value on the vertical coordinate; Determine a first coordinate according to the first maximum value and the second maximum value, determine a second coordinate according to the first maximum value and the second minimum value, determine a third coordinate according to the first minimum value and the second maximum value, and determine a fourth coordinate according to the first minimum value and the second minimum value; The operation area is determined according to the first coordinate, the second coordinate, the third coordinate, and the fourth coordinate.

2. The method according to claim 1, characterized in that The determining of the operation area in the electronic drawing board and the non-operation strokes in the operation area based on the erasing operation or undo operation of the user in the electronic drawing board includes: Acquire a first operation of a user in the electronic drawing board, where the first operation is a point erase operation; Determine the overlapped parts of all original strokes in the electronic drawing board and the point-erased strokes corresponding to the first operation, and determine the overlapped parts as intersecting strokes; An operation area in the electronic drawing board and non-operation strokes in the operation area are determined according to the intersecting strokes.

3. The method according to claim 1, characterized in that: The determining of the operation area in the electronic drawing board and the non-operation strokes in the operation area based on the erasing operation or undo operation of the user in the electronic drawing board includes: Acquire a third operation of the user in the electronic drawing board, where the third operation is a cancel operation; Determine the original strokes to be undone corresponding to all the original strokes in the electronic drawing board in the undo operation, and determine the original strokes to be undone as intersecting strokes; An operation area in the electronic drawing board and non-operation strokes in the operation area are determined according to the intersecting strokes.

4. The method according to claim 3, characterized in that The step of determining the operation area in the electronic drawing board and the non-operation strokes in the operation area according to the intersecting strokes further includes: The original strokes in the operation area except the intersecting strokes are determined, and the original strokes except the intersecting strokes are determined as non-operation strokes.

5. The method according to claim 1, characterized in that The step of obtaining a first maximum value and a first minimum value of the intersecting strokes on the electronic drawing board on the horizontal coordinate, and a second maximum value and a second minimum value of the intersecting strokes on the vertical coordinate, comprises: Acquire the stroke point coordinates of all the stroke points in the intersecting strokes in the electronic drawing board, wherein the stroke point coordinates include a horizontal coordinate value and a vertical coordinate value; Taking the maximum value of the horizontal coordinate value in the stroke point coordinates as the first maximum value of the horizontal coordinate of the intersecting strokes on the electronic drawing board, and taking the minimum value of the horizontal coordinate value in the stroke point coordinates as the first minimum value of the horizontal coordinate of the intersecting strokes on the electronic drawing board; The maximum value of the vertical coordinate value in the stroke point coordinates is used as the second maximum value of the vertical coordinate of the intersecting stroke in the electronic drawing board, and the minimum value of the vertical coordinate value in the stroke point coordinates is used as the second minimum value of the vertical coordinate of the intersecting stroke in the electronic drawing board.

6. The method according to claim 2, characterized in that When all the stroke points in the intersecting strokes include original stroke points and point-erased stroke points, all the original stroke points and / or all the point-erased stroke points in the intersecting strokes are used as all the stroke points in the intersecting strokes.

7. A stroke rendering device, characterized in that: The device comprises: A rendering determination module, used to determine an operation area in the electronic drawing board and non-operation strokes in the operation area based on an erase operation or an undo operation performed by a user in the electronic drawing board, wherein the area of ​​the operation area is smaller than the area of ​​the electronic drawing board; A rendering implementation module, used for deleting all original strokes in the operation area, and re-rendering the non-operation strokes in the operation area to delete intersecting strokes; In the aspect of determining the operation area in the electronic drawing board and the non-operation strokes in the operation area based on the user's erase operation or undo operation in the electronic drawing board, the rendering determination module is further used to: Acquire a second operation of the user in the electronic drawing board, where the second operation is a line erasing operation; Determine the overlapped parts of all original strokes in the electronic drawing board and the line erasing strokes corresponding to the second operation, and determine the strokes corresponding to all original strokes in the electronic drawing board in the overlapped parts as the intersecting strokes; Determine an operation area in the electronic drawing board and non-operation strokes in the operation area according to the intersecting strokes; In the aspect of determining the operation area in the electronic drawing board according to the intersecting strokes, the rendering determination module is further used for: Obtaining a first maximum value and a first minimum value of the intersecting strokes on the electronic drawing board on the horizontal coordinate, and a second maximum value and a second minimum value on the vertical coordinate; Determine a first coordinate according to the first maximum value and the second maximum value, determine a second coordinate according to the first maximum value and the second minimum value, determine a third coordinate according to the first minimum value and the second maximum value, and determine a fourth coordinate according to the first minimum value and the second minimum value; The operation area is determined according to the first coordinate, the second coordinate, the third coordinate, and the fourth coordinate.

8. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 6.

9. A terminal, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.

Citation Information

Patent Citations

  • Identification method and system for erasing handwriting

    CN106650648A

  • A method of deleting handwriting stroke information inputted by a user on a handwriting device

    CN109445676A

  • Stroke erasing method, terminal and computer readable storage medium

    CN112286424A