CN108021331B - Gap eliminating method, device, equipment and storage medium - Google Patents
Gap eliminating method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN108021331B CN108021331B CN201711381352.6A CN201711381352A CN108021331B CN 108021331 B CN108021331 B CN 108021331B CN 201711381352 A CN201711381352 A CN 201711381352A CN 108021331 B CN108021331 B CN 108021331B
- Authority
- CN
- China
- Prior art keywords
- texture
- vertex
- coordinates
- adjacent
- space
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 239000011800 void material Substances 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 16
- 230000003287 optical effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000008030 elimination Effects 0.000 description 3
- 238000003379 elimination reaction Methods 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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
- G06F3/04883—Interaction 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 for inputting data by handwriting, e.g. gesture or text
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for eliminating gaps. The method comprises the following steps: acquiring texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end face curve and a texture space between adjacent textures; if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space.
Description
Technical Field
The present invention relates to the field of touch technologies, and in particular, to a method, an apparatus, a device, and a storage medium for eliminating a gap.
Background
Once the intelligent tablet is released, the intelligent tablet is widely concerned by people, and gradually, the intelligent tablet walks into the life of people, and the functions of the intelligent tablet are more and more abundant.
Each stroke written by the user on the intelligent tablet is constructed by combining a plurality of textures, so that gaps exist among the textures or gaps exist among the textures due to interruption of the user during writing. In the prior art, or a mode of filling a gap with a plurality of textures is adopted, the above mode may cause drawing of a plurality of invalid textures, and drawing efficiency is affected.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for eliminating gaps, which can improve the efficiency of eliminating texture gaps.
In a first aspect, an embodiment of the present invention provides a method for eliminating a void, including:
acquiring texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end face curve and a texture space between adjacent textures;
and if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space.
Further, if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end curves of the texture corresponding to the adjacent texture corresponding to the texture space comprises:
if the texture space is larger than the size of the texture, acquiring the relative position of the adjacent textures;
and determining adjacent vertex coordinates to be combined according to the relative positions, and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively overlapped.
Further, if the texture distance is greater than the size of the texture, obtaining the relative position of the adjacent textures includes:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
Further, determining the coordinates of the adjacent vertexes to be combined according to the relative positions, and adjusting the coordinates of the adjacent vertexes until the coordinates of the adjacent vertexes are respectively overlapped comprises:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
In a second aspect, an embodiment of the present invention further provides a gap eliminating apparatus, including:
the touch control writing track processing device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining texture information of a touch control writing track input by a user, and the texture information comprises texture size, a texture end surface curve and a texture space of adjacent textures;
and the filling module is used for filling the texture space according to the vertex coordinates of the texture end curves corresponding to the adjacent textures corresponding to the texture space if the texture space is larger than the size of the texture.
Further, the filling module includes:
the second obtaining module is used for obtaining the relative position of the adjacent textures if the texture space is larger than the size of the texture;
and the adjusting module is used for determining adjacent vertex coordinates to be combined according to the relative positions and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively superposed.
Further, the second obtaining module is specifically configured to:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
Further, the adjusting module is specifically configured to:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the gap elimination method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the gap elimination method according to any one of the embodiments of the present invention.
The method comprises the steps of obtaining texture information of a touch writing track input by a user, wherein the texture information comprises texture size, texture end surface curves and texture intervals of adjacent textures; if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space, and therefore the efficiency of eliminating texture gaps can be improved.
Drawings
FIG. 1A is a flow chart of a method for void removal according to a first embodiment of the present invention;
FIG. 1B is a schematic diagram of a square texture in one embodiment of the present invention;
FIG. 1C is a schematic view of a circular texture in accordance with one embodiment of the present invention;
FIG. 1D is a schematic diagram of a texture space according to one embodiment of the present invention;
FIG. 2A is a flowchart of a void removal method according to a second embodiment of the present invention;
FIG. 2B is a diagram illustrating two texture spacings according to a second embodiment of the present invention;
FIG. 2C is a schematic diagram of another two-texture space in the second embodiment of the present invention;
FIG. 2D is a schematic diagram of three texture spacings according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a void removal device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1A is a flowchart of a void removal method in a first embodiment of the present invention, where this embodiment is applicable to a void removal situation, and the method may be executed by a void removal apparatus in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, as shown in fig. 1A, the method specifically includes the following steps:
s110, obtaining texture information of a touch writing track input by a user, wherein the texture information comprises texture size, texture end surface curves and texture intervals of adjacent textures.
The touch writing track may be a track written by a user using an intelligent pen, or a track written by a user using a mouse, which is not limited in the embodiment of the present invention.
The touch writing track input by the user is composed of textures, and includes at least one texture, and the shape of the texture may be a square or a circle, which is not limited in the embodiment of the present invention.
Fig. 1B is a schematic diagram of a square texture, and as shown in the figure, the shape of the texture is a square, and the end surface curve 1 of the texture is the side length of the texture, that is, the straight line 1 between the upper left vertex a and the upper right vertex D, the straight line 1 between the lower left vertex B and the lower right vertex C, the straight line 1 between the upper left vertex a and the lower left vertex B, or the straight line 1 between the upper right vertex D and the lower right vertex C of the texture. The texture size is a distance between an upper left vertex a and an upper right vertex D of the texture, or a distance between a lower left vertex B and a lower right vertex C of the texture, or a distance between the upper left vertex a and the lower left vertex B of the texture, or a distance between the upper right vertex D and the lower right vertex C of the texture.
Fig. 1C is a schematic diagram of a circular texture, and as shown in the figure, the shape of the texture is a circle, the end surface curve 1 of the texture is a curve 1 between an upper left vertex a and an upper right vertex D of a maximum square circumscribed by the texture, a curve 1 between a lower left vertex B and a lower right vertex C, a curve 1 between the upper left vertex a and the lower left vertex B, or a curve 1 between the upper right vertex D and the lower right vertex C. The texture size is the distance between the texture and the upper left vertex A and the upper right vertex D of the maximum square externally connected with the texture, or the distance between the lower left vertex B and the lower right vertex C, or the distance between the upper left vertex A and the lower left vertex B, or the distance between the upper right vertex D and the lower right vertex C.
FIG. 1D is a schematic diagram of texture pitch, where texture pitch 2 is the distance between a texture with vertices A, B, C, D, respectively, and a texture with vertices E, F, G, H, respectively.
Specifically, a touch writing track input by a user is obtained, and the size of the texture, the end surface curve of the texture and the texture distance between adjacent textures forming the writing track are determined according to the writing track input by the user.
And S120, if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space.
And the adjacent textures corresponding to the texture space are two adjacent textures generating the texture space. For example, as shown in fig. 1D, the adjacent textures corresponding to the texture pitch 2 are the texture with A, B, C, D vertices and the texture with E, F, G, H vertices.
And the vertex coordinates of the opposite texture end curves of the adjacent textures corresponding to the texture space are the vertex coordinates of the opposite texture end curves of the two adjacent textures generating the texture space. For example, as shown in FIG. 1D, the vertex coordinates of the opposing texture end curves of adjacent textures corresponding to the texture pitch may be vertex C, D and vertex E, F.
The method for filling the texture space according to the vertex coordinates of the end curves of the adjacent textures corresponding to the texture space may be to overlap the vertex coordinates of the end curves of the adjacent textures corresponding to the texture space, to fill the corresponding size of texture in the texture space, or to adjust the vertex coordinates of the end curves of the adjacent textures corresponding to the texture space to overlap if the texture space is too large and there is a space after an integer number of textures are filled in the middle of the texture, which is not limited in the embodiment of the present invention.
Specifically, the texture space obtained according to the touch writing track input by the user is compared with the size of the texture, and if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end curves of the texture corresponding to the adjacent texture corresponding to the texture space.
According to the technical scheme of the embodiment, the texture information of the touch writing track input by a user is obtained, wherein the texture information comprises the size of a texture, a texture end surface curve and the texture distance between adjacent textures; if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end curves of the texture corresponding to the adjacent texture corresponding to the texture space, and the efficiency of eliminating the texture gaps can be improved.
Example two
Fig. 2A is a flowchart of a void removal method according to a second embodiment of the present invention, where the present embodiment is optimized based on the first embodiment, and in the present embodiment, if the texture space is larger than the texture size, filling the texture space according to the vertex coordinates of the end curves of the texture corresponding to the adjacent texture corresponding to the texture space includes: if the texture space is larger than the size of the texture, acquiring the relative position of the adjacent textures; and determining adjacent vertex coordinates to be combined according to the relative positions, and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively overlapped.
As shown in fig. 2A, the method of this embodiment specifically includes the following steps:
s210, obtaining texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end surface curve and a texture space of adjacent textures.
S220, if the texture space is larger than the size of the texture, the relative position of the adjacent texture is obtained.
Wherein the relative position of the adjacent textures may be that the first texture is on the left, right, upper or lower side of the second texture. The first texture and the second texture are adjacent textures, and the distance between the first texture and the second texture is larger than the size of the first texture and the size of the second texture.
Optionally, if the texture pitch is greater than the size of the texture, acquiring the relative position of the adjacent textures includes:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
And the included angle between the adjacent texture and the horizontal direction is the included angle between the straight line where the central point of the adjacent texture is located and the horizontal direction.
In a specific example, fig. 2B is a schematic diagram of a texture pitch, where an angle α between adjacent textures and the horizontal direction is an angle between a straight line where a center point W of a texture with a vertex of A, B, C, D and a center point V of a texture with a vertex of E, F, G, H are located, and the horizontal direction, as shown in the drawing, the angle α is smaller than 45 degrees, and then a texture with a vertex of A, B, C, D is located on the left side of a texture with a vertex of E, F, G, H, and a texture with a vertex of E, F, G, H is located on the right side of a texture with a vertex of A, B, C, D.
And the included angle between the adjacent texture and the vertical direction is the included angle between the straight line where the central point of the adjacent texture is located and the vertical direction.
In a specific example, fig. 2C is a schematic diagram of another texture pitch, where an angle α between adjacent textures and the vertical direction is an angle between a straight line where a center point W of a texture with a vertex of A, B, C, D and a center point V of a texture with a vertex of E, F, G, H are located and the vertical direction, and as shown in the drawing, the angle α is smaller than 45 degrees, then a texture with a vertex of A, B, C, D is located on the lower side of a texture with a vertex of E, F, G, H, and a texture with a vertex of E, F, G, H is located on the upper side of a texture with a vertex of A, B, C, D.
And S230, determining adjacent vertex coordinates to be combined according to the relative positions, and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively overlapped.
Wherein the adjacent vertex coordinates to be combined can be the upper right vertex of the first texture end curve and the upper left vertex of the second texture end curve, the upper left vertex of the first texture end curve and the upper right vertex of the second texture end curve, the lower right vertex of the first texture end curve and the lower left vertex of the second texture end curve, the lower left vertex of the first texture end curve and the lower right vertex of the second texture end curve, may be the lower right vertex of the first texture end curve and the upper right vertex of the second texture end curve, may also be the upper left vertex of the first texture end curve and the lower left vertex of the second texture end curve, may also be the upper right vertex of the first texture end curve and the lower right vertex of the second texture end curve, and may also be the lower left vertex of the first texture end curve and the upper left vertex of the second texture end curve. The embodiments of the present invention are not limited in this regard.
Optionally, determining the coordinates of the adjacent vertexes to be combined according to the relative position, and adjusting the coordinates of the adjacent vertexes until the coordinates of the adjacent vertexes are respectively overlapped includes:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
And the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture are the coordinates of the upper vertex and the lower vertex of the left end curve of the first texture. For example, as shown in fig. 2B, if the first texture is a texture whose vertices are A, B, C, D, the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture may be the coordinates of point a and the coordinates of point B. Similarly, the coordinates of the upper right vertex and the lower right vertex of the first texture end curve are the coordinates of the point D and the coordinates of the point C.
And the coordinates of the upper left vertex and the lower left vertex of the second texture end curve are the coordinates of the upper vertex and the lower vertex of the left side end curve of the second texture. For example, as shown in fig. 2B, if the second texture is a texture whose vertices are E, F, G, H, the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture may be the coordinates of point E and the coordinates of point F. Similarly, the coordinates of the upper right vertex and the lower right vertex of the second texture end curve are the coordinates of the point H and the coordinates of the point G.
Specifically, the adjusting of the coordinates of the adjacent vertexes until the coordinates of the adjacent vertexes are respectively overlapped may be performed by dragging the upper right vertex and the lower right vertex of the first texture to the upper left vertex and the lower left vertex of the second texture; or; the top left vertex and the bottom left vertex of the second texture are pulled to the top right vertex and the bottom right vertex of the first texture. Or; and respectively pulling the upper right vertex and the lower right vertex of the first texture and the upper left vertex and the lower left vertex of the second texture until the upper right vertex and the lower left vertex are coincided.
In one specific example, each stroke is constructed by combining a plurality of textures. Each texture has 4 vertices. When the distance is drawn every time, and the texture space exceeds the texture size, taking a section of three textures as an example, fig. 2D is a schematic diagram of three texture spaces, wherein the texture 1 is drawn by the texture of an original vertex, the texture 2 is drawn by the texture of the original vertex, and the texture 3 is drawn by the texture of the original vertex, and because the spaces between the texture 1 and the texture 2 and between the texture 2 and the texture 3 are larger than the texture size, the upper left vertex and the lower left vertex of the texture 2 are pulled to the upper right vertex and the lower right vertex of the texture 1; the upper right vertex, the lower right vertex, of texture 2 is pulled to the upper left vertex, the lower left vertex, of texture 3. The texture 1 and the texture 3 which are embodied as a segment of brush stroke draw a non-linear brush stroke, and the middle gap is filled by the texture 2 with the changed shape. Most of the prior art schemes fill the gap with a plurality of textures, so that a plurality of textures need to be drawn, thereby reducing the drawing efficiency. Or the current gap is directly vacated, so that the drawing effect is influenced. The scheme of the embodiment of the invention can completely and efficiently fill the gaps among the textures.
According to the technical scheme of the embodiment, texture information of a touch writing track input by a user is obtained, wherein the texture information comprises texture size, a texture end surface curve and a texture distance between adjacent textures; if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space, and therefore the efficiency of eliminating texture gaps can be improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a void removal device in a third embodiment of the present invention. The present embodiment may be applicable to the case of void removal, and the apparatus may be implemented in software and/or hardware, and may be integrated in any device that provides a void removal function, as shown in fig. 3, where the void removal apparatus specifically includes: a first retrieving module 310 and a filling module 320.
The first obtaining module 310 is configured to obtain texture information of a touch writing track input by a user, where the texture information includes a texture size, a texture end surface curve, and a texture distance between adjacent textures;
and a filling module 320, configured to fill the texture space according to the vertex coordinates of the end curves of the texture corresponding to the adjacent textures corresponding to the texture space if the texture space is larger than the size of the texture.
Optionally, the filling module includes:
the second obtaining module is used for obtaining the relative position of the adjacent textures if the texture space is larger than the size of the texture;
and the adjusting module is used for determining adjacent vertex coordinates to be combined according to the relative positions and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively superposed.
Optionally, the second obtaining module is specifically configured to:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
Optionally, the adjusting module is specifically configured to:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
According to the technical scheme of the embodiment, texture information of a touch writing track input by a user is obtained, wherein the texture information comprises texture size, a texture end surface curve and a texture distance between adjacent textures; if the texture space is larger than the size of the texture, the texture space is filled according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space, and therefore the efficiency of eliminating texture gaps can be improved.
Example four
Fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing the gap elimination method provided by the embodiment of the present invention: acquiring texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end face curve and a texture space between adjacent textures; and if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space.
EXAMPLE five
An embodiment five of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the void removal method provided in all the inventive embodiments of the present application: acquiring texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end face curve and a texture space between adjacent textures; and if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent texture corresponding to the texture space.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (6)
1. A void removal method, comprising:
acquiring texture information of a touch writing track input by a user, wherein the texture information comprises texture size, a texture end face curve and a texture space between adjacent textures;
if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end part curves of the texture corresponding to the adjacent textures corresponding to the texture space;
wherein, if the texture space is larger than the size of the texture, filling the texture space according to the vertex coordinates of the end curves of the texture corresponding to the adjacent texture corresponding to the texture space comprises:
if the texture space is larger than the size of the texture, acquiring the relative position of the adjacent textures;
determining adjacent vertex coordinates to be combined according to the relative positions, and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively overlapped;
wherein, if the texture distance is larger than the size of the texture, obtaining the relative position of the adjacent textures comprises:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
2. The method of claim 1, wherein determining adjacent vertex coordinates to be merged according to the relative positions, and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates respectively coincide comprises:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
3. A void removal device, comprising:
the touch control writing track processing device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining texture information of a touch control writing track input by a user, and the texture information comprises texture size, a texture end surface curve and a texture space of adjacent textures;
the filling module is used for filling the texture space according to the vertex coordinates of the texture end curves corresponding to the adjacent textures corresponding to the texture space if the texture space is larger than the size of the texture;
wherein the filling module comprises:
the second obtaining module is used for obtaining the relative position of the adjacent textures if the texture space is larger than the size of the texture;
the adjusting module is used for determining adjacent vertex coordinates to be combined according to the relative positions and adjusting the adjacent vertex coordinates until the adjacent vertex coordinates are respectively overlapped;
the second obtaining module is specifically configured to:
if the texture space is larger than the size of the texture and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the horizontal direction is smaller than or equal to 45 degrees, the position relation of the adjacent textures is that the first texture is on the left side or the right side of the second texture; or;
if the texture space is larger than the size of the texture, and the relative position of the adjacent textures comprises that the included angle between the adjacent textures and the vertical direction is smaller than 45 degrees, the position relation of the adjacent textures is that the first texture is above or below the second texture.
4. The apparatus of claim 3, wherein the adjustment module is specifically configured to:
if the first texture is on the left side of the second texture, adjusting the coordinates of the upper right vertex and the lower right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper left vertex and the lower left vertex of the end curve of the second texture;
if the first texture is on the right side of the second texture, adjusting the coordinates of the upper left vertex and the lower left vertex of the end curve of the first texture to be respectively superposed with the coordinates of the upper right vertex and the lower right vertex of the end curve of the second texture;
if the first texture is above the second texture, adjusting the coordinates of a left lower vertex and a right lower vertex of the end curve of the first texture to be respectively superposed with the coordinates of a left upper vertex and a right upper vertex of the end curve of the second texture;
and if the first texture is below the second texture, adjusting the coordinates of the upper left vertex and the upper right vertex of the end curve of the first texture to be respectively superposed with the coordinates of the lower left vertex and the lower right vertex of the end curve of the second texture.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-2 when executing the program.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711381352.6A CN108021331B (en) | 2017-12-20 | 2017-12-20 | Gap eliminating method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711381352.6A CN108021331B (en) | 2017-12-20 | 2017-12-20 | Gap eliminating method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108021331A CN108021331A (en) | 2018-05-11 |
CN108021331B true CN108021331B (en) | 2021-01-22 |
Family
ID=62074501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711381352.6A Active CN108021331B (en) | 2017-12-20 | 2017-12-20 | Gap eliminating method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108021331B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101813989A (en) * | 2009-02-20 | 2010-08-25 | 深圳中电数码显示有限公司 | Handwriting input method |
CN103064554A (en) * | 2012-12-17 | 2013-04-24 | 上海海知信息技术有限公司 | Chirography smoothing method of handwriting input method and handwriting input method |
CN105225260A (en) * | 2015-09-25 | 2016-01-06 | 中国电子科技集团公司第三十二研究所 | Method for realizing original handwriting |
CN106155540A (en) * | 2015-04-03 | 2016-11-23 | 北大方正集团有限公司 | Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63203341A (en) * | 1987-02-19 | 1988-08-23 | Sharp Corp | Enlarged character generation system |
US20070152961A1 (en) * | 2005-12-30 | 2007-07-05 | Dunton Randy R | User interface for a media device |
CN101799735B (en) * | 2009-02-10 | 2013-04-10 | Tcl集团股份有限公司 | Primary handwriting hand input display method |
CN104252306B (en) * | 2013-06-27 | 2017-08-18 | 宏碁股份有限公司 | Pen touch display method |
-
2017
- 2017-12-20 CN CN201711381352.6A patent/CN108021331B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101813989A (en) * | 2009-02-20 | 2010-08-25 | 深圳中电数码显示有限公司 | Handwriting input method |
CN103064554A (en) * | 2012-12-17 | 2013-04-24 | 上海海知信息技术有限公司 | Chirography smoothing method of handwriting input method and handwriting input method |
CN106155540A (en) * | 2015-04-03 | 2016-11-23 | 北大方正集团有限公司 | Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus |
CN105225260A (en) * | 2015-09-25 | 2016-01-06 | 中国电子科技集团公司第三十二研究所 | Method for realizing original handwriting |
Also Published As
Publication number | Publication date |
---|---|
CN108021331A (en) | 2018-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9471957B2 (en) | Method for partitioning, managing and displaying a collaboration space and interactive input system employing same | |
US9842417B2 (en) | Computing device and method for simplifying point cloud of object | |
US9342322B2 (en) | System and method for layering using tile-based renderers | |
CN108229740B (en) | Method and device for determining business circle boundary, server and storage medium | |
CN104035562A (en) | Method and system for mapping three-dimensional desktop touch events | |
US20240013489A1 (en) | Method and apparatus for labeling road element, device, and storage medium | |
CN113495933A (en) | Vector tile display method and system | |
JP2023533108A (en) | Method, apparatus, device and storage medium for generating road labels | |
CN112579241B (en) | Page layout method and device, computer-readable storage medium and electronic equipment | |
Chen et al. | An improved texture-related vertex clustering algorithm for model simplification | |
CN113538623B (en) | Method, device, electronic equipment and storage medium for determining target image | |
CN109558118B (en) | Method, apparatus, device and storage medium for creating native components of a smart applet | |
CN112528707A (en) | Image processing method, device, equipment and storage medium | |
CN114820878B (en) | Image editing method and device | |
CN107393410B (en) | Method, medium, apparatus and computing device for presenting data on map | |
CN108021331B (en) | Gap eliminating method, device, equipment and storage medium | |
CN112465692A (en) | Image processing method, device, equipment and storage medium | |
CN114356475B (en) | Display processing method, device, equipment and storage medium | |
CN112488909B (en) | Multi-face image processing method, device, equipment and storage medium | |
CN111870954B (en) | Altitude map generation method, device, equipment and storage medium | |
CN109241059A (en) | A kind of building method of point cloud data, device, electronic equipment and storage medium | |
CN111488768B (en) | Style conversion method and device for face image, electronic equipment and storage medium | |
US8774468B2 (en) | Dynamic shape approximation | |
CN113051491A (en) | Method, apparatus, storage medium, and program product for map data processing | |
US9811945B2 (en) | On-demand transformation aware shape tessellation |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |