[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104572715B - The processing method and processing device of vector graphics - Google Patents

The processing method and processing device of vector graphics Download PDF

Info

Publication number
CN104572715B
CN104572715B CN201310493117.3A CN201310493117A CN104572715B CN 104572715 B CN104572715 B CN 104572715B CN 201310493117 A CN201310493117 A CN 201310493117A CN 104572715 B CN104572715 B CN 104572715B
Authority
CN
China
Prior art keywords
vector
data frame
dynamic
data
static
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310493117.3A
Other languages
Chinese (zh)
Other versions
CN104572715A (en
Inventor
汤寿麟
张云贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201310493117.3A priority Critical patent/CN104572715B/en
Publication of CN104572715A publication Critical patent/CN104572715A/en
Application granted granted Critical
Publication of CN104572715B publication Critical patent/CN104572715B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention provides a kind of processing method and processing device of vector graphics.The processing method for the vector graphics that the present invention is provided, including:Receive acquisition instructions;The touch sensible signal for obtaining user's triggering screen and generating, and according to the acquisition instructions and the touch sensible signal, the vector graphics drawn on painting canvas is acquired, obtain the first dynamic vector graphics;According to first dynamic vector graphics, corresponding first dynamic data frame is obtained, and the first dynamic data frame is stored in vector data file;The first dynamic data frame includes the corresponding vector data of the first dynamic vector graphics, the very first time and the dynamic vector graphics mark of the collection, and the very first time includes the user touch screen and stops touching the duration between the screen to the user.The problem of mode that the present invention solves storage vector graphics in the prior art causes memory space increase.

Description

Vector graphics processing method and device
Technical Field
The present invention relates to image processing technologies, and in particular, to a method and an apparatus for processing vector graphics.
Background
The vector image software refers to software for drawing a vector image, and common vector image software may be Computer Aided Design (CAD), Computer Aided Instruction (CAI), and the like.
At present, when a process of drawing a drawing needs to be recorded in vector drawing software, a method generally adopted is as follows: the vector image is collected by intercepting a plurality of frames of image every second, and the image frame corresponding to the intercepted vector image is stored. However, the above recording method mainly captures the vector image by capturing the image, and the image frame generally occupies a larger storage space, which increases the storage space and puts higher demands on the performance of the recording device.
Disclosure of Invention
The invention provides a vector graphic processing method and a vector graphic processing device, which solve the problem of increased storage space caused by a mode of storing a vector graphic by an image frame in the prior art.
In a first aspect, the present invention provides a method for processing vector graphics, including:
receiving an acquisition instruction;
acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal to acquire a first dynamic vector graph;
acquiring a corresponding first dynamic data frame according to the first dynamic vector graph, and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the acquired dynamic vector graphics, a first time and a dynamic vector graphics identifier, wherein the first time comprises a time length from the time the user touches the screen to the time the user stops touching the screen.
In a second aspect, the present invention provides a vector graphics processing apparatus, including:
the receiving module is used for receiving an acquisition instruction;
the acquisition module is used for acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal received by the receiving module to acquire a first dynamic vector graph;
the dynamic data frame acquisition module is used for acquiring a corresponding first dynamic data frame according to the first dynamic vector graph acquired by the acquisition module and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, first time and dynamic vector graphics identification, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
The method and the device for processing the vector graphics provided by the invention collect the dynamic vector graphics in the drawing through the received collection instruction and the touch induction signal generated by triggering the screen by the user, convert the collected dynamic vector graphics into the form of a dynamic data frame, and store the dynamic vector graphics in the vector data file in the form of a data structure, thereby solving the problem of the increase of the storage space caused by the way of storing the vector graphics by the image frame in the prior art, reducing the storage space occupied by the stored vector graphics, and improving the service performance of the terminal equipment for recording the vector graphics.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of one embodiment of a method for processing vector graphics provided by the present invention;
fig. 2 is a schematic structural diagram of a data frame according to an embodiment of the present invention;
FIG. 3 is a vector diagram provided by the method of FIG. 1 according to the present invention;
FIG. 4 is a vector data file corresponding to the vector graphics provided by the method of FIG. 1 according to the present invention;
FIG. 5 is a flowchart illustrating a method for processing vector graphics according to another embodiment of the present invention;
FIG. 6 is a flowchart of a method for processing vector graphics according to another embodiment of the present invention;
FIG. 7 is a playback process of a vector graphic provided by the method of FIG. 6 according to the present invention;
FIG. 8 is a schematic structural diagram illustrating an embodiment of a vector graphics processing apparatus according to the present invention;
FIG. 9 is a schematic structural diagram of a vector graphics processing apparatus according to another embodiment of the present invention;
fig. 10 is a schematic structural diagram of a vector graphics processing apparatus according to still another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an embodiment of a method for processing vector graphics provided by the present invention, where the method provided by the present embodiment is suitable for collecting and playing back a drawn vector graphics, and the method can be executed by a processing apparatus for vector graphics. As shown in fig. 1, the method of this embodiment may include:
and S110, receiving a collecting instruction.
In this embodiment, vector graphics can be drawn through vector graphics software, and a collection instruction sent by a user can be received, so as to record the vector graphics in the drawing process.
And S120, acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on the canvas according to the acquisition instruction and the touch sensing signal to acquire a first dynamic vector graph.
In this embodiment, taking a processing device of vector graphics as a terminal device with a touch screen as an example, description will be given of drawing graphics: when a user starts to draw a graph on a blank canvas, when a finger starts to touch a screen and slides, the device acquires a touch sensing signal generated when the user touches the screen, and acquires a vector graph drawn on the canvas according to an acquisition instruction and the touch sensing signal triggered by the user before to acquire a first dynamic vector graph.
S130, acquiring a corresponding first dynamic data frame according to the first dynamic vector graph, and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, a first time and a dynamic vector graphics identifier, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
In this embodiment, recording of the vector graphics is generally based on acquisition and recording of the vector graphics, and image frames corresponding to the vector graphics are acquired and stored in the prior art, which may occupy a large storage space; in the method provided by this embodiment, a dynamic data frame corresponding to a collected first dynamic vector graphic is obtained according to the collected first dynamic vector graphic, where the data frame includes vector data corresponding to the first dynamic vector graphic, a first time, and a dynamic vector graphic identifier, and fig. 2 is a schematic structural diagram of a data frame provided in an embodiment of the present invention; specifically, the vector data is a regular data string formed by converting relative coordinates and combination rules of dynamic vector graphics in drawing into numbers and letters, and the vector data and the vector graphics can be converted into each other through a certain algorithm rule, wherein the first time is the recorded drawing time of the first dynamic vector graphics, specifically the time when the user touches the screen, or the time length when the user slides on the screen. Different from the prior art, in the embodiment, the first dynamic vector graphics are converted into the data frames and then stored in the vector data file in the form of the data structure, so that the occupation of the storage space is reduced.
In the processing method for the vector graphics provided by this embodiment, the dynamic vector graphics during drawing are acquired through the received acquisition instruction and the touch sensing signal generated by the screen triggered by the user, the acquired dynamic vector graphics are converted into a dynamic data frame form, and the dynamic vector graphics are stored in the vector data file in the form of a data structure, so that the problem of increased storage space caused by the way of storing the vector graphics in the image frame in the prior art is solved, the storage space occupied by the stored vector graphics is reduced, and the service performance of the terminal device for recording the vector graphics is improved.
Further, in another embodiment of the present invention, on the basis of the embodiment shown in fig. 1, the method further includes:
if the current user stops touching the screen, acquiring a first static vector graph on the current canvas, acquiring a corresponding first static data frame according to the first static vector graph or all static vector graphs stored in the first static vector graph and the vector data file, and storing the first static data frame in the vector data file; wherein the first static data frame includes vector data corresponding to the first static vector graphic, a second time, and a static vector graphic identifier; or the first static data frame includes vector data corresponding to the first static vector graphic, vector data corresponding to all static vector graphics stored before, the second time, and the static vector graphic identifier; the second time comprises the time corresponding to the current time when the user stops touching the screen.
It should be noted that the vector graphics currently drawn by the user are dynamic vector graphics, and when the user finishes drawing the current dynamic vector graphics, the dynamic vector graphics are converted into static vector graphics.
Fig. 3 is a vector graph provided by the method shown in fig. 1 of the present invention, and fig. 4 is a vector data file corresponding to the vector graph provided by the method shown in fig. 1 of the present invention, so as to illustrate a process of drawing the vector graph shown in fig. 3 on a canvas by a user, which illustrates a processing method of the vector graph provided by this embodiment; when a user triggers a point one position of a screen, recording a vector graph at the moment of triggering the point to generate a data frame 1, wherein the data frame 1 comprises a dynamic vector graph identifier, the corresponding time comprises the time when a finger touches the point one position of the screen, and the vector data comprises vector data corresponding to a line one (point one), and similarly, data frames 2-8 in a vector data file can be obtained; it should be noted that the data frame 4 is generated when the user stops drawing the line one, and the line one is converted from a dynamic vector graph into a static vector graph, so that the vector data of the data frames 3 and 4 are the same, and the graph identifier and time are different; in addition, the data frame 8 is generated when the user stops drawing the line two, at this time, the line two is converted into a static vector graphic from a dynamic vector graphic, and different from the data frame 4, the vector data of the data frame 8 comprises the vector data corresponding to the line two converted into the static vector graphic and the vector data corresponding to the static vector graphic line I stored before; in a specific implementation, the data frame further includes a separator for separating the statements between the two data frames, when the vector data file is read, the separator is used as an interval for reading and analyzing the data frames, and when the vector data file is recorded, the separator of the last data frame is a cut-off.
In the processing method of the vector graphics provided in this embodiment, the collection of the dynamic vector graphics is to record the currently drawn dynamic vector graphics, and the collection of the static vector graphics not only records the currently generated static vector graphics, but also records all the static vector graphics stored on the canvas.
FIG. 5 is a flowchart illustrating a method for processing vector graphics according to another embodiment of the present invention. As shown in fig. 5, the method of this embodiment may include:
and S210, receiving a collecting instruction.
S220, acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal to acquire a first dynamic vector graph.
S230, acquiring a corresponding first dynamic data frame according to the first dynamic vector graph, and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, a first time and a dynamic vector graphics identifier, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
S240, if the user stops touching the screen at present, acquiring a first static vector graph on the current canvas, acquiring a corresponding first static data frame according to the first static vector graph or the first static vector graph and all static vector graphs stored in the vector data file, and storing the first static data frame in the vector data file; the first static data frame comprises the first static vector graphics, vector data corresponding to all the stored static vector graphics, a second time and a static vector graphics identifier.
And S250, receiving an editing instruction, wherein the editing instruction comprises M vector graphics to be edited and corresponding editing parameters.
In the method for processing a vector graphic provided in this embodiment, a user may also edit a vector graphic that has been already drawn, and all the finished vector graphics are static vector graphics before editing, for example, the user may send an editing instruction to M finished vector graphics on a canvas, where the editing instruction includes the M vector graphics to be edited and corresponding editing parameters.
And S260, editing the corresponding vector graphics to be edited on the canvas according to the editing parameters in sequence, and collecting the edited vector graphics in sequence to obtain the corresponding second dynamic vector graphics.
S270, acquiring corresponding second dynamic data frames according to the M second dynamic vector graphs, and storing the second dynamic data frames in a vector data file; the second dynamic data frame comprises the sum of the vector data corresponding to the M second dynamic vector graphics, a third time and a dynamic vector graphics identifier, wherein the third time comprises the time length for editing the vector graphics to be edited.
In this embodiment, M vector graphics to be edited indicated by an editing instruction are selected, the M static vector graphics are converted into dynamic vector graphics, and the selected M dynamic vector graphics are edited according to editing parameters in the editing instruction; in specific implementation, the editing processing on the selected vector graphics may be editing of the selected vector graphics by a user, such as stretching, moving, changing colors and shapes, and correspondingly, the edited vector graphics are collected again, and a corresponding second dynamic vector graphics is obtained and stored in a vector data file; in another method for processing a vector graphic provided in this embodiment, the selected vector graphic may be edited by a user through a preset algorithm rule on a vector level, specifically, the content of the vector data is edited, and accordingly, the edited data frame is directly stored in a vector data file.
In the processing method for the vector graphics provided by this embodiment, the dynamic vector graphics during drawing are acquired through the received acquisition instruction and the touch sensing signal generated by the screen triggered by the user, the acquired dynamic vector graphics are converted into a dynamic data frame form, and the dynamic vector graphics are stored in the vector data file in the form of a data structure, so that the problem of increased storage space caused by the way of storing the vector graphics in the image frame in the prior art is solved, the storage space occupied by the stored vector graphics is reduced, and the service performance of the terminal device for recording the vector graphics is improved. In addition, according to the selection and the editing of the received editing instruction, the data frame corresponding to the vector graphics is also stored after the editing, so that the resolution of the graphics can be ensured by editing the vector graphics, and the display effect of the vector graphics is ensured; furthermore, in the recording process of the vector graphics, when the vector graphics are changed, the vector graphics are acquired and converted and stored into data frames, so that the problem that a large amount of redundant data is stored due to the fact that image frames corresponding to the vector graphics captured every second are stored in the prior art is solved, and waste of storage space is reduced.
Further, in another embodiment of the present invention, on the basis of the embodiment shown in fig. 5, the method may further include:
s280, collecting other vector graphics except the vector graphics to be edited on the canvas, acquiring a corresponding second static data frame according to the other vector graphics, and storing the second static data frame in a vector data file; the second static data frame comprises the sum of vector data corresponding to other vector graphics, a fourth time and a static vector graphics identifier; the fourth time is the time when the user selects the first vector graphics to be edited.
It should be noted that, the number of the edited static vector graphics on the canvas is greater than or equal to M, where M static vector graphics included in the editing instruction are converted into dynamic vector graphics, and although other static vector graphics not included in the editing instruction are not changed, they need to be collected again and converted into data frames for storage according to the editing instruction of the vector graphics on the canvas.
FIG. 6 is a flowchart illustrating a method for processing vector graphics according to another embodiment of the present invention. As shown in fig. 6, the method may specifically include:
and S310, receiving a collecting instruction.
S320, acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on the canvas according to the acquisition instruction and the touch sensing signal to acquire a first dynamic vector graph.
S330, acquiring a corresponding first dynamic data frame according to the first dynamic vector graph, and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, a first time and a dynamic vector graphics identifier, wherein the first time comprises a time length from the time when the user touches the screen to the time when the user stops touching the screen.
S340, if the user stops touching the screen at present, acquiring a first static vector graph on the current canvas, acquiring a corresponding first static data frame according to the first static vector graph or the first static vector graph and all static vector graphs stored in the vector data file, and storing the first static data frame in the vector data file; the first static data frame comprises the first static vector graphics, vector data corresponding to all the stored static vector graphics, a second time and a static vector graphics identifier.
And S350, starting a timer to start timing.
In this embodiment, the recording instruction of the vector graphic is completed, and the vector graphic can be played back according to the saved vector data file, and the relative time generated by the vector graphic is recorded in the data frame during recording, so that the relative time during playback can be obtained in a manner of timing by a timer during playback.
And S360, reading the data frames from the data frames stored in the vector data file according to the received playback instruction in sequence.
In this embodiment, according to a received playback instruction of a user for a vector graphic, reading stored data frames from a vector data file corresponding to the vector graphic, and generally reading and analyzing the data frames sequentially according to an acquisition order; in a specific implementation, a part of the data frames may be read first, and then the data frames may be sequentially analyzed according to the order of the data frames.
S370, acquiring the time in the read data frame, and acquiring the relative time recorded by the timer when the data frame is read.
S380, if the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is less than or equal to zero, loading the vector data in the data frame.
In the present embodiment, in the playback of the vector graphics, the relative time recorded by the timer may reflect the relative position with the time in the read data frame, so that, taking the time recorded by the timer as a time reference, the saved data frame is played back, and if the difference between the time in the data frame and the relative time recorded by the timer is less than or equal to zero, it indicates that the current time from the beginning of timing exceeds the relative time recorded by the data frame, and thus the vector data in the data frame is immediately loaded.
Similarly, the method for processing a vector graphic provided in this embodiment further includes:
s390, if the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is greater than zero, loading the vector data in the data frame after the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read.
It should be noted that in this embodiment, S380 and S390 have no explicit sequence.
For example, fig. 7 is a playback process of a vector graphic provided by the method shown in fig. 6 according to the present invention, and specifically plays back the vector data file provided in fig. 4. It should be noted that, the processing method of a vector graphics provided in this embodiment specifically includes, when vector data in a data frame is loaded: if the vector graphic identifier in the data frame is a static vector graphic identifier, emptying the canvas and then loading the vector data in the data frame; or, if the vector graphics identifier in the data frame is the dynamic vector graphics identifier, replacing the dynamic vector graphics corresponding to the vector data in the data frame with the dynamic vector graphics on the current canvas. For example, the vector graphic identifiers in the data frames 4 and 8 are static vector graphic identifiers, so that all vector graphics on the canvas need to be emptied, and then the vector data in the data frames are loaded, and since all vector graphics on the current canvas are stored for the static vector graphics during acquisition, all graphics in the recorded canvas can be displayed by emptying the canvas during playback; for another example, the vector graphics identifiers in the data frames 6 and 7 are dynamic vector graphics identifiers, when the data frame 7 is loaded, the vector graphics corresponding to the data frame 6 is displayed on the current canvas, the dynamic vector graphics in the data frame 6 is replaced by the dynamic vector graphics corresponding to the data frame 7, and the static vector graphics in the data frame 7 is the same as the data frame 6, and therefore remains unchanged.
In the processing method for the vector graphics provided by this embodiment, the dynamic vector graphics during drawing are acquired through the received acquisition instruction and the touch sensing signal generated by the screen triggered by the user, the acquired dynamic vector graphics are converted into a dynamic data frame form, and the dynamic vector graphics are stored in the vector data file in the form of a data structure, so that the problem of increased storage space caused by the way of storing the vector graphics in the image frame in the prior art is solved, the storage space occupied by the stored vector graphics is reduced, and the service performance of the terminal device for recording the vector graphics is improved. In addition, according to the data frames stored in the vector data file, the corresponding vector graphics are played back, the playback process is the same as the sequence of recording the data frames, and the dynamic display effect can clearly show the drawing process; further, vector graphics stored in the form of data frames are displayed in a zooming mode during playback, the vector graphics are displayed on the basis of the vector data in the data frames, and the resolution of the vector graphics during playback and the display effect of a screen can be guaranteed.
Further, in the processing method of the vector graphics provided in each of the embodiments of the present invention, when the vector graphics drawn on the canvas are collected according to the collection instruction, the voice information during drawing the vector graphics may also be recorded, where the voice information may specifically be explanation of the drawing process of the vector graphics, and the like; correspondingly, when the vector data file corresponding to the vector graphics is read according to the playback instruction, the recorded voice information can also be read, and the voice information and the vector graphics are played back at the same time.
Fig. 8 is a schematic structural diagram of an embodiment of a vector graphics processing apparatus according to the present invention. As shown in fig. 8, the processing apparatus for vector graphics provided in this embodiment specifically includes: the device comprises a receiving module 11, an acquisition module 12 and a dynamic data frame acquisition module 13.
The receiving module 11 is configured to receive an acquisition instruction.
The acquisition module 12 is configured to acquire a touch sensing signal generated by a user triggering a screen, and acquire a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal received by the receiving module 11, so as to acquire a first dynamic vector graph.
A dynamic data frame obtaining module 13, configured to obtain a corresponding first dynamic data frame according to the first dynamic vector graph collected by the collecting module 12, and store the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, a first time and a dynamic vector graphics identifier, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
The vector graphics processing apparatus according to the embodiment of the present invention is configured to execute the vector graphics processing method according to the embodiment of fig. 1 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Fig. 9 is a schematic structural diagram of a vector graphics processing apparatus according to another embodiment of the present invention. The vector graphics processing apparatus provided in this embodiment is based on the apparatus structure shown in fig. 8, and the apparatus further includes:
a static data frame obtaining module 14, configured to, when the user stops touching the screen at present, collect a first static vector graphic on a current canvas, obtain a corresponding first static data frame according to the first static vector graphic, or the first static vector graphic and all static vector graphics stored in the vector data file, and store the first static data frame in the vector data file; wherein the first static data frame includes vector data corresponding to the first static vector graphics, a second time, and a static vector graphics identifier; or the first static data frame includes vector data corresponding to the first static vector graphic, vector data corresponding to all static vector graphics stored before, the second time, and the static vector graphic identifier; the second time comprises the time corresponding to the current time when the user stops touching the screen.
It should be noted that the vector graphics currently drawn by the user are dynamic vector graphics, and when the user finishes drawing the current dynamic vector graphics, the dynamic vector graphics are converted into static vector graphics.
Preferably, the receiving module 11 is further configured to receive an editing instruction, where the editing instruction includes M vector graphics to be edited and corresponding editing parameters.
The apparatus may further include: and the processing module 15 is configured to sequentially edit the corresponding vector graphics to be edited on the canvas according to the editing parameters received by the receiving module 11, and sequentially collect the edited vector graphics to obtain a corresponding second dynamic vector graphics.
In this embodiment, correspondingly, the dynamic data frame obtaining module 13 is further configured to obtain, according to the M second dynamic vector graphics, a corresponding second dynamic data frame, and store the second dynamic data frame in the vector data file; the second dynamic data frame comprises the sum of the vector data corresponding to the M second dynamic vector graphics, a third time and a dynamic vector graphics identifier, wherein the third time comprises the time length for editing the vector graphics to be edited.
The vector graphics processing apparatus according to the embodiment of the present invention is configured to execute the vector graphics processing method according to the embodiment of fig. 5 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
FIG. 10 is a flowchart illustrating a vector graphics processing apparatus according to another embodiment of the present invention. The vector graphics processing device provided by the embodiment is based on the device structure shown in fig. 9,
the processing module 15 is further configured to collect other vector graphics on the canvas besides the vector graphics to be edited; correspondingly, the static data frame obtaining module 14 is further configured to obtain a corresponding second static data frame according to the other vector graphics, and store the second static data frame in the vector data file; wherein the second static data frame includes a sum of vector data corresponding to the other vector graphics, a fourth time, and a static vector graphics identifier; the fourth time is a time when the user selects the first vector graphics to be edited.
It should be noted that, the number of the edited static vector graphics on the canvas is greater than or equal to M, where M static vector graphics included in the editing instruction are converted into dynamic vector graphics, and although other static vector graphics not included in the editing instruction are not changed, they need to be collected again and converted into data frames for storage according to the editing instruction of the vector graphics on the canvas.
Preferably, the apparatus may further comprise:
and the timing module 16 is used for starting a timer to start timing.
And a reading module 17, configured to read data frames in sequence from the data frames stored in the vector data file according to the received playback instruction.
And a time obtaining module 18, configured to obtain the time in the read data frame, and obtain the relative time recorded by the timer when the data frame is read.
And a loading module 19, configured to load the vector data in the data frame when a difference between a time in the data frame and a relative time recorded by the timer when the data frame is read is less than or equal to zero.
The loading module 19 is further configured to load the vector data in the data frame after the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is greater than zero.
It should be noted that, in the processing apparatus for vector graphics provided in this embodiment, when the loading module 19 loads the vector data in the data frame, the processing apparatus specifically includes: if the vector graphic identifier in the data frame is a static vector graphic identifier, emptying the canvas and then loading the vector data in the data frame; or, if the vector graphics identifier in the data frame is a dynamic vector graphics identifier, replacing the dynamic vector graphics corresponding to the vector data in the data frame with the dynamic vector graphics on the current canvas.
The vector graphics processing apparatus according to the embodiment of the present invention is configured to execute the vector graphics processing method according to the embodiment of fig. 6 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Further, the vector graphics processing apparatus provided in each of the above embodiments of the present invention may further include: the voice recording module is used for recording voice information when the vector graphics are drawn when the vector graphics drawn on the canvas are collected according to the collection instruction, and the voice information can be specifically explanation of the vector graphics drawing process and the like; correspondingly, when the reading module reads the vector data file corresponding to the vector graphics according to the playback instruction, the reading module can also read the recorded voice information, so that the loading module can play back the voice information and the vector graphics at the same time.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. A method for processing vector graphics, comprising:
receiving an acquisition instruction;
acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal to acquire a first dynamic vector graph;
acquiring a corresponding first dynamic data frame according to the first dynamic vector graph, and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, first time and dynamic vector graphics identification, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
2. The method of claim 1, further comprising:
if the user stops touching the screen at present, acquiring a first static vector graph on the current canvas, acquiring a corresponding first static data frame according to the first static vector graph or the first static vector graph and all static vector graphs stored in the vector data file, and storing the first static data frame in the vector data file;
wherein the first static data frame includes vector data corresponding to the first static vector graphics, a second time, and a static vector graphics identification; or the first static data frame includes vector data corresponding to the first static vector graphics, vector data corresponding to all static vector graphics stored before, the second time, and the static vector graphics identifier;
the second time comprises the time corresponding to the current time when the user stops touching the screen.
3. The method of claim 2, further comprising:
receiving an editing instruction, wherein the editing instruction comprises M vector graphics to be edited and corresponding editing parameters;
sequentially editing the corresponding vector graphics to be edited on the canvas according to the editing parameters, and sequentially collecting the edited vector graphics to obtain corresponding second dynamic vector graphics;
acquiring corresponding second dynamic data frames according to the M second dynamic vector graphs, and storing the second dynamic data frames in a vector data file; the second dynamic data frame comprises the sum of vector data corresponding to M second dynamic vector graphics, third time and dynamic vector graphics identification, and the third time comprises the time length for editing the vector graphics to be edited.
4. The method of claim 3, further comprising:
acquiring other vector graphics on the canvas except the vector graphics to be edited, acquiring a corresponding second static data frame according to the other vector graphics, and storing the second static data frame in the vector data file;
wherein the second static data frame includes a fourth time and a static vector graphics identifier, and a sum of vector data corresponding to the other vector graphics; and the fourth time is the time when the user selects the first vector graph to be edited.
5. The method of any of claims 1 to 4, further comprising:
starting a timer to start timing;
reading data frames from the data frames stored in the vector data file according to the collected sequence according to the received playback instruction;
acquiring time in the read data frame and acquiring relative time recorded by the timer when the data frame is read;
and if the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is less than or equal to zero, loading the vector data in the data frame.
6. The method of claim 5, further comprising:
and if the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is larger than zero, loading the vector data in the data frame after the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is subtracted.
7. The method of claim 6, wherein the loading vector data in the data frame comprises:
if the vector graphic identifier in the data frame is a static vector graphic identifier, emptying the canvas and then loading the vector data in the data frame; or,
and if the vector graphic identifier in the data frame is a dynamic vector graphic identifier, replacing the dynamic vector graphic corresponding to the vector data in the data frame with the dynamic vector graphic on the current canvas.
8. A vector graphics processing apparatus, comprising:
the receiving module is used for receiving an acquisition instruction;
the acquisition module is used for acquiring a touch sensing signal generated by a user triggering a screen, and acquiring a vector graph drawn on a canvas according to the acquisition instruction and the touch sensing signal received by the receiving module to acquire a first dynamic vector graph;
the dynamic data frame acquisition module is used for acquiring a corresponding first dynamic data frame according to the first dynamic vector graph acquired by the acquisition module and storing the first dynamic data frame in a vector data file; the first dynamic data frame comprises vector data corresponding to the collected first dynamic vector graphics, first time and dynamic vector graphics identification, wherein the first time comprises the time when the user touches the screen or the time length when the user slides on the screen.
9. The apparatus of claim 8, further comprising:
a static data frame obtaining module, configured to, when the user stops touching the screen at present, collect a first static vector graphic on a current canvas, obtain a corresponding first static data frame according to the first static vector graphic or the first static vector graphic and all static vector graphics stored in the vector data file, and store the first static data frame in the vector data file;
wherein the first static data frame includes vector data corresponding to the first static vector graphics, a second time, and a static vector graphics identification; or the first static data frame includes vector data corresponding to the first static vector graphics, vector data corresponding to all static vector graphics stored before, the second time, and the static vector graphics identifier;
the second time comprises the time corresponding to the current time when the user stops touching the screen.
10. The apparatus according to claim 9, wherein the receiving module is further configured to receive an editing instruction, where the editing instruction includes M vector graphics to be edited and corresponding editing parameters;
the apparatus further comprises:
the processing module is used for sequentially editing the corresponding vector graphics to be edited on the canvas according to the editing parameters received by the receiving module, and sequentially collecting the edited vector graphics to obtain the corresponding second dynamic vector graphics;
the dynamic data frame acquisition module is further used for acquiring corresponding second dynamic data frames according to the M second dynamic vector graphs and storing the second dynamic data frames in a vector data file; the second dynamic data frame comprises the sum of vector data corresponding to M second dynamic vector graphics, third time and dynamic vector graphics identification, and the third time comprises the time length for editing the vector graphics to be edited.
11. The apparatus according to claim 10, wherein the processing module is further configured to collect other vector graphics on the canvas besides the vector graphics to be edited;
the static data frame acquisition module is further used for acquiring a corresponding second static data frame according to the other vector graphics and storing the second static data frame in the vector data file;
wherein the second static data frame includes a fourth time and a static vector graphics identifier, and a sum of vector data corresponding to the other vector graphics; and the fourth time is the time when the user selects the first vector graph to be edited.
12. The apparatus of any one of claims 8 to 11, further comprising:
the timing module is used for starting a timer to start timing;
the reading module is used for reading data frames from the data frames stored in the vector data file according to the received playback instruction and the collection sequence;
the time acquisition module is used for acquiring the time in the read data frame and acquiring the relative time recorded by the timer when the data frame is read;
and the loading module is used for loading the vector data in the data frame when the difference between the time in the data frame and the relative time recorded by the timer when the data frame is read is less than or equal to zero.
13. The apparatus of claim 12, wherein the loading module is further configured to load the vector data in the data frame after the difference between the time in the data frame minus the relative time recorded by the timer when the data frame is read is greater than zero.
14. The apparatus according to claim 13, wherein the loading module, when loading the vector data in the data frame, specifically includes:
if the vector graphic identifier in the data frame is a static vector graphic identifier, emptying the canvas and then loading the vector data in the data frame; or,
and if the vector graphic identifier in the data frame is a dynamic vector graphic identifier, replacing the dynamic vector graphic corresponding to the vector data in the data frame with the dynamic vector graphic on the current canvas.
CN201310493117.3A 2013-10-18 2013-10-18 The processing method and processing device of vector graphics Expired - Fee Related CN104572715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310493117.3A CN104572715B (en) 2013-10-18 2013-10-18 The processing method and processing device of vector graphics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310493117.3A CN104572715B (en) 2013-10-18 2013-10-18 The processing method and processing device of vector graphics

Publications (2)

Publication Number Publication Date
CN104572715A CN104572715A (en) 2015-04-29
CN104572715B true CN104572715B (en) 2017-09-15

Family

ID=53088803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310493117.3A Expired - Fee Related CN104572715B (en) 2013-10-18 2013-10-18 The processing method and processing device of vector graphics

Country Status (1)

Country Link
CN (1) CN104572715B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874477B (en) * 2017-05-11 2021-06-15 武汉斗鱼网络科技有限公司 Method and device for displaying static pictures and dynamic pictures
CN113590005B (en) * 2021-07-22 2023-07-14 齐鲁空天信息研究院 Labeling method and device of polygonal vector map, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7817158B1 (en) * 1998-10-23 2010-10-19 Autodesk, Inc. Specifying operations to be applied to the attributes of a set of objects
CN102129705A (en) * 2010-01-18 2011-07-20 腾讯科技(深圳)有限公司 Animation production method and device, and animation playing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070047463A (en) * 2005-11-02 2007-05-07 삼성전자주식회사 Apparatus for forming scene-based vector animation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7817158B1 (en) * 1998-10-23 2010-10-19 Autodesk, Inc. Specifying operations to be applied to the attributes of a set of objects
CN102129705A (en) * 2010-01-18 2011-07-20 腾讯科技(深圳)有限公司 Animation production method and device, and animation playing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
动漫图形编辑器的开发;金柳;《中国优秀硕士学位论文全文数据库 信息科技辑》;20071115;第2007年卷(第05期);全文 *
高分辨率图像特征提取和VG重构技术研究;童庆等;《计算机应用与软件》;20130715(第07期);全文 *

Also Published As

Publication number Publication date
CN104572715A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN102116783B (en) Waveform display method
CN103428460B (en) The video recording method and recording device of output video signal sequence are recorded for image capture module
CN107704203B (en) Deletion method, device and equipment for aggregated large file and computer storage medium
CN109672902A (en) A kind of video takes out frame method, device, electronic equipment and storage medium
CN104185088B (en) A kind of method for processing video frequency and device
JP5704863B2 (en) Image processing apparatus, image processing method, and storage medium
CN104980681A (en) Video acquisition method and video acquisition device
CN103338408A (en) Method, system and mobile terminal for selecting video preview frames
CN108521578A (en) It can textures region, the method for realizing textures in video in a kind of detection video
CN104572715B (en) The processing method and processing device of vector graphics
CN106879263A (en) A kind of image pickup method and mobile device
CN113741753A (en) Revocation method, electronic device, storage medium, and computer program product
CN108364338A (en) A kind of processing method of image data, device and electronic equipment
US20230396861A1 (en) Method and device for generating video preview content, computer device and storage medium
JP2006087069A5 (en)
KR20150089598A (en) Apparatus and method for creating summary information, and computer readable medium having computer program recorded therefor
CN106961567A (en) Animated image generation method and device
CN111263211A (en) Method for caching video data and terminal equipment
US8818174B2 (en) Reproduction apparatus and control method therefor
CN104796754A (en) Collected page display method and collected page display device
CN110197459B (en) Image stylization generation method and device and electronic equipment
US10958955B1 (en) System for generating modified video output
CN104392410B (en) Picture integration method, skin method for drafting and equipment in integumentary system
CN115237826A (en) Automatic application cache cleaning method and related equipment
CN1812530B (en) Display control apparatus and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220616

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170915

CF01 Termination of patent right due to non-payment of annual fee