A vector graphics drawing method, device, equipment and storage medium

Through automated vector drawing methods, the problem of slow project progress caused by manual icon drawing in Android applications is solved, and the compatibility and storage cost of porting vector files between different devices is reduced, achieving fast and efficient vector editing and modify.

CN114693840BActive Publication Date: 2024-12-31TCL COMML INFORMATION TECH (HUIZHOU) CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011609594.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2024-12-31
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

In the prior art, icons in Android applications require manual drawing by professional artists, resulting in slow or delayed project progress when a large number of icons are required, and the porting of vector graphics files between different devices may cause compatibility problems and high storage costs.

Method used

Provide a vector drawing method, which generates a vector drawing editing mode by obtaining drawing instructions, realizes automatic drawing and modification of vector drawings, including obtaining drawing elements and instructions input by users, generating drawings, and drawing or modifying vector drawings based on these elements.

Benefits of technology

The automated vector drawing and modification process is realized, reducing dependence on professional artists, improving project progress, and reducing the compatibility and storage costs of icon transplantation between different devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693840B_ABST
    Figure CN114693840B_ABST
Patent Text Reader

Abstract

The present invention discloses a vector graphics drawing method, device, equipment and storage medium, wherein the vector graphics drawing method comprises: obtaining a drawing instruction, and generating a vector graphics editing mode based on the drawing instruction; when the vector graphics editing mode is a drawing mode, drawing a target vector graphics by setting drawing elements; when the vector graphics editing mode is a modification mode, modifying the target vector graphics. The present invention can realize automatic drawing and modification of vector graphics, solving the problem in the prior art that professional artists are required to manually draw vector graphics, which leads to slow or even delayed projects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of drawing, and in particular to a vector drawing method, device, equipment and storage medium. Background Art

[0002] The icons used in today's Android applications are mostly vector graphics or bitmaps converted from vector graphics. A bitmap is composed of individual points of pixels (picture elements), which can be arranged and colored in different ways to form a pattern. When you zoom in on a bitmap, you can see countless individual blocks that make up the entire image. Currently, the icons in Android applications are all manually drawn by professional artists. When a large number of icons are needed in an Android application, but the number of artists is insufficient, it may lead to slow progress or even delays in the project.

[0003] Therefore, the prior art needs to be improved. Summary of the invention

[0004] The main purpose of the present invention is to provide a vector graphics drawing method, device, equipment and computer-readable storage medium, aiming to realize automatic drawing and modification of vector graphics. The steps of the vector graphics drawing method provided by the present invention are:

[0005] Obtaining a drawing instruction, and generating a vector graphics editing mode based on the drawing instruction;

[0006] When the vector graphics editing mode is the drawing mode, the target vector graphics are drawn by setting drawing elements;

[0007] When the vector image editing mode is a modification mode, the target vector image is modified.

[0008] In one embodiment, the step of generating a vector graphics editing mode based on the drawing instruction includes:

[0009] When the drawing instruction is a new drawing instruction, generating a drawing mode;

[0010] When the drawing instruction is an instruction to modify a vector image, a modification mode is generated.

[0011] In one embodiment, the drawing elements include drawing size and drawing fill color.

[0012] When the vector graphics editing mode is the drawing mode, the step of drawing the target vector graphics by setting the drawing elements includes:

[0013] When the vector image editing mode is a drawing mode, obtaining a long side size and a short side size selected by a user, and generating a first drawing that matches the long side size and the short side size;

[0014] Placing the first drawing in a horizontal or vertical direction on a display interface, and rendering the drawing fill color selected by a user on the first drawing;

[0015] The rendered drawing is used as the target drawing, and a target vector image is drawn based on the target drawing.

[0016] In one embodiment, the drawing elements include point coordinates and point connection types.

[0017] The step of using the rendered drawing as a target drawing and drawing a target vector diagram based on the target drawing includes:

[0018] Obtaining the point coordinates of the starting point and the end point input by the user in the drawing, and the point connection type between the starting point and the end point, wherein the point connection type includes a straight line, a circular arc curve, and a Bezier curve;

[0019] A connection line between the starting point and the end point is determined by the point-to-line type, and a target vector diagram is obtained based on the connection line.

[0020] In one implementation, determining the connection line between the starting point and the end point by the point-to-line type, and obtaining the target vector map based on the connection line further includes:

[0021] Modify the connecting line according to a preset line color and a preset thickness to obtain a modified connecting line, and use the modified connecting line as a target connecting line;

[0022] The starting point and the end point are connected by the target connecting line to obtain a target vector diagram.

[0023] In one implementation, when the vector map editing mode is a modification mode, the step of modifying the target vector map includes:

[0024] When the vector graphics editing mode is a modification mode, determining an image portion to be deleted in the target vector graphics input by a user;

[0025] The to-be-deleted image portion is erased based on an erase function, and the modification mode is converted into the drawing mode to modify the target vector image.

[0026] In one embodiment, the steps of the vector graphics drawing method include:

[0027] Obtain the coordinates of the first point to be closed and the second point to be closed;

[0028] Based on a point closing function, the first point to be closed and the second point to be closed are synthesized to obtain a closing point, wherein the point coordinates of the closing point are the same as the point coordinates of the second point to be closed.

[0029] In a second aspect, an embodiment of the present invention further provides a vector graphics drawing device, characterized in that the vector graphics drawing device comprises:

[0030] An acquisition module is used to obtain drawing instructions;

[0031] A generating module, used for generating a vector graphics editing mode based on the drawing instruction;

[0032] A drawing module, used for drawing a target vector graph by setting drawing elements when the vector graph editing mode is a drawing mode;

[0033] The modification module is used to modify the target vector image when the vector image editing mode is the modification mode.

[0034] In a third aspect, an embodiment of the present invention further provides a vector graphics drawing device, characterized in that the device comprises a memory, a processor, and a vector graphics drawing program stored in the memory and executable on the processor, wherein the vector graphics drawing program, when executed by the processor, implements the steps of the vector graphics drawing method as described in any one of the above items.

[0035] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, characterized in that a vector graphics drawing program is stored on the computer storage medium, and when the vector graphics drawing program is executed by a processor, the steps of the vector graphics drawing method as described in any one of the above items are implemented.

[0036] The present invention obtains drawing instructions and generates a vector graphics editing mode based on the drawing instructions; when the vector graphics editing mode is a drawing mode, a target vector graphics is drawn by setting drawing elements; when the vector graphics editing mode is a modification mode, the target vector graphics is modified, so that the vector graphics can be automatically drawn and modified, thereby solving the problem in the prior art that professional artists are required to manually draw vector graphics, resulting in slow or even delayed project progress. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for drawing a vector diagram provided by the present invention.

[0038] Figure 2 This is a functional block diagram of the device provided by the present invention.

[0039] Figure 3 A schematic diagram of the placement direction of the drawings provided by the present invention.

[0040] Figure 4 This is a schematic diagram of the point-to-line type provided by the present invention.

[0041] Figure 5A schematic diagram of modifying the thickness of a connecting line provided by the present invention.

[0042] Figure 6 This is a schematic diagram of the point closing function provided by the present invention.

[0043] Figure 7 This is a connection diagram of the internal modules of the vector graphics drawing device provided by the present invention.

[0044] The purpose, features and advantages of the present invention will be described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0046] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0047] At present, Android applications are very popular. The icons of Android applications will be displayed on the desktop of the user's device and will also be placed on the desktop as a shortcut icon. Android application icons play an important role: they not only promote the application brand, but also help users find their own applications in the application store. In addition, they can also support development in the program. Therefore, the application icon is actually one of the parts that interact with users most frequently. In order to meet the needs of brand promotion, application updates and other projects, in the actual application process, users have a great demand for editing and modifying the icons of Android applications.

[0048] Most of the icons used in Android applications today are vector graphics. Vector graphics, also known as object-oriented images or drawing images, are mathematically defined as a series of points connected by lines. The graphic elements in a vector file are called objects. Each object is a self-contained entity with properties such as color, shape, outline, size, and screen position. Specifically, vector graphics draw graphics based on geometric characteristics. A vector can be a point or a line. Vector graphics can only be generated by software, and the file takes up less internal space because this type of image file contains independent separate images that can be freely and unlimitedly recombined. Its characteristics are that the image will not be distorted after enlargement, and it has nothing to do with resolution. It is suitable for graphic design, text design, and some logo design, layout design, etc. For example, the vector graphics of a painting is actually formed by lines to form the outline of the outer frame, and the color of the outer frame and the color enclosed by the outer frame determine the color displayed by the painting. Commonly used vector graphics editing software includes CorelDraw, Illustrator, Freehand, XARA, CAD, etc. In addition, the icons used in Android applications can also be bitmaps converted from vector graphics. Bitmaps, also known as bitmap images or drawn images, are composed of single points called pixels (picture elements). These dots can be arranged and colored differently to create a pattern. When you zoom in on a bitmap, you can see the countless individual squares that make up the entire image. The effect of increasing the size of a bitmap is to enlarge the individual pixels, making the lines and shapes appear jagged. However, if you view it from a distance, the colors and shapes of the bitmap image appear continuous.

[0049] However, currently, icons in Android applications are all manually drawn by professional artists. When a large number of icons are needed in an Android application, but the number of artists is insufficient, the project may progress slowly or even be delayed. In addition, the common way to display vector graphics is usually to directly instantiate the vector graphics file and generate the corresponding display object for display. The advantage of this method is that it does not require additional operation of bitmap information, which reduces the work of program makers and displays the content of the vector graphics file as it is. However, since this method directly operates the image information of the vector graphics file, if the vector graphics file is directly transplanted to another device instead of the original device for display, it may cause incompatibility problems, resulting in an increase in the cost of transplanting to another device, and storing the image information of the vector graphics file also requires a large amount of memory space, which undoubtedly increases the maintenance cost.

[0050] Based on the above-mentioned defects of the prior art, the present invention provides a vector diagram drawing method, the method comprising:

[0051] Step S10: Obtain drawing instructions, and generate a vector graphics editing mode based on the drawing instructions.

[0052] When a user needs to edit an Android application icon, the user needs to first control the vector graphics editing system related to the Android application icon to start the editing mode. Specifically, a drawing instruction needs to be sent to the editing system to trigger the editing system to start. After the editing system receives the drawing instruction, it will interpret the drawing instruction and open the vector graphics editing mode corresponding to the user's drawing instruction.

[0053] In one implementation, step S10 specifically includes the following steps:

[0054] Step S110: when the drawing instruction is a new drawing instruction, generate a drawing mode;

[0055] Step S120: When the drawing instruction is an instruction to modify a vector image, a modification mode is generated.

[0056] Specifically, in order to meet the needs of most users for vector graphics editing, the embodiment of the present invention provides two different vector graphics editing modes. The first is a drawing mode, that is, drawing a vector graphics from scratch; the second is a modification mode, that is, a vector graphics already exists, and the original vector graphics is modified through the modification mode. This embodiment provides two vector graphics editing modes to meet the various needs of users in the process of editing vector graphics.

[0057] In order to draw a new vector graph, such as Figure 1 As shown, the method further comprises the following steps:

[0058] Step S20: When the vector image editing mode is the drawing mode, a target vector image is drawn by setting drawing elements.

[0059] Specifically, when the user wants to draw a new vector image, he first needs to send a drawing instruction corresponding to the drawing mode to the editing system. After receiving the instruction, the editing system sets the vector image editing mode to the drawing mode, and then obtains the user's input information, generates corresponding drawing elements according to the user's input information, and then draws using the generated drawing elements, and uses the vector image obtained after the drawing is completed as the target vector image.

[0060] In one implementation, the drawing elements include drawing size and drawing fill color, and step S20 specifically includes the following steps:

[0061] Step S210: when the vector image editing mode is the drawing mode, obtaining the long side size and the short side size selected by the user, and generating a first drawing that matches the long side size and the short side size;

[0062] Step S220, placing the first drawing in a horizontal or vertical direction on the display interface, and rendering the drawing fill color selected by the user on the first drawing;

[0063] Step S230: taking the rendered drawing as a target drawing, and drawing a target vector image based on the target drawing.

[0064] Specifically, after the editing system sets the vector image editing mode to the drawing mode based on the drawing instruction, it is necessary to detect whether the user performs an input operation on the terminal. After detecting the user's input operation, the user's input information is obtained and the input information is interpreted and analyzed, and the long side size and short side size selected by the user are obtained according to the results of the interpretation and analysis. Then the editing system determines the long side size and short side size data of the drawing to be generated based on the obtained long side size and short side size data, respectively, so as to generate a first drawing that matches the long side size and the short side size. In addition, the editing system can also determine the placement direction of the drawing on the display interface based on the user's input information, such as Figure 3 As shown, the placement direction includes two categories: the first is horizontal placement, and the second is vertical placement. When the editing system determines that the placement direction of the drawing on the display interface is horizontal placement based on the user's input information, the generated drawing is placed horizontally on the display interface; when the editing system determines that the placement direction of the drawing on the display interface is vertical placement based on the user's input information, the generated drawing is placed vertically on the display interface. In addition, the editing system can also obtain the drawing fill color selected by the user based on the user's input information, and the drawing fill color is the fill color of the drawing. Then the drawing fill color selected by the user is rendered on the drawing. After rendering is completed, the rendered drawing is used as the target drawing, and the target vector image is drawn based on the target drawing.

[0065] In one implementation, the drawing element further includes point coordinates and point connection type, and the step of using the rendered drawing as the target drawing and drawing the target vector map based on the target drawing includes: obtaining the point coordinates of the starting point and the end point input by the user in the drawing, and the point connection type between the starting point and the end point, and the point connection type includes a straight line, an arc curve and a Bezier curve. Then, the connection line between the starting point and the end point is determined according to the point connection type, and the target vector map is obtained based on the connection line.

[0066] Specifically, the editing system will also obtain the starting point data and the end point data of the line to be drawn based on the user's input information, and then determine the point coordinates corresponding to the starting point data and the end point data on the drawing with previously set length data, width data and fill color based on the starting point data and the end point data input by the user. In addition, the editing system can also obtain the point connection type data between the starting point and the end point based on the user's input information, such as Figure 4 As shown, in addition to the common solid line (A), dotted line (B, C), and dot-dotted line (D), the point type data can also include arc curves and Bezier curves. The Bezier curve (Bezier curve or Bezier curve) is a mathematical curve applied to two-dimensional graphics applications. General vector drawing software will accurately draw curves through Bezier curves. Bezier curves are composed of lines and nodes. Nodes are draggable fulcrums and lines are like retractable rubber bands. For example, the pen tool we see on the drawing tool is used to make vector curves such as Bezier curves. Then, the editing system determines what type of connecting line should be used to connect the starting point and the end point based on the point connection type data, and then connects the starting point and the end point through the connecting line corresponding to the point connection type. After the connection is completed, the target vector map is obtained.

[0067] In one implementation, the step of determining a connection line between the starting point and the end point by the point-to-line type and obtaining a target vector map based on the connection line further includes: modifying the connection line according to a preset line color and a preset thickness to obtain a modified connection line, and using the modified connection line as a target connection line. Then, the starting point and the end point are connected by the target connection line to obtain a target vector map.

[0068] Specifically, for the connecting line between the starting point and the end point, in addition to limiting the type of the connecting line by the point-to-line type, such as Figure 5 As shown, this embodiment also needs to limit the line color and line thickness of the connection line in order to draw a connection line between two points that meets the user's expectations. Therefore, the editing system also needs to determine the line color and line thickness that the user expects to draw based on the user input information, and modify the connection line between the starting point and the end point determined based on the point connection type data according to the preset line color and preset thickness to obtain a modified connection line, and use the modified connection line as the target connection line. Then, the starting point and the end point are connected through the target connection line to obtain a target vector diagram.

[0069] In one implementation, the vector map drawing method further includes: obtaining the point coordinates of the first point to be closed and the second point to be closed. Then, based on the point closing function, the first point to be closed and the second point to be closed are synthesized to obtain a closed point, wherein the point coordinates of the closed point are the same as the point coordinates of the second point to be closed.

[0070] Since vector graphics are usually composed of multiple lines, it is often necessary to connect multiple lines. Based on this requirement, this embodiment also provides a method for connecting lines when drawing a vector graphics. Specifically, it is first necessary to determine the first point to be closed and the second point to be closed on the drawing according to the user's click order, and then based on the point closing function in the triggering editing system, perform a translation operation on the line corresponding to the first closing point on the drawing. After the first closing point and the second closing point are overlapped, it means that the connection operation between the line corresponding to the first closing point and the line corresponding to the second closing point is completed. For example, Figure 6 As shown, point a and point b are points on line A and line B respectively. To connect line A and line B, the user first clicks point a and then clicks point b. The system sets point a as the first closing point and point b as the second closing point according to the user's clicking sequence. Then the line corresponding to point a is translated so that the positions of point a and point b coincide. After point a and point b coincide, point c is obtained, and point c is the connecting point of lines A and B. It can be understood that the first closing point and the second closing point in this embodiment can be any point on the corresponding line rather than the absolute starting point or end point of the line.

[0071] In order to meet the user's modification needs for vector graphics, such as Figure 1 Said method further comprises the following steps:

[0072] Step S30: When the vector image editing mode is the modification mode, modify the target vector image.

[0073] Specifically, the editing system interprets and analyzes the received drawing instruction. When the drawing instruction is an instruction to modify the vector image, the vector image editing mode is set to the modification mode. After the setting is successful, the target vector image can be modified. It can be understood that in addition to the target vector image that can be used in the modification mode in this embodiment, other vector images to be modified can also be applied to the modification mode in this embodiment.

[0074] In one implementation, when the vector image editing mode is the modification mode, the step of modifying the target vector image includes: when the vector image editing mode is the modification mode, determining the image portion to be deleted in the target vector image input by the user. Then, based on an erase function, erasing the image portion to be deleted, and converting the modification mode into the drawing mode to modify the target vector image.

[0075] In order to implement the modification operation on the target vector map, this embodiment divides the modification operation into two types, one is the deletion-related modification operation, and the other is the drawing-related modification operation, and provides corresponding implementation methods for these two modification operations. Specifically, for the deletion-related modification operation, it is first necessary to convert the vector map editing mode into the modification mode, and then the editing system determines the image portion to be deleted in the target vector map based on the user's input operation. For example, the user can click on the area to be deleted on the display interface, and the area to be deleted will be determined by the editing system as the image portion to be deleted. Then, the image portion to be deleted is erased by starting the erase function in the editing mode. After the erasure is completed, if the user still needs to redraw the area where the erase operation has been performed, it is necessary to control the editing system to convert the current modification mode into the drawing mode, and then redraw the target vector map based on the operation corresponding to the drawing mode.

[0076] Based on the above embodiments, Figure 7 As shown, this embodiment also provides a vector graphics drawing device, characterized in that the vector graphics drawing device includes:

[0077] Acquisition module 01, used to acquire drawing instructions;

[0078] A generating module 02, used for generating a vector graphics editing mode based on the drawing instruction;

[0079] A drawing module 03, used for drawing a target vector image by setting drawing elements when the vector image editing mode is a drawing mode;

[0080] The modification module 04 is used to modify the target vector image when the vector image editing mode is the modification mode.

[0081] In one implementation, the generating module 02 further includes:

[0082] A drawing unit, used for generating a drawing mode when the drawing instruction is a new drawing instruction;

[0083] The modification unit generates a modification mode when the drawing instruction is an instruction to modify the vector image.

[0084] In one implementation, the drawing module 03 further includes:

[0085] A drawing generation unit, configured to, when the vector graphics editing mode is a drawing mode, obtain a long side size and a short side size selected by a user, and generate a first drawing that matches the long side size and the short side size;

[0086] The drawing rendering unit is used to place the first drawing on the display interface in a horizontal or vertical direction, and render the drawing fill color selected by the user on the first drawing.

[0087] The drawing drawing unit is used to use the rendered drawing as a target drawing and draw a target vector image based on the target drawing.

[0088] In one implementation, the drawing module 03 further includes:

[0089] A connection line parameter unit, used to obtain the point coordinates of the starting point and the end point input by the user in the drawing, and the point connection line type between the starting point and the end point, wherein the point connection line type includes a straight line, a circular arc curve and a Bezier curve;

[0090] A connection line drawing unit is used to determine the connection line between the starting point and the end point according to the point connection type, and obtain a target vector map based on the connection line.

[0091] In one implementation, the connection line drawing unit further includes:

[0092] The connecting line modification unit is used to modify the connecting line according to a preset line color and a preset thickness to obtain a modified connecting line, and use the modified connecting line as a target connecting line.

[0093] In one implementation, the modification module 04 further includes:

[0094] An image deleting unit, configured to determine an image portion to be deleted in the target vector image input by a user when the vector image editing mode is a modification mode;

[0095] A modification unit is used to erase the image portion to be deleted based on the erase function, and convert the modification mode into the drawing mode to modify the target vector image.

[0096] In one implementation, the vector graphics drawing device further includes:

[0097] A point coordinate acquisition module, used to acquire the point coordinates of the first point to be closed and the second point to be closed;

[0098] A point closing module is used to synthesize the first point to be closed and the second point to be closed based on a point closing function to obtain a closing point, wherein the point coordinates of the closing point are the same as the point coordinates of the second point to be closed.

[0099] Based on the above embodiments, the present invention further provides a device, whose principle block diagram can be shown as follows: Figure 2 As shown. The device includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a vector graphics drawing method is implemented. The display screen of the device can be a liquid crystal display screen or an electronic ink display screen.

[0100] Those skilled in the art will understand that Figure 2 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the device to which the scheme of the present invention is applied. The specific device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0101] In one implementation, one or more programs are stored in the memory of the device, and the one or more programs are configured to be executed by one or more processors, and the one or more programs include instructions for performing a vector graphics drawing method.

[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0103] In summary, the present invention discloses a vector graphics drawing method, the method comprising: obtaining a drawing instruction, and generating a vector graphics editing mode based on the drawing instruction; when the vector graphics editing mode is a drawing mode, drawing a target vector graphics by setting drawing elements; when the vector graphics editing mode is a modification mode, modifying the target vector graphics. The present invention can realize automatic drawing and modification of vector graphics, solving the problem in the prior art that professional artists are required to manually draw vector graphics, which leads to slow or even delayed projects.

[0104] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A vector graphics drawing method, characterized in that: The vector graphics drawing method comprises the following steps: Obtaining a drawing instruction, and generating a vector graphics editing mode based on the drawing instruction; When the vector graphics editing mode is the drawing mode, the target vector graphics are drawn by setting drawing elements; When the vector map editing mode is a modification mode, modifying the target vector map; When the user needs to edit the icon of the Android application, firstly, the vector graphics editing system related to the Android application icon is controlled to start the editing mode, and then a drawing instruction is sent to the editing system to trigger the startup of the editing system; The steps of the vector graphics drawing method also include: Obtain the coordinates of the first point to be closed and the second point to be closed; Based on the point closing function, synthesize the first point to be closed and the second point to be closed to obtain a closing point, wherein the point coordinates of the closing point are the same as the point coordinates of the second point to be closed; The line corresponding to the first point to be closed is translated on the drawing, and after the first point to be closed and the second point to be closed are overlapped, it means that the connection operation between the line corresponding to the first point to be closed and the line corresponding to the second point to be closed is completed; The first point to be closed and the second point to be closed are any points on the corresponding lines rather than being the absolute starting points or end points of the lines.

2. The vector graphics drawing method according to claim 1, characterized in that: The step of generating a vector graphics editing mode based on the drawing instruction comprises: When the drawing instruction is a new drawing instruction, generating a drawing mode; When the drawing instruction is an instruction to modify a vector image, a modification mode is generated.

3. The vector graphics drawing method according to claim 1, characterized in that: The drawing elements include drawing size and drawing fill color. When the vector graphics editing mode is the drawing mode, the step of drawing the target vector graphics by setting the drawing elements includes: When the vector image editing mode is a drawing mode, obtaining a long side size and a short side size selected by a user, and generating a first drawing that matches the long side size and the short side size; Placing the first drawing in a horizontal or vertical direction on a display interface, and rendering the drawing fill color selected by a user on the first drawing; The rendered drawing is used as the target drawing, and a target vector image is drawn based on the target drawing.

4. The vector graphics drawing method according to claim 3, characterized in that: The drawing elements include point coordinates and point connection types. The step of using the rendered drawing as a target drawing and drawing a target vector diagram based on the target drawing includes: Obtaining the point coordinates of the starting point and the end point input by the user in the drawing, and the point connection type between the starting point and the end point, wherein the point connection type includes a straight line, a circular arc curve, and a Bezier curve; A connection line between the starting point and the end point is determined by the point-to-line type, and a target vector diagram is obtained based on the connection line.

5. The vector graphics drawing method according to claim 4, characterized in that: Determining the connection line between the starting point and the end point by the point-to-line type, and obtaining the target vector map based on the connection line also includes: Modify the connecting line according to a preset line color and a preset thickness to obtain a modified connecting line, and use the modified connecting line as a target connecting line; The starting point and the end point are connected by the target connecting line to obtain a target vector diagram.

6. The vector graphics drawing method according to claim 5, characterized in that: When the vector map editing mode is the modification mode, the step of modifying the target vector map includes: When the vector graphics editing mode is a modification mode, determining an image portion to be deleted in the target vector graphics input by a user; The to-be-deleted image portion is erased based on an erase function, and the modification mode is converted into the drawing mode to modify the target vector image.

7. A vector graphics drawing device, characterized in that: The vector graphics drawing device comprises: An acquisition module is used to obtain drawing instructions; A generating module, used for generating a vector graphics editing mode based on the drawing instruction; A drawing module, used for drawing a target vector graph by setting drawing elements when the vector graph editing mode is a drawing mode; A modification module, used for modifying the target vector diagram when the vector diagram editing mode is a modification mode; The acquisition module comprises: When the user needs to edit the icon of the Android application, firstly, the vector graphics editing system related to the Android application icon is controlled to start the editing mode, and then a drawing instruction is sent to the editing system to trigger the startup of the editing system; The vector graphics drawing device also includes: A point coordinate acquisition module, used to acquire the point coordinates of the first point to be closed and the second point to be closed; a point closing module, configured to synthesize the first point to be closed and the second point to be closed based on a point closing function to obtain a closing point, wherein the point coordinates of the closing point are the same as the point coordinates of the second point to be closed; The point closing module comprises: The line corresponding to the first point to be closed is translated on the drawing, and after the first point to be closed and the second point to be closed are overlapped, it means that the connection operation between the line corresponding to the first point to be closed and the line corresponding to the second point to be closed is completed; The first point to be closed and the second point to be closed are any points on the corresponding lines rather than being the absolute starting points or end points of the lines.

8. A vector graphics drawing device, characterized in that: The device includes a memory, a processor, and a vector graphics drawing program stored in the memory and executable on the processor. When the vector graphics drawing program is executed by the processor, the steps of the vector graphics drawing method according to any one of claims 1 to 6 are implemented.

9. A computer storage medium, characterized in that The computer storage medium stores a vector graphics drawing program, and when the vector graphics drawing program is executed by the processor, the steps of the vector graphics drawing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Network information inputting editor, network information inputting editing system and method

    CN101477697A

  • Vector diagram drawing method and device and computer readable storage medium

    CN111199568A

  • General vector diagram drawing method and system and readable medium

    CN111598971A

  • Vector graphic creation platform and creation method based on web browser

    CN112001985A

  • Random-access vector graphics

    US20080309676A1