Electronic drawing method, device and equipment, medium and product

The Metal framework in electronic drawing methods on touch devices addresses the simplicity of Bezier curves by using GPU performance to simulate real drawing effects, enhancing user experience through brush stroke simulation.

CN119088281APending Publication Date: 2024-12-06HAOXINYUN (BEIJING) NETWORK COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411200826.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Current electronic drawing methods on touch devices, such as those using Bezier curves, result in simple lines that differ significantly from real drawing, adversely affecting user experience.

Method used

Implementing the drawing function using the Metal framework to utilize GPU performance, determining brush width boundary points based on touch pressure, and drawing display screens using triangle strips to achieve a brush stroke effect.

Benefits of technology

Enhances the user's drawing experience by simulating real drawing effects, improving performance in complex drawing scenarios with frequent updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088281A_ABST
    Figure CN119088281A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an electronic drawing method and device, equipment, a medium and a product, and belongs to the field of electronic drawing, the method is applied to a client, the client comprises touch equipment, and the method comprises the following steps: obtaining a touch movement track on the touch equipment and touch pressure corresponding to each touch point on the movement track; determining two paintbrush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; and drawing a display picture corresponding to the touch moving track according to the paintbrush width boundary points corresponding to all the touch points on the moving track. The embodiment of the invention can realize the stroke effect of the paintbrush and improve the drawing experience of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic drawing, and in particular, to a method, device, equipment, medium and product for electronic drawing. Background Art

[0002] With the rapid development of electronic devices, current electronic devices often have touch devices such as touch screens or touch pads.

[0003] The drawing function in current touch devices is often performed through system functions such as Bezier curves (UIBezierPath), for example, to draw graphics or text.

[0004] However, the lines of existing drawing content are relatively simple, which is quite different from real drawing and affects the user experience.

[0005] Therefore, how to provide a drawing method with relatively rich content becomes a technical problem that needs to be solved. Summary of the invention

[0006] An embodiment of the present application aims to provide a method, device, equipment, medium and product for electronic drawing. Through the technical solution of the embodiment of the present application, the embodiment of the present application can realize the brush stroke effect, which is slightly different from real drawing and can enhance the user's drawing experience.

[0007] In a first aspect, an embodiment of the present application provides a method for electronic drawing, which is applied to a client, wherein the client includes a touch device, and the method includes: obtaining a touch movement trajectory on the touch device and the touch pressure corresponding to each touch point on the movement trajectory; determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; and drawing a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all touch points on the movement trajectory.

[0008] According to the embodiment of the present application, the width boundary point can be determined according to the pressure of each touch point, and the final display screen can be drawn according to the boundary point. Since the width boundary point of each touch point corresponds to the touch pressure, in this way, the embodiment of the present application can display the brush tip and pen tip effect based on the change of pressure, which can reduce the difference from the real drawing and improve the user's drawing experience.

[0009] In one embodiment, acquiring the touch movement trajectory on the touch device and the touch pressure corresponding to each touch point on the movement trajectory includes: determining the touch movement trajectory by using a touch event callback method, and determining the touch pressure by a sensor on the touch device.

[0010] In one embodiment, determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point includes: determining a boundary width that is positively correlated with the touch pressure according to the touch pressure corresponding to each touch point; and determining the two brush width boundary points corresponding to each touch point in a direction perpendicular to the moving trajectory according to the boundary width, wherein the touch point is located between the two brush width boundary points corresponding to it and on a straight line.

[0011] In one embodiment, drawing the display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all the touch points on the movement trajectory includes: drawing the display screen corresponding to the touch movement trajectory according to four brush width boundary points corresponding to every two adjacent touch points.

[0012] In one embodiment, drawing the display screen corresponding to the touch movement trajectory based on the four brush width boundary points corresponding to each two adjacent touch points includes: drawing two triangle strips using the four brush boundary points corresponding to each two adjacent touch points to obtain the display screen corresponding to the touch movement trajectory, wherein the two triangle strips are spliced ​​to form a quadrilateral corresponding to the four brush width boundary points.

[0013] In one embodiment, the touch points on the touch movement trajectory include a starting point, a moving point, and an ending point, wherein when the touch points include N, drawing two triangle strips of four brush boundary points corresponding to each two adjacent touch points to obtain a display screen corresponding to the touch movement trajectory includes: starting from the starting point and ending at the ending point, performing a total of N-1 cycles of drawing two triangle strips corresponding to four brush boundary points corresponding to each two adjacent touch points to obtain the display screen, wherein N is a positive integer greater than 1.

[0014] In the second aspect, an embodiment of the present application provides an electronic drawing device, which is applied to a client, and the client includes a touch device. The device includes: an acquisition unit, used to acquire a touch movement trajectory on the touch device and the touch pressure corresponding to each touch point on the movement trajectory; a determination unit, used to determine two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; and draw a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all touch points on the movement trajectory.

[0015] In one implementation, the acquisition unit is specifically configured to determine the touch movement trajectory by using a touch event callback method, and determine the touch pressure by using a sensor on the touch device.

[0016] In one embodiment, the determination unit is specifically used to determine a boundary width that is positively correlated with the touch pressure size according to the touch pressure corresponding to each touch point; and determine the two brush width boundary points corresponding to each touch point in a direction vertical to the moving trajectory according to the boundary width, wherein the touch point is located between the two brush width boundary points corresponding to it and on a straight line.

[0017] In one implementation, the determining unit is specifically configured to draw a display screen corresponding to the touch movement track according to four brush width boundary points corresponding to every two adjacent touch points.

[0018] In one embodiment, the determination unit is specifically used to draw two triangle strips of four brush boundary points corresponding to each two adjacent touch points to obtain a display screen corresponding to the touch movement trajectory, wherein the two triangle strips are spliced ​​to form a quadrilateral corresponding to the four brush width boundary points.

[0019] In one embodiment, the determination unit is specifically used to draw two triangle strips corresponding to four brush boundary points corresponding to each two adjacent touch points for a total of N-1 cycles starting from the starting point and ending at the end point to obtain the display screen, where N is a positive integer greater than 1.

[0020] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method described in the first aspect and any one of the embodiments of the first aspect can be implemented.

[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect and any one of the embodiments of the first aspect can be implemented.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, wherein when the computer program is executed by a processor, it can implement the method described in the first aspect and any one of the embodiments of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solution of an embodiment of the present application, the drawings required for use in an embodiment of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A flowchart of an electronic drawing method provided for one embodiment of the present application;

[0025] Figure 2 A schematic diagram of a drawing effect provided for an embodiment of the present application;

[0026] Figure 3 An electronically drawn device schematic diagram provided for one embodiment of the present application;

[0027] Figure 4 A schematic diagram of an electronic device is provided for one embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, 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.

[0029] The drawing function in current touch devices is often drawn through system functions such as Bezier curves (UIBezierPath), such as drawing graphics or text. Drawing with UIBezierPath will occupy a certain amount of CPU performance, but usually the impact is not significant for simple drawing operations. However, it cannot meet the needs of complex drawing that requires frequent updates or drawing scenes that require high performance. Furthermore, the lines drawn with UIBezierPath are relatively simple, and the brush stroke effect cannot be achieved, which is quite different from real drawing and affects the user experience.

[0030] In order to solve complex drawing scenarios that require frequent updates or high performance, the present application embodiment chooses to use the Metal framework to implement the drawing function. It can better utilize GPU performance, release CPU performance, and achieve the effect of brush strokes.

[0031] In order to facilitate understanding and explanation, the following describes the execution process and actions of the electronic drawing method of the present application in the client as an example rather than a limitation.

[0032] It should be understood that the client in the embodiment of the present application can also be referred to as a user terminal or user equipment or terminal equipment or client equipment. In the real-time example of the present application, the client equipment includes a touch device, which can be a touch screen of the client, or an external input device of the client, and the embodiment of the present application is not limited to this. Optionally, the client equipment in the embodiment of the present application can be installed with a browser, and real-time communication can be performed through the browser, or an APP or a small program can be installed, and real-time communication can be performed through the APP or the small program. The terminal equipment in the present application can include a smart phone, a tablet computer, (personal digital assistant, PDA personal digital assistant), a computer, a game console, a wearable device, a tablet computer (portable android device, PAD), etc., and the embodiment of the present application is not limited to this.

[0033] It should be understood that the operating system running on the client device may be an IOS operating system, or a mobile version of Android, Ubuntu mobile version, Tizen, or other Linux kernel-based operating system, as well as a desktop operating system such as Windows, Mac OS, and Linux, but the present invention is not limited thereto. As long as the client device supports the drawing function by touch pressing, it will be fine. For example, the client device may support the use of the Metal framework to implement the drawing function.

[0034] It should be understood that the electronic drawing of the client device in the embodiment of the present application can be applied in the process of online video conferencing. For example, in the process of online video conferencing, the client device can share the drawing screen in real time; or the client device can turn on the electronic drawing function in the video conferencing software to perform local electronic drawing, or conduct an online electronic conference, and the embodiment of the present application is not limited to this. Optionally, the electronic drawing of the client device can also be applied to other software, such as teaching software, writing software or painting software, and the embodiment of the present application is not limited to this.

[0035] The following is combined with Figure 1 An electronic drawing method provided by one embodiment of the present application is exemplarily described.

[0036] like Figure 1 The method shown is applied to a client, the client including a touch device, and the method includes:

[0037] 110 , obtaining a touch movement trajectory on the touch device and a touch pressure corresponding to each touch point on the movement trajectory.

[0038] Optionally, obtaining a touch movement track on a touch device and a touch pressure corresponding to each touch point on the movement track includes:

[0039] The touch movement trajectory is determined by using a touch event callback method, and the touch pressure is determined by a sensor on the touch device.

[0040] It should be understood that the touch points on the moving trajectory may include a starting point, a moving point, and an ending point. For example, the start, moving, and end points of the touch process can be obtained according to the touchesBegan, touchesMoved, and touchesEnded methods. According to the pressure sensor, the corresponding pressure value can be obtained, for example, through a specific API.

[0041] 120 , determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point.

[0042] Specifically, in an embodiment of the present application, in order to display the effect of the pen stroke, the brush width boundary point corresponding to each touch point will be determined. In an embodiment of the present application, one touch point corresponds to two width boundary points, and the display width boundary corresponding to the one touch point is determined by two points.

[0043] Optionally, as another embodiment, determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point includes:

[0044] Determining a border width positively correlated with the touch pressure according to the touch pressure corresponding to each touch point;

[0045] The two brush width boundary points corresponding to each touch point are determined in a vertical direction of the moving track according to the boundary width, wherein the touch point is located between the two brush width boundary points corresponding to the touch point and on a straight line.

[0046] Specifically, in the embodiment of the present application, the display width boundary corresponding to the touch point is positively correlated with the touch pressure, and further, it can also be proportional. The greater the pressure, the larger the corresponding width boundary. At the same time, the two brush width boundary points corresponding to the touch point are perpendicular to the touch track where the touch point is located, and the touch point and the two brush width boundary points are on a straight line.

[0047] It should be understood that in actual applications, the touch point and the corresponding two brush width boundary points are located on the same straight line, and the straight line may not be perpendicular to the touch trajectory, for example, there is a certain angle, and it can be flexibly set according to the actual display effect, such as italic fonts or special font display effects. The embodiments of the present application are not limited to this.

[0048] It should also be understood that the touch point is located between the two corresponding brush width boundary points. The touch point can be located in the middle of the two brush width boundary points or biased towards one of the points. It can be flexibly adjusted according to the settings or specific display effects, and the embodiments of the present application are not limited to this.

[0049] 130 , drawing a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all the touch points on the movement trajectory.

[0050] Specifically, after determining the width boundary point corresponding to the touch point, the embodiment of the present application can draw the final display screen according to the boundary point corresponding to each touch point. Since the width boundary point of each touch point corresponds to the touch pressure, different pressures correspond to different width boundary points. In this way, the embodiment of the present application can display the brush tip and pen tip effects based on the change of pressure.

[0051] Optionally, as an embodiment, drawing a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all touch points on the movement trajectory includes:

[0052] A display screen corresponding to the touch movement track is drawn according to four brush width boundary points corresponding to every two adjacent touch points.

[0053] Optionally, drawing a display screen corresponding to the touch movement track according to four brush width boundary points corresponding to every two adjacent touch points includes:

[0054] The four brush boundary points corresponding to each two adjacent touch points are drawn into two triangle strips to obtain a display screen corresponding to the touch movement track, wherein the two triangle strips are spliced ​​to form a quadrilateral corresponding to the four brush width boundary points.

[0055] For example, in order to achieve the pen stroke effect during drawing, the embodiment of the present application can use the MTLPrimitiveTypeTriangleStrip type (triangle strip) for drawing. Four points (i.e., four brush width boundary points) are calculated between every two touch points, where two of the four points can be reused, for example, two diagonal vertices are used twice respectively, so that two triangles can be drawn, and the two triangles have one side (i.e., the line connecting the two reused points in the four points) in common, that is, the two triangles can be spliced ​​together to form a quadrilateral, thereby drawing the effect between the two touch points.

[0056] Specifically, for each triangle, in the embodiment of the present application, the three vertices can be connected in pairs to draw a line, that is, the above two triangles can be formed by drawing 6 lines, but the embodiment of the present application is not limited to this.

[0057] Optionally, as another embodiment, the touch points on the touch movement trajectory include a starting point, a moving point, and an ending point. Wherein, when there are N touch points, the step of drawing two triangle strips with the four brush boundary points corresponding to every two adjacent touch points to obtain the display screen corresponding to the touch movement trajectory includes: starting from the starting point and ending at the ending point, performing a total of N - 1 loop drawings of the two triangle strips corresponding to the four brush boundary points corresponding to every two adjacent touch points to obtain the display screen, where N is a positive integer greater than 1.

[0058] Specifically, for each touch point, the embodiments of the present application can calculate its corresponding two width boundary points (which can also be called the vertices of the triangle strip). Starting from the starting point, every two adjacent touch points are taken as a group for drawing (that is, using the four brush boundary points corresponding to two adjacent touch points to draw two triangles, where the two triangles have a total of 6 vertices, and two of them are shared points). For example, if the position of the vertex corresponding to the previous touch point is the 0 vector, it means that the position of the current vertex is the starting point of the line, and directly calculate the 6 vertices within the stroke range of the current vertex according to the direction vector of the next vertex. If the position of the previous vertex is not the 0 vector, it means that the current vertex is not the starting point of the line, and it is necessary to calculate the 6 vertices within the stroke range of the current vertex according to the direction vector of the previous vertex to ensure perfect splicing with the previous drawing. Repeat the above steps until all touch points are drawn. For example, including 20 touch points (touch point 1 to touch point 20, where touch point 1 is the starting point, touch point 20 is the ending point, and the rest are moving points), it is necessary to first draw two triangles with the 6 vertices (i.e., the four brush width boundary points) corresponding to touch point 1 and touch point 2, then draw two triangles with the 6 vertices (i.e., the four brush width boundary points) corresponding to touch point 2 and touch point 3, and then touch point 3 and touch point 4... and so on, until two triangles are drawn with the 6 vertices (i.e., the four brush width boundary points) corresponding to touch point 19 and touch point 20. This can achieve calculating the pen tip effect according to the position of the touch point during drawing, making the drawn line look more natural and smooth. For example, as Figure 2 shown, it is a schematic diagram of the drawing effect by the embodiments of the present application, Figure 2 and the pen tip effect can be clearly seen in the drawn character "Li".

[0059] It should be understood that the above embodiment describes a scheme for drawing with the vertices corresponding to every two touch points, that is, a scheme for drawing by moving point by point. Optionally, as another embodiment, the embodiment of the present application may first obtain a section of points, for example, obtain multiple trajectory points, and then uniformly draw the multiple trajectory points. For example, multiple trajectory points are obtained, and then the brush width boundary points of the multiple trajectory points are uniformly determined, and then the multiple brush width boundary points are uniformly drawn. This processing method performs processing and display only after a certain amount of trajectory points are accumulated. Compared with the former method, the former method can improve real-time performance, but it will consume more processing performance, and the latter method can save a certain amount of processing performance.

[0060] Please refer to Figure 3 , Figure 3 A block diagram of the composition of an electronic drawing device provided by an embodiment of the present application is shown. Figure 3 The device 300 shown may be a client including a touch device or a module in the client. It should be understood that the device 300 corresponds to the client in the above method embodiment and can execute the various steps performed by the client involved in the above method embodiment. The specific functions of the device 300 can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.

[0061] Figure 3 The device 300 shown includes at least one software function module that can be stored in a memory or fixed in the device in the form of software or firmware. Figure 3 The device 300 shown includes: an acquisition unit 310, used to acquire a touch movement trajectory on the touch device and the touch pressure corresponding to each touch point on the movement trajectory; a determination unit 320, used to determine two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; and draw a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all touch points on the movement trajectory.

[0062] In one embodiment, in one embodiment, the acquisition unit is specifically configured to determine the touch movement trajectory by using a touch event callback method, and determine the touch pressure by using a sensor on the touch device.

[0063] In one embodiment, the determination unit is specifically used to determine a boundary width that is positively correlated with the touch pressure size according to the touch pressure corresponding to each touch point; and determine the two brush width boundary points corresponding to each touch point in a direction vertical to the moving trajectory according to the boundary width, wherein the touch point is located between the two brush width boundary points corresponding to it and on a straight line.

[0064] In one implementation, the determining unit is specifically configured to draw a display screen corresponding to the touch movement track according to four brush width boundary points corresponding to every two adjacent touch points.

[0065] In one embodiment, the determination unit is specifically used to draw two triangle strips of four brush boundary points corresponding to each two adjacent touch points to obtain a display screen corresponding to the touch movement trajectory, wherein the two triangle strips are spliced ​​to form a quadrilateral corresponding to the four brush width boundary points.

[0066] In one embodiment, the determination unit is specifically used to draw two triangle strips corresponding to four brush boundary points corresponding to each two adjacent touch points for a total of N-1 cycles starting from the starting point and ending at the end point to obtain the display screen, where N is a positive integer greater than 1.

[0067] like Figure 4 As shown, an embodiment of the present application provides an electronic device 400, which includes: a memory 410, a processor 420, and a computer program stored in the memory 410 and executable on the processor 420, wherein the processor 420 reads the program from the memory 410 through a bus 430 and executes the program to implement the method executed by the client in any of the above embodiments. Optionally, Figure 4 The device shown may also include a transceiver, which may be used to send and / or receive data streams. Figure 4 The device shown may also include a collector, which may be used to collect audio / video data. The optional electronic device 400 may also include other input devices or other hardware devices, etc., but the embodiments of the present application are not limited thereto.

[0068] Processor 420 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 420 can be a microprocessor.

[0069] The memory 410 may be used to store instructions executed by the processor 420 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 420 of the disclosed embodiment may be used to execute instructions in the memory 410 to implement the method performed by the client shown above. The memory 410 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.

[0070] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method executed by the client in any of the above methods provided in the above embodiments.

[0071] An embodiment of the present application further provides a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the method executed by the client in any of the above methods provided in the above embodiments.

[0072] It should be noted that the processor in the embodiment of the present invention (eg, Figure 4 The processor in the embodiment of the present invention may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor may be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general processor may be a microprocessor or the processor may be any conventional processor, etc. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0073] It can be understood that the memory in the embodiment of the present invention (for example, Figure 4The memory in the memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0074] The application programs involved in the embodiments of the present application include any application installed on the requesting end, including but not limited to browsers, email, instant messaging services, word processing, keyboard virtualization, widgets, encryption, digital rights management, voice recognition, voice replication, positioning (such as functions provided by the global positioning system), music playback, etc.

[0075] It should be understood that the transceiver unit or transceiver in the embodiment of the present invention may also be referred to as a communication unit.

[0076] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0077] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0078] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0079] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0080] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0083] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0084] In short, the above is only a preferred embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method of electronic drawing, It is characterized in that Applied to a client, the client includes a touch device, and the method includes: Acquire a touch movement trajectory on the touch device and a touch pressure corresponding to each touch point on the movement trajectory; Determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; A display screen corresponding to the touch movement trajectory is drawn according to the brush width boundary points corresponding to all the touch points on the movement trajectory.

2. The method according to claim 1, It is characterized in that The acquiring of the touch movement trajectory on the touch device and the touch pressure corresponding to each touch point on the movement trajectory includes: The touch movement trajectory is determined by using a touch event callback method, and the touch pressure is determined by a sensor on the touch device.

3. The method according to claim 1 or 2, It is characterized in that The determining two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point includes: Determining a border width positively correlated with the touch pressure according to the touch pressure corresponding to each touch point; The two brush width boundary points corresponding to each touch point are determined in a vertical direction of the moving track according to the boundary width, wherein the touch point is located between the two brush width boundary points corresponding to the touch point and on a straight line.

4. The method according to claim 1 or 2, It is characterized in that Drawing a display screen corresponding to the touch movement trajectory according to the brush width boundary points corresponding to all the touch points on the movement trajectory includes: A display screen corresponding to the touch movement track is drawn according to four brush width boundary points corresponding to every two adjacent touch points.

5. The method according to claim 4, It is characterized in that Drawing a display screen corresponding to the touch movement track according to four brush width boundary points corresponding to every two adjacent touch points includes: The four brush boundary points corresponding to each two adjacent touch points are drawn into two triangle strips to obtain a display screen corresponding to the touch movement track, wherein the two triangle strips are spliced ​​to form a quadrilateral corresponding to the four brush width boundary points.

6. The method according to claim 5, It is characterized in that The touch points on the touch movement trajectory include a starting point, a moving point, and an end point, wherein when the touch points include N, drawing two triangle strips of four brush boundary points corresponding to every two adjacent touch points to obtain a display screen corresponding to the touch movement trajectory includes: Starting from the starting point and ending at the ending point, a total of N-1 cycles are performed to draw two triangle strips corresponding to four brush boundary points corresponding to every two adjacent touch points to obtain the display screen, where N is a positive integer greater than 1.

7. An electronic drawing device, It is characterized in that Applied to a client, the client includes a touch device, and the apparatus includes: An acquisition unit, configured to acquire a touch movement trajectory on the touch device and a touch pressure corresponding to each touch point on the movement trajectory; a determining unit, configured to determine two brush width boundary points corresponding to each touch point according to the touch pressure corresponding to each touch point; A display screen corresponding to the touch movement trajectory is drawn according to the brush width boundary points corresponding to all the touch points on the movement trajectory.

8. An electronic device, It is characterized in that The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 6 when being run by the processor.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program executes the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, It is characterized in that The computer program product comprises a computer program, wherein the computer program executes the method according to any one of claims 1 to 6 when executed by a processor.