CN109492205A - The dynamic drafting method and device of text calculate equipment and readable medium - Google Patents
The dynamic drafting method and device of text calculate equipment and readable medium Download PDFInfo
- Publication number
- CN109492205A CN109492205A CN201811063023.1A CN201811063023A CN109492205A CN 109492205 A CN109492205 A CN 109492205A CN 201811063023 A CN201811063023 A CN 201811063023A CN 109492205 A CN109492205 A CN 109492205A
- Authority
- CN
- China
- Prior art keywords
- path
- target text
- drafting
- drawing path
- text
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The present invention provides the dynamic drafting method and device, calculating equipment and readable medium of a kind of text.Its method includes: that the drawing path sequence of target text to be drawn is obtained using the tool in operating system;According to the display position of target text, the path length of each section of drawing path in drawing path sequence is counted;Regulation parameter, the path length of each section of drawing path are drawn according to preset, dynamic draws target text, with display.Technical solution of the present invention does not have to user and carries out personalized realization, can realize that the dynamic of text is drawn using the tool of operating system itself, have very strong versatility, very easy to use, so as to effectively enhance the using experience degree of user.
Description
Technical field
The present invention relates to the dynamic drafting methods and device of computer application technology more particularly to a kind of text, meter
Calculate equipment and readable medium.
Background technique
Constantly improve for hardware device and continually developing for various software applications with intelligent terminal, so that mobile whole
End using more more and more universal, also greatly facilitated people's lives.
The mobile terminal of the prior art mostly uses andriod ios operating system.In existing mobile terminal, text
This display is main to be shown by the way of static status display.But in some special screnes, in video scene, if user needs
Dynamically Announce text is wanted, and the system of mobile terminal itself does not provide the mode of dynamic rendering text, therefore, it is necessary to users certainly
Oneself goes to realize the scheme of a Dynamically Announce text, realizes that process is again more complicated.
Summary of the invention
The present invention provides the dynamic drafting method and device, calculating equipment and readable medium of a kind of text, for providing one
The dynamic of the general text of kind draws scheme, goes to realize again without user, very easy to use.
The present invention provides a kind of dynamic drafting method of text, which comprises
Using the tool in operating system, the drawing path sequence of target text to be drawn is obtained;
According to the display position of the target text, the path length of each section of drawing path in the drawing path sequence is counted
Degree;
Regulation parameter, the path length of each section of drawing path are drawn according to preset, dynamically draws the target text
This, with display.
Still optionally further, in method as described above, according to the display position of the target text, the drafting is counted
The path length of each section of drawing path in path sequence, comprising:
According to the display position of the target text, the display size of the target text is obtained;
According to the display size of the display position of the target text and the target text, the target text is determined
The coordinate information of point in each section of drawing path;
According to the coordinate information of the point in each section of drawing path, statistics can surround the drawing path of corresponding segment
On all the points closed loop path perimeter, the length of the drawing path as corresponding segment.
Still optionally further, in method as described above, parameter, each section of drawing path are regulated and controled according to preset drafting
Path length, dynamically draw the target text, comprising:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting and the drawing path total length, drafting progress is controlled, realizes that dynamic is drawn
The target text.
Still optionally further, in method as described above, parameter, each section of drawing path are regulated and controled according to preset drafting
Path length, dynamically draw the target text, comprising:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting, progress regulation parameter and the drawing path total length are drawn, control is drawn
Progress realizes that dynamic draws the target text.
Still optionally further, in method as described above, according to the overall duration of preset drafting, progress regulation parameter is drawn
With the drawing path total length, speed is drawn in control, and before realizing that dynamic draws the target text, the method is also wrapped
It includes:
The preset overall duration of the drafting and the drafting progress for receiving user's input regulate and control parameter.
The present invention also provides a kind of dynamic drawing apparatus of text, which is characterized in that described device includes:
Module is obtained, for obtaining the drawing path sequence of target text to be drawn using the tool in operating system;
Statistical module is counted in the drawing path sequence and is drawn for each section for the display position according to the target text
The path length in path processed;
Drafting module is dynamically drawn for drawing regulation parameter, the path length of each section of drawing path according to preset
The target text is made, with display.
Still optionally further, in device as described above, the statistical module is used for:
According to the display position of the target text, the display size of the target text is obtained;
According to the display size of the display position of the target text and the target text, the target text is determined
The coordinate information of point in each section of drawing path;
According to the coordinate information of the point in each section of drawing path, statistics can surround the drawing path of corresponding segment
On all the points closed loop path perimeter, the length of the drawing path as corresponding segment.
Still optionally further, in device as described above, the drafting module is used for:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting and the drawing path total length, drafting progress is controlled, realizes that dynamic is drawn
The target text.
Still optionally further, in device as described above, the drafting module is used for:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting, progress regulation parameter and the drawing path total length are drawn, control is drawn
Progress realizes that dynamic draws the target text.
Still optionally further, in device as described above, further includes:
Receiving module, for receiving the preset overall duration of the drafting and drafting progress regulation ginseng of user's input
Number.
The present invention also provides a kind of calculating equipment, comprising:
Processor;And
Memory is stored thereon with executable code, when the executable code is executed by the processor, makes described
Processor executes method described in any one as above.
The present invention also provides a kind of non-transitory machinable mediums, are stored thereon with executable code, when described
When executable code is executed by the processor of electronic equipment, the processor is made to execute as above described in any item methods.
The dynamic drafting method and device of text of the invention calculate equipment and readable medium, by utilizing operating system
In tool, obtain the drawing path sequence of target text to be drawn;According to the display position of target text, statistics draws road
The path length of each section of drawing path in diameter sequence;Regulation parameter, the path length of each section of drawing path are drawn according to preset,
Dynamic draws target text, with display.Technical solution of the present invention does not have to user and carries out personalized realization, using operating system
The tool of itself can realize that the dynamic of text is drawn, and have very strong versatility, very easy to use, so as to effective
The using experience degree of ground enhancing user.
Detailed description of the invention
Disclosure illustrative embodiments are described in more detail in conjunction with the accompanying drawings, the disclosure above-mentioned and its
Its purpose, feature and advantage will be apparent, wherein in disclosure illustrative embodiments, identical reference label
Typically represent same parts.
Fig. 1 is the flow chart of the dynamic drafting method embodiment one of text of the invention.
Fig. 2 is the flow chart of the dynamic drafting method embodiment two of text of the invention.
Fig. 3 is the flow chart of the dynamic drafting method embodiment three of text of the invention.
Fig. 4 is the flow chart of the dynamic drawing apparatus embodiment one of text of the invention.
Fig. 5 is the flow chart of the dynamic drawing apparatus embodiment two of text of the invention.
Fig. 6 shows the calculating equipment that an embodiment according to the present invention can be used for realizing the dynamic drafting method of above-mentioned text
Structural schematic diagram.
Specific embodiment
The preferred embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Preferred embodiment, however, it is to be appreciated that may be realized in various forms the disclosure without the embodiment party that should be illustrated here
Formula is limited.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and can be by the disclosure
Range is completely communicated to those skilled in the art.
Fig. 1 is the flow chart of the dynamic drafting method embodiment one of text of the invention.As shown in Figure 1, the present embodiment
The dynamic drafting method of text, can specifically include following steps:
S100, using the tool in operating system, obtain the drawing path sequence of target text to be drawn;
S101, the display position according to target text count the path length of each section of drawing path in drawing path sequence;
S102, regulation parameter, the path length of each section of drawing path are drawn according to preset, dynamic draws target text,
With display.
The execution theme of the dynamic drafting method of the text of the present embodiment is the dynamic drawing apparatus of text, and the text is moved
State drawing apparatus can be adapted in the mobile terminal of andriod ios operating system, for overcoming the movement of the prior art
The defect of the dynamic drawing process complexity of text in terminal.The dynamic drafting method of the text of the present embodiment can be used as mobile whole
The dynamic of text that can be general in end system draws scheme, in some scenes shown such as video text, does not have to user certainly
Oneself goes to realize, very easy to use.
The dynamic rendering text of the present embodiment is that the text in text is split as stroke to show, to realize dynamic
State is drawn.Such as in the place for requiring emphasis effect, the display of text is realized by way of dynamic rendering text, it can be fine
Attraction user.
Firstly, obtaining the drawing path sequence of target text to be drawn in the present embodiment;With Chinese for target text
It originally can be a Chinese character, or multiple Chinese characters, the drawing path sequence of target text, which refers to, draws target text
Produce the stroke order sequence come.That is, in the operating system of mobile terminal, path is the stroke of text or the group of stroke
It closes.It should be noted that in different operating system, in andriod and ios, the path of the same text may not phase
Together.All paths of target text are arranged according to the sequence drawn from front to back, just constitute the drawing path sequence of target text.
For example, storing the path of drafting by this class of Path in Android platform.Specifically, system exists
GetTextPath (String text, int are provided in Paint (being equivalent to paintbrush, user draws anything on interface)
Start, int end, float x, float y, Path path) function, it is equivalent to the path for obtaining a text;Wherein:
Text: text is represented;Which start: represent since text;End: which end of text represented;X: it represents text and opens
The x coordinate (x coordinate in the upper left corner) of beginning;Y: the y-coordinate (y-coordinate in the upper left corner) that text starts is represented.
Path is exactly for storing the text path information got by function getTextPath, finally by text
All paths are arranged according to the sequence drawn from front to back, obtain the drawing path sequence of text.Accordingly, it can use
TextPath indicates drawing path.
The scheme of above-described embodiment be by taking Android platform as an example, in practical application, ios platform or other platforms
The drawing path sequence of target text can be obtained by similar function, no longer citing repeats one by one herein.
Dynamic draw target text when, can only draw two texts at entire interface, it is also possible in webpage certain
A line draws a string literal, so obstructed display position, the size of the target text to be drawn out is not identical, corresponding mesh
The path length for marking text is not also just identical.So specifically drawing path sequence can be counted with the display position of reference target text
The path length of each section of drawing path in column.
It, can be based on every in drawing path sequence after obtaining the path length of all drawing paths of target text
The path length of one section of drawing path, according to the sequence of each section of drawing path in drawing path sequence, dynamic draws target text
Word.In addition, user can also draw demand according to practical, and regulation parameter is drawn in setting, to regulate and control to draw before dynamic is drawn
Journey.When specific implementation, for user after the function of opening dynamic drafting text, mobile terminal can pop up a drafting regulation ginseng
The default value for drawing regulation parameter can be set in the dialog box for several dialog boxes, if user agrees to use default value, directly
It clicks and determines.Otherwise, if user needs to modify drafting regulation parameter, directly in dialog box according to the needs of current scene
Regulation parameter is drawn in middle modification, and is clicked and determined.It, can also be real using other implementations in certain practical application
Existing dynamic regulation parameter is preset, and no longer citing repeats one by one herein.
For example, may include drawing overall duration in the drafting regulation parameter of the present embodiment, draws overall duration and specifically may be used
Other durations thinking 5s or 3s or being arranged according to the number of specific target text.In practical application, it can set
The higher default value for drawing overall duration of a frequency of use is set, it is user-friendly.
It further optionally, can also include that drafting progress regulates and controls parameter, the drafting in the drafting regulation parameter of the present embodiment
Progress regulates and controls parameter for regulating and controlling the progress of drafting, that is to say, that corresponding at this time to be plotted as non-at the uniform velocity drawing.Drafting progress tune
Control parameter can be used in combination together with overall duration with drawing, and in different times in section, can control different drafting progresses,
Final realize draws regulation parameter, the path length of each section of drawing path according to preset, and dynamic draws target text, with aobvious
Show.
During the realization of the dynamic drafting method of the text of the present embodiment, only preset drafting regulation parameter needs to use
Family is gone to be arranged, remaining realization can be realized according to some tools of itself in operating system.For example, in android system
In, the drawing path sequence for obtaining target text to be drawn can be obtained from this class of Path by function getTextPath
It takes.According to the display position of target text, the path length of each section of drawing path in drawing path sequence is counted, letter can be passed through
Number PathMeasue.setPath (textPath, false), passes to PathMeasure for textPath and carries out statistics calculating.
Finally regulation parameter, the path length of each section of drawing path can be drawn according to preset, dynamic draws target text, and shows
Show.Therefore, the dynamic drafting method of the text of the present embodiment carries out personalized realization in use, not having to user, has very strong
Versatility, it is very easy to use.
The dynamic drafting method of the text of the present embodiment, by obtaining mesh to be drawn using the tool in operating system
Mark the drawing path sequence of text;According to the display position of target text, each section of drawing path is counted in drawing path sequence
Path length;Regulation parameter, the path length of each section of drawing path are drawn according to preset, dynamic draws target text, with aobvious
Show.The technical solution of the present embodiment is not had to user and carries out personalized realization, can realized using the tool of operating system itself
The dynamic of text is drawn, and has very strong versatility, very easy to use, so as to effectively enhance the usage experience of user
Degree.
Fig. 2 is the flow chart of the dynamic drafting method embodiment two of text of the invention.As shown in Fig. 2, the present embodiment
The dynamic drafting method of text is further introduced in further detail on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 1
Technical solution of the present invention.As shown in Fig. 2, step S101 is " according to target text in the dynamic drafting method of the text of the present embodiment
The display position of word counts the path length of each section of drawing path in drawing path sequence ", it can specifically include following steps:
S200, the display position according to target text obtain the display size of target text;
Specifically, due to too small region, it is impossible to hold the text importing of larger font, therefore the display of target text
Position limits the display size of target text, so showing position according to target text, the display of available target text is big
It is small.Specifically, since the font of each size has corresponding size, the area of display can be allowed according to display position
Domain obtains the size for capableing of the font of maximum display in this region, the display size as target text.
S201, according to the display position of target text and the display size of target text, determine that each section of target text is drawn
The coordinate information of point in path processed;
S202, according to the coordinate information of the point in each section of drawing path, statistics can surround on the drawing path of corresponding segment
All the points closed loop path perimeter, the length of the drawing path as corresponding segment.
Mesh can be determined according to the display position of target text and display size in the position that target text to be presented
Mark the coordinate information of the point in each section of drawing path in text.When specific implementation, can by the tool in operating system,
It is realized such as some functions in certain classes.
Drawing path be similar to a stroke handwriting when stroke, and the length of drawing path be just similar to it is hand-written
The length of stroke.But when dynamic drafting, each drawing path is presented, is not a simple line, but draw a packet
Enclose the closed loop path of all the points on drawing path.So the length of each drawing path in the present embodiment, is according to each
The coordinate information of point in section drawing path, statistics can surround the closed loop path of all the points on the drawing path of corresponding segment
Perimeter.Similarly, it can also be realized using the tool of operating system.
For example, this class of PathMeasure is provided in android system, for realizing drawing path Path is intercepted,
And the coordinate put on Path is obtained, the information such as tangent value.It is then possible to pass through function PathMeasue.setPath
TextPath is passed to the calculating that PathMeasure carries out path length by (textPath, false), wherein second parameter
False representative be not constrained that PathMeasure thinks that path is closed loop.It can by PathMeasue.getLength ()
To get the length of each section of drawing path.
The dynamic drafting method of the text of the present embodiment can draw target text by using above-mentioned technical proposal
The path length of each section of drawing path is obtained in path sequence processed, convenient for it is subsequent according to preset draftings regulate and control parameter, respectively
The path length of section drawing path, dynamic draw target text, with display.The technical solution of the present embodiment does not have to user and carries out
Personalization is realized, can realize that the dynamic of text is drawn using the tool of operating system itself, have very strong versatility, make
With very convenient, so as to effectively enhance the using experience degree of user.
Fig. 3 is the flow chart of the dynamic drafting method embodiment three of text of the invention.As shown in figure 3, the present embodiment
The dynamic drafting method of text is further introduced in further detail on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 1
Technical solution of the present invention.As shown in figure 3, step S102 is " according to preset in the dynamic drafting method of the text of the present embodiment
Regulation parameter, the path length of each section of drawing path are drawn, dynamic draws target text ", it can specifically include following steps:
S300, according to the path length of each section of drawing path, calculate the drawing path total length of target text;
S301, it is drawn according to the overall duration of preset drafting, drafting progress regulation parameter and drawing path total length, control
Progress realizes that dynamic draws target text.
It simultaneously include drawing overall duration and drafting progress regulation parameter with preset drafting regulation parameter in the present embodiment
For technical solution of the present invention described.In practical application, preset drafting regulation parameter can also only include drawing totally
Duration, at this point, corresponding step S301 is specifically as follows: according to the overall duration of preset drafting and drawing path total length, control
Drafting progress processed realizes that dynamic draws target text, and drawing process at this time, which may be considered, at the uniform velocity to be drawn, when drawing overall
In length, drafting progress is controlled in the way of at the uniform velocity drawing according to the overall duration of preset drafting and drawing path total length,
Realize that dynamic draws target text.
The drafting progress regulation parameter of the present embodiment is at the uniform velocity drawn for controlling target text dynamic drafting Shi Weifei.Such as
It will can at the uniform velocity draw the rendering request for being set as default.And under special screne, user's needs are non-at the uniform velocity to be drawn, such as progress tune
Control parameter can be set to preceding 1/2 duration need to complete 80% it is preceding it is fast after slow drafting or preceding 1/2 duration only need to complete
20% it is preceding it is slow after it is fast draw, accordingly at the uniform velocity, but the speed in the segmentation of each duration can for whole process right and wrong at this time
To be at the uniform velocity.Certainly, in practical application, in entire non-at the uniform velocity drawing process, multiple durations segmentations can be set, such as draw into
Degree regulation parameter may be arranged as the drafting that preceding 1/3 duration completes 20%, and intermediate 1/3 duration completes 30% drafting, and rear 1/3
Duration completes 50% drafting etc., no longer illustrates one by one herein.
In the present embodiment, parameter and drawing path total length are regulated and controled according to the overall duration of preset drafting, drafting progress,
Drafting progress can be controlled, under the rendering request defined by the progress of drafting regulation parameter, realizes that dynamic draws target text.
Still optionally further, " according to the overall duration of preset drafting, progress regulation parameter and drafting are drawn in step S301
Path total length controls drafting progress, realizes that dynamic draws target text " before, it can also include: the pre- of reception user's input
If drafting totality duration and draw progress regulate and control parameter.
For example, after user opens text dynamic drafting function, popping up dialog box, user is in dialog box when specific implementation
The middle overall duration of the preset drafting of input regulates and controls parameter with the progress of drafting.
For example, obtaining the drafting for working as leading portion further according to function PathMeasue.getLength () in andriod system
When the length in path, can also be looped to determine by nextContour () method in the drawing path sequence of target text whether
There are also next section of drawing paths, if so, according to being automatically moved on next section of path after calling the method, and continue with function
PathMeasue.getLength () obtains the length of next section of drawing path, and so on, target text can be counted on
Drawing path total length.Such as it when specific implementation, can realize in the following way:
In andriod system, control drafting progress in specific implementation, can create ValueAnimator, calculate
The drafting progress ratio progress that each time point completes in overall duration is drawn, which can be using between 0-1
One numerical value indicates that 0 indicates not start to draw, and 1 indicates to complete.Such as Word-Drawing 80%, it is corresponding to be using 0.8
Can, it can also be indicated in the form of 1-100% in practical application.It can specifically realize in the following way:
Since each progress ratio progress variation can all call invalidate () method, to trigger system calling
OnDraw () method is rewritten, and is completed further dynamic and is drawn.
When specific implementation, it can be calculated by currentLength=progress*totalLength current
The length of the corresponding drawing path for needing to complete of progress.Then reality is got by PathMeasure by the following method
Border needs the path finalPath drawn:
mPathMeasure.getSegment(0,currentLength,finalPath,true);
The path information of current advancements ratio can be thus stored in finalPath, eventually by
Canvas.drawPath (finalPath, Paint) can draw out the text style that current advancements ratio needs to draw, this
Sample, by controlling progress ratio progress, just the drafting text of dynamic.
Similarly, above-mentioned with andriod system is reason, in practical application, in ios or other systems, can also be used
Similar method realizes that no longer citing repeats one by one herein.
The dynamic drafting method of the text of the present embodiment can use operating system by using above-mentioned technical proposal
Tool realizes that the dynamic of text is drawn, and does not have to user and carries out personalized realization, therefore, the dynamic drafting side of the text of the present embodiment
Case has very strong versatility, very easy to use, so as to effectively enhance the using experience degree of user.
Fig. 4 is the flow chart of the dynamic drawing apparatus embodiment one of text of the invention.As shown in figure 4, the present embodiment
The dynamic drawing apparatus of text, can specifically include:
Module 10 is obtained to be used to obtain the drawing path sequence of target text to be drawn using the tool in operating system
Column;
Statistical module 11 is used for the display position according to target text, and statistics obtains the drawing path sequence that module 10 obtains
In each section of drawing path path length;
Drafting module 12 is used for according to the preset road for drawing regulation parameter, each section of drawing path that statistical module 11 counts
Electrical path length, dynamic draw target text, with display.
The dynamic drawing apparatus of the text of the present embodiment realizes that the dynamic of text is drawn by using above-mentioned module, and upper
The realization principle for stating related method embodiment is identical, can refer to the record of above-mentioned related method embodiment in detail, herein no longer
It repeats.
Fig. 5 is the flow chart of the dynamic drawing apparatus embodiment two of text of the invention.As shown in figure 4, the present embodiment
The dynamic drawing apparatus of text is further introduced in further detail on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 4
Technical solution of the present invention.
In the dynamic drawing apparatus of the text of the present embodiment, statistical module 11 is specifically used for:
According to the display position of target text, the display size of target text is obtained;
According to the display size of the display position of target text and target text, determines and obtain the target text that module 10 obtains
The coordinate information of point in the drawing path sequence of word in each section of drawing path;
According to the coordinate information of the point in each section of drawing path, statistics can surround all on the drawing path of corresponding segment
The perimeter of the closed loop path of point, the length of the drawing path as corresponding segment.
Still optionally further, in the dynamic drawing apparatus of the text of the present embodiment, drafting module 12 is specifically used for:
According to the path length for each section of drawing path that statistical module 11 counts, the drawing path overall length of target text is calculated
Degree;
According to the overall duration of preset drafting and drawing path total length, drafting progress is controlled, realizes that dynamic draws target
Text.
Still optionally further, in the dynamic drawing apparatus of the text of the present embodiment, drafting module 12 is specifically used for:
According to the path length for each section of drawing path that statistical module 11 counts, the drawing path overall length of target text is calculated
Degree;
According to the overall duration of preset drafting, progress regulation parameter and drawing path total length are drawn, controls drafting progress,
Realize that dynamic draws target text.
Still optionally further, as shown in figure 5, in the dynamic drawing apparatus of the text of the present embodiment, further includes:
Receiving module 13 is used to receive the preset drafting totality duration and drafting progress regulation parameter of user's input.
Accordingly, drafting module 12 is specifically used for according to the overall duration of the received preset drafting of receiving module 13, draws
Progress regulates and controls parameter and drawing path total length, controls drafting progress, realizes that dynamic draws target text.
The dynamic drawing apparatus of the text of the present embodiment realizes that the dynamic of text is drawn by using above-mentioned module, and upper
The realization principle for stating related method embodiment is identical, can refer to the record of above-mentioned related method embodiment in detail, herein no longer
It repeats.
Fig. 6 shows the calculating equipment that an embodiment according to the present invention can be used for realizing the dynamic drafting method of above-mentioned text
Structural schematic diagram.
Referring to Fig. 6, calculating equipment 1000 includes memory 1010 and processor 1020.
Processor 1020 can be the processor of a multicore, also may include multiple processors.In some embodiments,
Processor 1020 may include a general primary processor and one or more special coprocessors, such as graphics process
Device (GPU), digital signal processor (DSP) etc..In some embodiments, the circuit reality of customization can be used in processor 1020
It is existing, such as application-specific IC (ASIC, Application Specific Integrated Circuit) or scene
Programmable gate array (FPGA, Field Programmable Gate Arrays).
Memory 1010 may include various types of storage units, such as Installed System Memory, read-only memory (ROM), and
Permanent storage.Wherein, static data that other modules that ROM can store processor 1020 or computer need or
Instruction.Permanent storage can be read-write storage device.Permanent storage can be after computer circuit breaking
The non-volatile memory device of the instruction and data of storage will not be lost.In some embodiments, permanent storage device is adopted
Use mass storage device (such as magnetically or optically disk, flash memory) as permanent storage.In other embodiment, permanently
Storage device can be removable storage equipment (such as floppy disk, CD-ROM drive).Installed System Memory can be read-write storage equipment or
The read-write storage equipment of person's volatibility, such as dynamic random access memory.Installed System Memory can store some or all processing
The instruction and data that device needs at runtime.In addition, memory 1010 may include the group of any computer readable storage medium
It closes, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read only memory), disk
And/or CD can also use.In some embodiments, memory 1010 may include readable and/or write removable
Store equipment, such as laser disc (CD), read-only digital versatile disc (such as DVD-ROM, DVD-dual layer-ROM), read-only indigo plant
Light CD, super disc density, flash card (such as SD card, min SD card, Micro-SD card etc.), magnetic floppy disc etc..It calculates
Machine readable storage medium does not include carrier wave and the momentary electron signal by wirelessly or non-wirelessly transmitting.
It is stored with executable code on memory 1010, when executable code is handled by processor 1020, can make to locate
Reason device 1020 executes the dynamic drafting method for the text addressed above.
The dynamic that text according to the present invention above is described in detail by reference to attached drawing is drawn.
In addition, being also implemented as a kind of computer program or computer program product, the meter according to the method for the present invention
Calculation machine program or computer program product include the calculating for executing the above steps limited in the above method of the invention
Machine program code instruction.
Alternatively, the present invention can also be embodied as a kind of (or the computer-readable storage of non-transitory machinable medium
Medium or machine readable storage medium), it is stored thereon with executable code (or computer program or computer instruction code),
When the executable code (or computer program or computer instruction code) by electronic equipment (or calculate equipment, server
Deng) processor execute when, so that the processor is executed each step according to the above method of the present invention.
Those skilled in the art will also understand is that, various illustrative logical blocks, mould in conjunction with described in disclosure herein
Block, circuit and algorithm steps may be implemented as the combination of electronic hardware, computer software or both.
The flow chart and block diagram in the drawings show the possibility of the system and method for multiple embodiments according to the present invention realities
Existing architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a journey
A part of sequence section or code, a part of the module, section or code include one or more for realizing defined
The executable instruction of logic function.It should also be noted that in some implementations as replacements, the function of being marked in box can also
To be occurred with being different from the sequence marked in attached drawing.For example, two continuous boxes can actually be basically executed in parallel,
They can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or stream
The combination of each box in journey figure and the box in block diagram and or flow chart, can the functions or operations as defined in executing
Dedicated hardware based system realize, or can realize using a combination of dedicated hardware and computer instructions.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport
In the principle, practical application or improvement to the technology in market for best explaining each embodiment, or make the art
Other those of ordinary skill can understand each embodiment disclosed herein.
Claims (12)
1. a kind of dynamic drafting method of text, which is characterized in that the described method includes:
Using the tool in operating system, the drawing path sequence of target text to be drawn is obtained;
According to the display position of the target text, the path length of each section of drawing path in the drawing path sequence is counted;
Regulation parameter, the path length of each section of drawing path are drawn according to preset, dynamically draws the target text, with
Display.
2. the method according to claim 1, wherein according to the display position of the target text, described in statistics
The path length of each section of drawing path in drawing path sequence, comprising:
According to the display position of the target text, the display size of the target text is obtained;
According to the display size of the display position of the target text and the target text, each section of the target text is determined
The coordinate information of point in the drawing path;
According to the coordinate information of the point in each section of drawing path, statistics can be surrounded on the drawing path of corresponding segment
The perimeter of the closed loop path of all the points, the length of the drawing path as corresponding segment.
3. the method according to claim 1, wherein regulating and controlling parameter, each section of drafting according to preset drafting
The path length in path dynamically draws the target text, comprising:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting and the drawing path total length, drafting progress is controlled, is realized described in dynamic drafting
Target text.
4. the method according to claim 1, wherein regulating and controlling parameter, each section of drafting according to preset drafting
The path length in path dynamically draws the target text, comprising:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting, progress regulation parameter and the drawing path total length are drawn, controls drafting progress,
Realize that dynamic draws the target text.
5. according to the method described in claim 4, it is characterized in that, according to the overall duration of preset drafting, drawing progress regulation
Speed is drawn in parameter and the drawing path total length, control, and before realizing that dynamic draws the target text, the method is also
Include:
The preset overall duration of the drafting and the drafting progress for receiving user's input regulate and control parameter.
6. a kind of dynamic drawing apparatus of text, which is characterized in that described device includes:
Module is obtained, for obtaining the drawing path sequence of target text to be drawn using the tool in operating system;
Statistical module counts each section of drafting road in the drawing path sequence for the display position according to the target text
The path length of diameter;
Drafting module, for drawing regulation parameter, the path length of each section of drawing path according to preset, dynamic draws institute
Target text is stated, with display.
7. device according to claim 6, which is characterized in that the statistical module is used for:
According to the display position of the target text, the display size of the target text is obtained;
According to the display size of the display position of the target text and the target text, each section of the target text is determined
The coordinate information of point in the drawing path;
According to the coordinate information of the point in each section of drawing path, statistics can be surrounded on the drawing path of corresponding segment
The perimeter of the closed loop path of all the points, the length of the drawing path as corresponding segment.
8. device according to claim 6, which is characterized in that the drafting module is used for:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting and the drawing path total length, drafting progress is controlled, is realized described in dynamic drafting
Target text.
9. device according to claim 6, which is characterized in that the drafting module is used for:
According to the path length of each section of drawing path, the drawing path total length of the target text is calculated;
According to the overall duration of preset drafting, progress regulation parameter and the drawing path total length are drawn, controls drafting progress,
Realize that dynamic draws the target text.
10. device according to claim 9, which is characterized in that described device further include:
Receiving module, for receiving the preset overall duration of the drafting and drafting progress regulation parameter of user's input.
11. a kind of calculating equipment, comprising:
Processor;And
Memory is stored thereon with executable code, when the executable code is executed by the processor, makes the processing
Device executes the method as described in any one of claim 1-5.
12. a kind of non-transitory machinable medium, is stored thereon with executable code, when the executable code is electric
When the processor of sub- equipment executes, the processor is made to execute the method as described in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811063023.1A CN109492205B (en) | 2018-09-12 | 2018-09-12 | Dynamic text drawing method and device, computing equipment and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811063023.1A CN109492205B (en) | 2018-09-12 | 2018-09-12 | Dynamic text drawing method and device, computing equipment and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109492205A true CN109492205A (en) | 2019-03-19 |
CN109492205B CN109492205B (en) | 2023-10-10 |
Family
ID=65690436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811063023.1A Active CN109492205B (en) | 2018-09-12 | 2018-09-12 | Dynamic text drawing method and device, computing equipment and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109492205B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110058858A (en) * | 2019-04-19 | 2019-07-26 | 东信和平科技股份有限公司 | A kind of JSON data processing method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050159939A1 (en) * | 2004-01-16 | 2005-07-21 | Gregor Mohler | System and method for the dynamic display of text |
CN106547540A (en) * | 2016-10-12 | 2017-03-29 | 惠州市德赛西威汽车电子股份有限公司 | A kind of method for drafting of text button |
CN106648430A (en) * | 2016-12-20 | 2017-05-10 | 天脉聚源(北京)传媒科技有限公司 | Method and apparatus for intelligently displaying pull-down refreshing animation |
CN107066109A (en) * | 2016-09-10 | 2017-08-18 | 上海触乐信息科技有限公司 | The mthods, systems and devices that dynamic text is inputted immediately |
-
2018
- 2018-09-12 CN CN201811063023.1A patent/CN109492205B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050159939A1 (en) * | 2004-01-16 | 2005-07-21 | Gregor Mohler | System and method for the dynamic display of text |
CN107066109A (en) * | 2016-09-10 | 2017-08-18 | 上海触乐信息科技有限公司 | The mthods, systems and devices that dynamic text is inputted immediately |
WO2018046007A1 (en) * | 2016-09-10 | 2018-03-15 | 上海触乐信息科技有限公司 | Instant dynamic text inputting method, system, and device |
CN106547540A (en) * | 2016-10-12 | 2017-03-29 | 惠州市德赛西威汽车电子股份有限公司 | A kind of method for drafting of text button |
CN106648430A (en) * | 2016-12-20 | 2017-05-10 | 天脉聚源(北京)传媒科技有限公司 | Method and apparatus for intelligently displaying pull-down refreshing animation |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110058858A (en) * | 2019-04-19 | 2019-07-26 | 东信和平科技股份有限公司 | A kind of JSON data processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109492205B (en) | 2023-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107957831A (en) | A kind of data processing method, device and processing equipment for showing interface content | |
CN107707452B (en) | Information display method and device for expressions and electronic equipment | |
CN109978972A (en) | A kind of method and device of copy editor in picture | |
CN108966036B (en) | Barrage display methods, electronic equipment and computer storage medium | |
CN108089958A (en) | GPU test methods, terminal device and computer readable storage medium | |
CN111540035B (en) | Particle rendering method, device and equipment | |
CN113302672A (en) | Speed-variable speech sounding machine | |
US20110285727A1 (en) | Animation transition engine | |
CN108205960A (en) | Method and apparatus, electron map manufacturing system and the navigation system that a kind of word renders | |
WO2019238145A1 (en) | Webgl-based graphics rendering method, apparatus and system | |
CN109271587A (en) | A kind of page generation method and device | |
CN104794220A (en) | Information search method and information search device | |
CN109242934A (en) | A kind of generation method and equipment of animation code | |
CN112102446A (en) | Animation processing method and device and computer readable storage medium | |
CN102074221A (en) | Method and device for displaying characters | |
CN109492205A (en) | The dynamic drafting method and device of text calculate equipment and readable medium | |
CN111290680A (en) | List display method, device, terminal and storage medium | |
CN109976632A (en) | Text animation control methods and device, storage medium and processor | |
CN106648623B (en) | Display method and device for characters in android system | |
CN109388306A (en) | Information display method and device | |
CN106610828A (en) | Method and device for playing GIF animation based on Android system | |
CN106204695A (en) | The edit methods of a kind of 3D animation and device | |
US8212818B2 (en) | Windowless shape drawing | |
CN112685998A (en) | Automatic labeling method, device, equipment and readable storage medium | |
CN107092514A (en) | A kind of content of pages methods of exhibiting and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200903 Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province Applicant after: Alibaba (China) Co.,Ltd. Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 15 layer self unit 02 Applicant before: GUANGZHOU UC NETWORK TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |