CN107977147B - Sliding track display method and device - Google Patents

Sliding track display method and device Download PDF

Info

Publication number
CN107977147B
CN107977147B CN201711375389.8A CN201711375389A CN107977147B CN 107977147 B CN107977147 B CN 107977147B CN 201711375389 A CN201711375389 A CN 201711375389A CN 107977147 B CN107977147 B CN 107977147B
Authority
CN
China
Prior art keywords
point
target
sliding
points
width
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
Application number
CN201711375389.8A
Other languages
Chinese (zh)
Other versions
CN107977147A (en
Inventor
邵翔宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711375389.8A priority Critical patent/CN107977147B/en
Publication of CN107977147A publication Critical patent/CN107977147A/en
Application granted granted Critical
Publication of CN107977147B publication Critical patent/CN107977147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

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)
  • Controls And Circuits For Display Device (AREA)

Abstract

The disclosure relates to a sliding track display method and device, and belongs to the technical field of display. The method comprises the following steps: sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at the display screen; determining a sliding speed corresponding to each point of the plurality of points; and displaying a graph of the sliding track, wherein the change of the width of the graph of the sliding track is inversely related to the change of the sliding speed corresponding to the plurality of points. The method and the device solve the problem that the display effect and the handwriting effect of the graph of the sliding track are greatly different. The present disclosure is for displaying a sliding trajectory.

Description

Sliding track display method and device
Technical Field
The present disclosure relates to the field of display technologies, and in particular, to a sliding trajectory display method and apparatus.
Background
With the development of display technology, more and more terminals have a brush function with the development of display technology. The terminal with the brush function can display a graph representing a sliding track of a sliding operation according to the sliding operation on a display screen on the terminal.
In the related art, the user may also operate on the terminal to select the target trajectory width of the brush. Thereafter, the user may slide on the display screen with a finger so that the terminal determines a plurality of points in sequence according to the sliding operation. Further, the terminal can also display a graph including a sliding track of the plurality of points according to the plurality of points, wherein the width of the position where each point in the graph of the sliding track is located is the target track width of the brush selected by the user.
However, in the related art, the graphic of the sliding trace displayed on the terminal is greatly different from the graphic obtained by the user sliding on paper using a pen, and the display effect of the graphic of the sliding trace is greatly different from the handwriting effect.
Disclosure of Invention
The application provides a sliding track display method and device, which can solve the problem that the display effect and the handwriting effect of the graph of the sliding track are greatly different. The technical scheme is as follows:
in a first aspect, a sliding track display method is provided, where the method includes:
sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at the display screen;
determining a slip velocity corresponding to each of the plurality of points;
and displaying a graph of the sliding track, wherein the width change of the graph of the sliding track is inversely related to the sliding speed change corresponding to the plurality of points.
Optionally, sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation on the display screen includes:
according to one sliding operation for the display screen, a point at which the position is first changed after the sliding operation is started and points after the point are determined as the plurality of points.
Optionally, the displaying the graphic of the sliding track includes:
determining the track width corresponding to each point according to the sliding speed corresponding to each point, wherein the track width corresponding to each point is inversely related to the sliding speed corresponding to each point;
displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point and the track width corresponding to the last point of each target point, wherein the graph of the sliding track comprises the quadrangle corresponding to each target point, and the target point is a point behind the first point of the plurality of points;
wherein the target point of the plurality of points includes a jth point of the plurality of points, j is greater than or equal to 2, a last point of the jth point is a j-1 point of the plurality of points, and a quadrangle corresponding to the jth point includes: the device comprises a first edge and a second edge which are parallel and opposite to each other, wherein the j-1 th point is located at the midpoint of the first edge, the j-th point is located at the midpoint of the second edge, the length of the first edge is equal to the width of a track corresponding to the j-1 th point, and the length of the second edge is equal to the width of the track corresponding to the j-th point.
Optionally, the method further includes:
determining a sliding mode of each point, wherein w is more than or equal to 1, when the distance between the horizontal coordinates of the w-th point and the w-1 th point in a preset coordinate system on the display screen is greater than the distance between the vertical coordinates, the sliding mode of the w-th point is a transverse sliding mode, and when the distance between the horizontal coordinates of the w-th point and the w-1 th point in the preset coordinate system is less than or equal to the distance between the vertical coordinates, the sliding mode of the w-th point is a longitudinal sliding mode;
the displaying the quadrangle corresponding to each target point according to the track width corresponding to each target point and the track width corresponding to the last point of each target point includes:
displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last target point of each target point and the sliding mode of each target point; when the sliding mode of the jth point is the transverse sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to a vertical coordinate axis of the preset coordinate system; and when the sliding mode of the jth point is the longitudinal sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to an abscissa axis of the preset coordinate system.
Optionally, the method further includes:
after receiving a width setting instruction, determining the width of a target track indicated by the width setting instruction;
determining the track width corresponding to each point according to the sliding speed corresponding to each point, including:
determining the maximum width and the minimum width corresponding to the target track width according to a preset width corresponding relation, wherein the width corresponding relation comprises the maximum width and the minimum width corresponding to at least one track width, and the track width is positively correlated with the maximum width and the minimum width corresponding to the track width;
determining a reference width corresponding to each point according to a reference width determination formula, wherein the reference width corresponding to the w-th point in the plurality of points is LcwW is more than or equal to 1, and the reference width determination formula is
Figure GDA0002793511710000031
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding speed, V, corresponding to the w-th pointyA preset sliding speed is set;
determining the minimum width corresponding to the target track width and the maximum width in the reference width corresponding to each point as the expected width corresponding to each point;
when each point meets a first preset condition, determining the expected width corresponding to each point as the track width corresponding to each point, where the first preset condition includes: the each point is a first point of the plurality of points.
Optionally, the determining, according to the sliding speed corresponding to each point, the track width corresponding to each point further includes:
when each point meets a second preset condition, determining the track width corresponding to each point according to a first width determination formula, wherein the second preset condition comprises that: the each point is a point subsequent to a first point of the plurality of points;
wherein the track width corresponding to the ith point in the plurality of points is GiI is more than or equal to 2, and the first width determination formula is as follows:
Figure GDA0002793511710000041
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width corresponding to the ith point is obtained, the distance between the ith point and the (i-1) th point is the distance corresponding to the ith point, the absolute value of the difference value between the expected width corresponding to the ith point and the track width corresponding to the (i-1) th point is the absolute value corresponding to the ith point, and Z is the absolute value corresponding to the ith pointiAnd the minimum value of the distance and the absolute value corresponding to the ith point is obtained.
Optionally, the first preset condition further includes: the sliding operation is the first sliding operation after receiving the width setting instruction, and the determining the track width corresponding to each point according to the sliding speed corresponding to each point further includes:
and when the each point does not meet the first preset condition and the second preset condition, determining the expected width corresponding to the each point as the track width corresponding to the last point of the sliding track for representing the last sliding operation.
Optionally, the method further includes:
when the plurality of points comprise intersection target points, displaying a square corresponding to the intersection target points, wherein the plurality of points comprise the next point of the intersection target points, and the sliding mode of the intersection target points is different from that of the next point of the intersection target points;
wherein the four vertices of the square corresponding to the intersection target points include: the intersection target point corresponds to two end points of a second edge in the quadrangle, and the intersection target point corresponds to a next end point of a first edge in the quadrangle.
Optionally, the method further includes:
when the plurality of points comprise intersection target points, displaying a square corresponding to the intersection target points, wherein the plurality of points comprise the next point of the intersection target points, and the sliding mode of the intersection target points is different from that of the next point of the intersection target points;
wherein, three vertexes of the right triangle corresponding to the intersection target point include: the intersection target point, an end point of a second side in the quadrangle corresponding to the intersection target point, and an end point of a first side in the quadrangle corresponding to a next point of the intersection target point, and any point in the right triangle is located outside the quadrangle corresponding to the intersection target point and the quadrangle corresponding to the next point of the intersection target point.
Optionally, the method further includes:
determining that the next point and the previous point of the crossed target points are comparison points of the crossed target points;
determining a vertex of each comparison point close to the intersection target point in a vertex of a square corresponding to the intersection target point, which is the same as a target coordinate of the intersection target point, as a reference vertex of each comparison point, wherein when the sliding mode of each comparison point is a transverse sliding mode, the target coordinate is a vertical coordinate in the preset coordinate system, and when the sliding mode of each comparison point is a longitudinal sliding mode, the target coordinate is a horizontal coordinate in the preset coordinate system;
determining at least one traversal point which is the same as and continuous with the sliding mode of each comparison point in the plurality of points, wherein the at least one traversal point comprises each comparison point and does not comprise each intersection target point, and the target coordinates of the at least one traversal point are sequentially arranged along the direction of the target coordinates far away from the intersection target points;
when the target coordinates of the at least one traversal point are located between the target coordinates of the intersection point and the target coordinates of the reference vertex of each comparison point, determining the traversal point with the minimum distance from the target coordinates of the reference vertex of each comparison point in the at least one traversal point as a target traversal point;
displaying the auxiliary triangle corresponding to the reference vertex of each comparison point according to the reference vertex of each comparison point and the target traversal point, wherein three vertices of the auxiliary triangle corresponding to the reference vertex of each comparison point comprise: and the reference vertex of each comparison point and two end points of the edge of the target traversal point in the quadrangle corresponding to the target traversal point.
In a second aspect, there is provided a sliding track display device including:
the display screen display control device comprises a first determining module, a second determining module and a display control module, wherein the first determining module is used for sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at a display screen;
a second determining module for determining a sliding speed corresponding to each point of the plurality of points;
and the first display module is used for displaying the graph of the sliding track, and the change of the width of the graph of the sliding track is inversely related to the change of the sliding speed corresponding to the multiple points.
Optionally, the first determining module is configured to: according to one sliding operation for the display screen, a point at which the position is first changed after the sliding operation is started and points after the point are determined as the plurality of points.
Optionally, the first display module includes:
the determining unit is used for determining the track width corresponding to each point according to the sliding speed corresponding to each point, and the track width corresponding to each point is inversely related to the sliding speed corresponding to each point;
a display unit, configured to display a quadrangle corresponding to each target point according to a track width corresponding to each target point and a track width corresponding to a previous point of each target point, where a graph of the sliding track includes the quadrangle corresponding to each target point, and the target point is a point after a first point of the plurality of points;
wherein the target point of the plurality of points includes a jth point of the plurality of points, j is greater than or equal to 2, a last point of the jth point is a j-1 point of the plurality of points, and a quadrangle corresponding to the jth point includes: the device comprises a first edge and a second edge which are parallel and opposite to each other, wherein the j-1 th point is located at the midpoint of the first edge, the j-th point is located at the midpoint of the second edge, the length of the first edge is equal to the width of a track corresponding to the j-1 th point, and the length of the second edge is equal to the width of the track corresponding to the j-th point.
Optionally, the sliding track display device further includes:
a third determining module, configured to determine a sliding manner of each point, where w is greater than or equal to 1, when an abscissa distance between a w-th point of the multiple points and a w-1-th point in a preset coordinate system on the display screen is greater than an ordinate distance, the sliding manner of the w-th point is a transverse sliding manner, and when the abscissa distance between the w-th point and the w-1-th point in the preset coordinate system is less than or equal to the ordinate distance, the sliding manner of the w-th point is a longitudinal sliding manner;
the display unit is used for:
displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last target point of each target point and the sliding mode of each target point; when the sliding mode of the jth point is the transverse sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to a vertical coordinate axis of the preset coordinate system; and when the sliding mode of the jth point is the longitudinal sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to an abscissa axis of the preset coordinate system.
Optionally, the sliding track display device further includes:
the fourth determining module is used for determining the width of the target track indicated by the width setting instruction after receiving the width setting instruction;
the determination unit is configured to:
determining the maximum width and the minimum width corresponding to the target track width according to a preset width corresponding relation, wherein the width corresponding relation comprises the maximum width and the minimum width corresponding to at least one track width, and the track width is positively correlated with the maximum width and the minimum width corresponding to the track width;
determining a reference width corresponding to each point according to a reference width determination formula, wherein the reference width corresponding to the w-th point in the plurality of points is LcwW is more than or equal to 1, and the reference width determination formula is
Figure GDA0002793511710000071
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding speed, V, corresponding to the w-th pointyA preset sliding speed is set;
determining the minimum width corresponding to the target track width and the maximum width in the reference width corresponding to each point as the expected width corresponding to each point;
when each point meets a first preset condition, determining the expected width corresponding to each point as the track width corresponding to each point, where the first preset condition includes: the each point is a first point of the plurality of points.
Optionally, the determining unit is further configured to:
when each point meets a second preset condition, determining the track width corresponding to each point according to a first width determination formula, wherein the second preset condition comprises that: the each point is a point subsequent to a first point of the plurality of points;
wherein the track width corresponding to the ith point in the plurality of points is GiI is more than or equal to 2, and the first width determination formula is as follows:
Figure GDA0002793511710000081
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width corresponding to the ith point is obtained, the distance between the ith point and the (i-1) th point is the distance corresponding to the ith point, the absolute value of the difference value between the expected width corresponding to the ith point and the track width corresponding to the (i-1) th point is the absolute value corresponding to the ith point, and Z is the absolute value corresponding to the ith pointiAnd the minimum value of the distance and the absolute value corresponding to the ith point is obtained.
Optionally, the first preset condition further includes: the sliding operation is a first sliding operation after receiving the width setting instruction, and the determination unit is further configured to:
and when the each point does not meet the first preset condition and the second preset condition, determining the expected width corresponding to the each point as the track width corresponding to the last point of the sliding track for representing the last sliding operation.
Optionally, the sliding track display device further includes:
the second display module is used for displaying a square corresponding to the intersection target point when the plurality of points comprise intersection target points, the plurality of points comprise the next point of the intersection target points, and the sliding mode of the intersection target points is different from that of the next point of the intersection target points;
wherein the four vertices of the square corresponding to the intersection target points include: the intersection target point corresponds to two end points of a second edge in the quadrangle, and the intersection target point corresponds to a next end point of a first edge in the quadrangle.
Optionally, the sliding track display device further includes:
a third display module, configured to display a square corresponding to the intersection target point when the plurality of points include an intersection target point, where the plurality of points include a next point of the intersection target point, and a sliding manner of the intersection target point is different from a sliding manner of the next point of the intersection target point;
wherein, three vertexes of the right triangle corresponding to the intersection target point include: the intersection target point, an end point of a second side in the quadrangle corresponding to the intersection target point, and an end point of a first side in the quadrangle corresponding to a next point of the intersection target point, and any point in the right triangle is located outside the quadrangle corresponding to the intersection target point and the quadrangle corresponding to the next point of the intersection target point.
Optionally, the sliding track display device further includes:
a fifth determining module, configured to determine that a next point and a previous point of the crossing target point are both comparison points of the crossing target point;
a sixth determining module, configured to determine, as a reference vertex of each comparison point, a vertex of each comparison point close to the intersection target point in a square corresponding to the intersection target point, where, when a sliding manner of each comparison point is a transverse sliding manner, the target coordinate is a vertical coordinate in the preset coordinate system, and when the sliding manner of each comparison point is a longitudinal sliding manner, the target coordinate is a horizontal coordinate in the preset coordinate system;
a seventh determining module, configured to determine at least one traversal point that is continuous and has the same sliding manner as each comparison point in the plurality of points, where the at least one traversal point includes each comparison point and does not include each intersection target point, and the target coordinates of the at least one traversal point are sequentially arranged in a direction away from the target coordinates of the intersection target points;
an eighth determining module, configured to determine, when the target coordinates of the at least one traversal point are located between the target coordinates of the intersection and the target coordinates of the reference vertex of each comparison point, a traversal point, of the at least one traversal point, whose distance from the target coordinates of the reference vertex of each comparison point is the smallest, as a target traversal point;
a fourth display module, configured to display, according to the reference vertex of each comparison point and the target traversal point, an auxiliary triangle corresponding to the reference vertex of each comparison point, where three vertices of the auxiliary triangle corresponding to the reference vertex of each comparison point include: and the reference vertex of each comparison point and two end points of the edge of the target traversal point in the quadrangle corresponding to the target traversal point.
In a third aspect, there is provided a sliding track display device including:
a processing component;
a memory for storing executable instructions of the processing component;
wherein the processing component is configured to:
sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at the display screen;
determining a slip velocity corresponding to each of the plurality of points;
and displaying a graph of the sliding track, wherein the width change of the graph of the sliding track is inversely related to the sliding speed change corresponding to the plurality of points.
In a fourth aspect, there is provided a readable storage medium having stored therein instructions which, when run on a processing component, cause the processing component to perform the method of the first aspect.
The technical scheme provided by the disclosure can comprise the following beneficial effects:
in the sliding track display method provided by the embodiment of the disclosure, the sliding speed corresponding to each point in at least one point is predetermined, and then when the graph of the sliding track is displayed according to the sliding speed corresponding to each point, the change of the width of the graph of the sliding track is inversely related to the change of the sliding speed corresponding to the plurality of points, so that the graph of the sliding track is relatively similar to the graph obtained by a user sliding on paper by using a pen, therefore, the display effect of the graph of the sliding track is less different from the handwriting effect, and the graph of the sliding track displayed by the terminal in the embodiment of the disclosure is more like the graph obtained by sliding on paper by using a pen. In addition, the terminal in the embodiment of the present disclosure can also display the pen point of the sliding track, so that the display effect is enriched.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure, the drawings that are needed to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flow chart of a method of displaying a sliding track in accordance with an exemplary embodiment;
FIG. 2 is a flow chart of a method of another sliding trajectory display method provided in accordance with an exemplary embodiment;
FIG. 3 is a flowchart of a method for determining a track width in accordance with one illustrative embodiment;
FIG. 4 is a diagram illustrating a quadrilateral corresponding to a jth point in accordance with an illustrative embodiment;
FIG. 5 is a schematic diagram illustrating a graph showing a sliding trajectory in accordance with an exemplary embodiment;
FIG. 6 is a schematic diagram of a square corresponding to a jth point provided in accordance with an exemplary embodiment;
FIG. 7 is a diagram illustrating a target traversal point in accordance with an illustrative embodiment;
FIG. 8 is a schematic diagram illustrating an auxiliary triangle in accordance with an exemplary embodiment;
FIG. 9 is a schematic diagram illustrating another auxiliary triangle in accordance with an exemplary embodiment;
FIG. 10 is a schematic diagram illustrating a first type of displaying graphics according to a sliding operation in accordance with an exemplary embodiment;
FIG. 11 is a schematic diagram illustrating a second type of display of graphics based on a sliding operation in accordance with an exemplary embodiment;
FIG. 12 is a schematic diagram illustrating a third display of graphics based on a sliding operation in accordance with an exemplary embodiment;
FIG. 13 is a schematic illustration of a fourth type of display of graphics according to a sliding operation in accordance with an exemplary embodiment;
FIG. 14 is a schematic illustration of a fifth display of graphics according to a sliding operation in accordance with an exemplary embodiment;
FIG. 15 is a schematic illustration of a sixth exemplary display of graphics according to a sliding operation in accordance with an exemplary embodiment;
FIG. 16 is a schematic diagram illustrating a seventh display of graphics based on a slide operation in accordance with an exemplary embodiment;
FIG. 17 is a schematic diagram illustrating an eighth display of graphics according to a sliding operation in accordance with an exemplary embodiment;
FIG. 18 is a graphical illustration of a display according to a slide operation shown in accordance with an exemplary embodiment;
FIG. 19 is a graphical illustration of a sliding track provided by the related art;
fig. 20 is a schematic structural view of a sliding track display apparatus according to an exemplary embodiment;
FIG. 21 is a schematic diagram of a first display module provided in accordance with an exemplary embodiment;
fig. 22 is a schematic structural view of another sliding trajectory display device provided according to an exemplary embodiment;
fig. 23 is a schematic structural view of still another sliding trajectory display device provided in accordance with an exemplary embodiment;
fig. 24 is a schematic structural view of still another sliding trajectory display device provided in accordance with an exemplary embodiment;
fig. 25 is a schematic structural view of a sliding track display apparatus according to another exemplary embodiment;
fig. 26 is a schematic structural view of another sliding trajectory display device provided in accordance with another exemplary embodiment;
fig. 27 is a block diagram illustrating a sliding track display apparatus according to an exemplary embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, rather than all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
With the development of display technology, more and more terminals have a brush function. The terminal with the brush function can display a graph representing a sliding track of a sliding operation according to the sliding operation on the display screen. For example, the sliding operation for the display screen may be: and performing touch sliding operation on the touch display screen, or performing sliding operation on the display screen through a mouse.
Fig. 1 is a flowchart of a method of displaying a sliding track, which may be applied to a terminal, according to an exemplary embodiment. As shown in fig. 1, the sliding track display method may include:
in step 101, a plurality of points of a slide trajectory for representing a slide operation are sequentially determined according to one slide operation for a display screen.
In the embodiment of the present disclosure, the "point" refers to a point having a position feature on the display screen, and the position feature can be represented by coordinates in a preset coordinate system on the display screen.
In step 102, a slip velocity corresponding to each of a plurality of points is determined.
In step 103, a graph of the slide trajectory is displayed, and a change in the width of the graph of the slide trajectory is inversely correlated with a change in the slide speed corresponding to the plurality of points.
The figure of the slide trajectory is a figure reflecting the form of the slide trajectory.
In summary, in the sliding track display method provided by the embodiment of the present disclosure, the sliding speed corresponding to each point in at least one point is predetermined, and when the graph of the sliding track is displayed according to the sliding speed corresponding to each point, the change of the width of the graph of the sliding track can be negatively correlated with the change of the sliding speed corresponding to the plurality of points, so that the graph of the sliding track is relatively similar to the graph obtained by the user sliding on paper with a pen, and therefore, the display effect of the graph of the sliding track is less different from the handwriting effect.
Fig. 2 is a flowchart of another sliding trajectory display method that may be used for a terminal according to an exemplary embodiment. As shown in fig. 2, the sliding track display method may include:
in step 201, after receiving the width instruction, the target track width indicated by the width instruction is acquired.
When a user needs to use a brush function on the terminal, the user can perform width setting operation on the terminal to trigger the terminal to generate a width setting instruction for indicating the width of the target track, and acquire the width of the target track indicated by the width setting instruction. That is, the user needs to set the target trajectory width of the brush on the terminal.
In step 202, a plurality of points of a slide trajectory for representing a slide operation are sequentially determined according to one slide operation for a display screen.
The terminal detects the display screen once every preset time period so as to determine a point corresponding to the operation of the display screen during each detection. In the process that a user performs one-time sliding operation on a display screen, the terminal can perform touch point acquisition on the display screen for multiple times to determine z points corresponding to the sliding operation, wherein z is more than or equal to 1, and the z points are determined at z acquisition moments which are continuous in time sequence. It should be noted that, when the terminal determines each of the z points, the terminal records the coordinates of the point in the preset coordinate system on the display screen, and the coordinates of the z points are stored in time sequence.
When the one-time sliding operation for the display screen is a touch sliding operation for the touch display screen, during the one-time sliding operation for the display screen by the user, the user may sequentially press, slide, and lift a touch object (such as a finger or a stylus) on the touch display screen. In this process, the z points corresponding to the sliding operation determined by the terminal include: the touch control device comprises an initial point determined when a touch object is pressed on a touch control display screen, a point with the same position as the initial point, a point with the first position changed after the sliding operation is started and a point behind the point.
When the one-time sliding operation of the display screen is the sliding operation of the mouse on the display screen, in the process of the one-time sliding operation of the user on the display screen, the user can control the mouse to sequentially click the display screen, slide on the display screen in a state of clicking the display screen and stop clicking the display screen. In this process, the z points corresponding to the sliding operation determined by the terminal include: an initial point determined when the mouse clicks the display screen, a point at the same position as the initial point, and a point at which the position is first changed after the start of the sliding operation and a point after the first position change.
The terminal may determine a point where the position is first changed after the start of the sliding operation and a point after the first position change as a plurality of points of the sliding trajectory for representing the sliding operation in step 202. It should be noted that the z points determined by the terminal may include a point having the same position as the initial point in the normal case, so that the plurality of points of the slide trajectory used for representing the slide operation are the points after the second point in the z points in the normal case.
In step 203, a slip velocity corresponding to each of the plurality of points is determined.
The sliding speed at each of the plurality of points is: the average sliding speed from the point on each point to each point. After the terminal determines each point, the terminal can determine the sliding speed corresponding to each point. It should be noted that the previous point of the first point of the plurality of points is: the point that is the last of the z points. Assume that z points include: the method comprises an initial point, a point with the same position as the initial point and a plurality of points of a sliding track for representing the sliding operation, wherein the point which is the last point of the first point in the plurality of points is the point with the same position as the initial point. Assuming that i ≧ 2, the point immediately preceding the ith point in the plurality of points is: the i-1 th point of the plurality of points.
For example, after the terminal determines the ith point of the plurality of points, the terminal may acquire the coordinates of the ith point and the (i-1) th point of the plurality of points and the time for determining the ith point and the (i-1) th point, and then determine the sliding speed corresponding to the ith point according to the coordinates of the ith point, the coordinates of the (i-1) th point, the time for determining the ith point and the time for determining the (i-1) th point. Wherein, the sliding speed corresponding to the ith point
Figure GDA0002793511710000151
d(i-1,i)Is the distance between the ith point and the (i-1) th point, t(i-1,i)To determine the absolute value of the time difference between the ith point and the (i-1) th point.
For example, suppose d(i-1,i)About 71.81010064149748 unit lengths (e.g., one pixel corresponds to one unit length), t(i-1,i)At 17 milliseconds, the sliding speed at point i is about 4.2241235 units/millisecond.
In step 204, a track width corresponding to each of the plurality of points is determined based on the target track width and the sliding velocity corresponding to each of the plurality of points.
It should be noted that the track width corresponding to each point is negatively correlated with the sliding speed corresponding to each point, and the track width corresponding to each point is positively correlated with the target track width. That is, the track width corresponding to a certain point is smaller when the sliding speed of the user at the certain point is faster, and the track width corresponding to the certain point is larger when the sliding speed of the user at the certain point is slower.
Optionally, fig. 3 is a flowchart of a method for determining a track width according to an exemplary embodiment. w is greater than or equal to 1, the w-th point of the plurality of points is any one of the plurality of points, and step 204 will be explained in fig. 3 by taking the determination of the track width corresponding to the w-th point of the plurality of points as an example. As shown in fig. 3, step 204 may include:
in step 2041, the maximum width and the minimum width corresponding to the target track width are determined according to the preset width correspondence.
The terminal may have a width correspondence preset therein, where the width correspondence may include a maximum width and a minimum width corresponding to at least one track width, and the track width in the width correspondence is positively correlated with both the maximum width and the minimum width corresponding thereto. After determining the width of the target track, the terminal may determine the maximum width and the minimum width corresponding to the width of the target track according to the preset width correspondence.
In step 2042, a reference width corresponding to the w-th point is determined according to the reference width determination formula.
The reference width corresponding to the w-th point of the plurality of points is LcwThe reference width is determined by the formula
Figure GDA0002793511710000161
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding velocity, V, corresponding to the w-th pointyIs a preset sliding speed. For example, the preset slip speed may be 4 unit length/msec.
From this reference width determination formula, it can be known if VwGreater than VyThen LcwIs less than Lmin(ii) a If VwIs equal to VyThen LcwIs equal to Lmin(ii) a If VwLess than VyAnd V iswGreater than zero, then LcwIs greater than Lmin(ii) a If VwIs zero, then LcwIs equal to Lmax
In step 2043, the maximum width of the minimum width corresponding to the target track width and the reference width corresponding to the w-th point is determined as the expected width corresponding to the w-th point.
After determining the minimum width corresponding to the target track width and the reference width corresponding to the w-th point, the terminal may compare the minimum width with the reference width, and determine the largest width of the minimum width and the reference width as the expected width corresponding to the w-th point.
It should be noted that after the terminal determines the expected width corresponding to the w-th point, the terminal further needs to determine whether the w-th point meets a first preset condition, and determine whether the w-th point meets a second preset condition. Wherein the first preset condition may include: the w point is the first point of the plurality of points, and the sliding operation is the first sliding operation after the width setting instruction is received; the second preset condition may include: the w-th point is a point subsequent to the first point of the plurality of points.
In step 2044, when the w-th point meets the first preset condition, it is determined that the expected width corresponding to the w-th point is the track width corresponding to the w-th point.
When the w-th point is a first point of the plurality of points and the sliding operation is the first sliding operation after receiving the width setting instruction, the terminal may determine that the expected width corresponding to the w-th point is the track width corresponding to the w-th point. At this time, the track width corresponding to the w-th point determined by the terminal is inversely related to the sliding speed corresponding to the w-th point.
In practical application, when the w-th point meets the first preset condition, the terminal may further process the expected width corresponding to the first point in step 2044, for example, perform at least one of addition, subtraction, multiplication, and division on the expected width corresponding to the first point. Then, the terminal may determine whether the expected width corresponding to the processed first point is within a preset width range, where an upper limit of the preset width range is smaller than a maximum width corresponding to the target track width, and a lower limit of the preset width range is larger than a minimum width corresponding to the target track width. If the judgment result is: if the expected width corresponding to the processed first point is within the preset width range, the terminal can directly take the expected width corresponding to the processed first point as the track width corresponding to the first point; if the judgment result is: and if the expected width corresponding to the processed first point is outside the preset width range, the terminal can directly randomly select a width in the preset width range as the track width corresponding to the first point.
In step 2045, when the w-th point meets the second preset condition, the track width corresponding to the w-th point is determined according to the first width determination formula.
Wherein the width of the track corresponding to the ith point in the plurality of points is GiI is greater than or equal to 2, and the first width determination formula is as follows:
Figure GDA0002793511710000171
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width of the ith point is the distance between the ith point and the (i-1) th point, the distance between the ith point and the ith-1 th point is the distance corresponding to the ith pointThe absolute value of the difference between the expected width corresponding to a point and the width of the track corresponding to the (i-1) th point is the absolute value corresponding to the ith point, ZiThe minimum value of the distance and the absolute value corresponding to the ith point.
That is, when the w-th point is a point subsequent to the first point of the plurality of points (for example, when w is 2), the terminal may determine that the w-th point satisfies the second preset condition, and determine the track width corresponding to the w-th point according to a distance between the w-th point and the w-1-th point, a track width corresponding to the w-1-th point, an expected width corresponding to the w-th point, and the first width determination formula. At this time, the track width corresponding to the w-th point determined by the terminal is positively correlated with the target track width, negatively correlated with the sliding speed corresponding to the w-th point, and correlated with the track width corresponding to the w-1 th point.
In step 2046, when the w-th point does not satisfy the first preset condition and the second preset condition, determining that the expected width corresponding to the w-th point is the track width corresponding to the last point of the sliding track used for representing the last sliding operation.
When the w-th point is a first point (that is, w is 1) of the plurality of points, and the current sliding operation is not the first sliding operation after the width setting instruction is received, the terminal may determine that the w-th point does not satisfy the first preset condition and the second preset condition. At this time, the terminal may obtain a track width corresponding to a last point of the sliding track used for representing the last sliding operation, and determine that a track width corresponding to the w-th point is the track width corresponding to the last point.
In practical application, when the track width corresponding to the first point of the multiple points is determined, step 2044 may be directly executed without determining whether the sliding operation is the first sliding operation after receiving the width setting instruction.
In step 205, a sliding pattern for each of a plurality of points is determined.
After the terminal determines the w-th point, the coordinates of the w-th point and the coordinates of the w-1-th point in the plurality of points can be obtained, and then the sliding mode of the w-th point is determined according to the coordinates of the w-th point and the coordinates of the w-1-th point.
When the abscissa distance between the w-th point and the w-1 th point is greater than the ordinate distance, the sliding mode of the w-th point is a transverse sliding mode (namely the w-th point is a point which tends to slide transversely on the display screen), and when the abscissa distance between the w-th point and the w-1 th point in a preset coordinate system is less than or equal to the ordinate distance, the sliding mode of the w-th point is a longitudinal sliding mode (namely the w-th point is a point which tends to slide longitudinally on the display screen).
For example, assuming that the coordinates of the w-1 th point in the preset coordinate system are (1, 2), and the coordinates of the w-th point in the preset coordinate system are (3, 3), the terminal may determine that the abscissa distance between the w-th point and the w-1 th point is 2, the ordinate distance between the w-th point and the w-1 th point is 1, that is, the abscissa distance between the w-th point and the w-1 th point is greater than the ordinate distance, and at this time, the terminal may determine that the sliding mode of the w-th point is the lateral sliding mode.
Assuming that the coordinates of the w-1 th point in the preset coordinate system are (1, 2) and the coordinates of the w-th point in the preset coordinate system are (2, 4), the terminal may determine that the abscissa distance between the w-th point and the w-1 th point is 1, and the ordinate distance between the w-th point and the w-1 th point is 2, that is, the abscissa distance between the w-th point and the w-1 th point is smaller than the ordinate distance, and at this time, the terminal may determine that the sliding mode of the w-th point is the longitudinal sliding mode.
In step 206, a graph of the sliding trajectory is displayed according to the width of the trajectory corresponding to each of the plurality of points and the sliding manner of each of the target points.
Alternatively, the terminal may determine all points of the plurality of points except the first point as the target point. That is, the target point of the plurality of points includes the jth point of the plurality of points, j ≧ 2. The terminal can display the quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last point of each target point and the sliding mode of each target point. Wherein, the last point of the jth point is the jth-1 point of the multiple points, and the quadrangle corresponding to the jth point comprises: the device comprises a first side and a second side which are parallel and opposite, wherein the j-1 st point is positioned at the midpoint of the first side, the j-th point is positioned at the midpoint of the second side, the length of the first side is equal to the width of a track corresponding to the j-1 st point, and the length of the second side is equal to the width of the track corresponding to the j-th point.
Fig. 4 is a schematic diagram of a quadrangle corresponding to a jth point, provided according to an exemplary embodiment, where as shown in fig. 4, the quadrangle corresponding to the jth point includes: the first side B1 and the second side B2 are parallel and opposite to each other, the j-1 st point is positioned at the midpoint of the first side B1, the j-th point is positioned at the midpoint of the second side B2, the length of the first side B1 is equal to the track width corresponding to the j-1 st point, and the length of the second side B2 is equal to the track width corresponding to the j-th point.
When the sliding mode of the jth point is the transverse sliding mode, the first side B1 and the second side B2 of the quadrangle corresponding to the jth point are both parallel to the ordinate axis Y of the preset coordinate system; when the sliding mode of the jth point is the longitudinal sliding mode, the first side B1 and the second side B2 of the quadrangle corresponding to the jth point are both parallel to the abscissa axis X of the preset coordinate system. In fig. 4, the sliding manner at the jth point is taken as a longitudinal sliding manner as an example.
When the terminal displays the quadrangle corresponding to each target point, all the quadrangles displayed by the terminal form a graph of the sliding track, at this time, the plurality of points are all located in the graph of the sliding track, and the width of the position where each point is located in the plurality of points in the graph of the sliding track is equal to the width of the track corresponding to each point (namely the length of the side where each point is located in the quadrangle where each point is located).
For example, fig. 5 is a schematic diagram illustrating a graph showing a sliding trajectory according to an exemplary embodiment, where the sliding direction is the direction F1 shown in fig. 5, the terminal displays a quadrangle corresponding to each target point among a plurality of points, and the plurality of points are located on the sides of the quadrangles, but the initial point is not located in the quadrangles.
And step 207, when the plurality of points include the intersection target point, displaying a square corresponding to the intersection target point, wherein the plurality of points include a next point of the intersection target point, and the sliding mode of the intersection target point is different from that of the next point of the intersection target point.
Optionally, after the terminal displays the quadrangle corresponding to each target point, if the plurality of points include a next point of the target point, it may be determined whether the sliding manner of the target point is the same as the sliding manner of the next point, and when the sliding manner of the target point is different from the sliding manner of the next point, the target point is determined to be a crossing target point, and a square corresponding to the crossing target point is displayed. Wherein, four vertexes of the square corresponding to the intersection target point include: the two end points of the second side in the quadrangle corresponding to the intersection target point and the two end points of the first side in the quadrangle corresponding to the next point of the intersection target point.
Fig. 6 is a schematic diagram of a square corresponding to a jth point provided in accordance with an example embodiment. After the terminal displays the quadrangle corresponding to the j +1 th point, as shown in fig. 6, when the sliding mode of the j th point is a longitudinal sliding mode and the sliding mode of the j +1 th point is a transverse sliding mode, the terminal determines that the j th point is a crossing target point and displays the square corresponding to the j th target point. Wherein, the four vertexes of the square corresponding to the jth point comprise: the j-th point corresponds to two end points D1 and D2 of the second side in the quadrangle, and the j + 1-th point corresponds to two end points D3 and D4 of the first side in the quadrangle. That is, a triangular blank area K may exist at a position where the sliding manner is switched in the graph of the sliding track, and the terminal may display a square corresponding to the jth point to make up the triangular blank area K, so that the plurality of quadrangles in the graph of the sliding track can be in smooth transition.
Optionally, in the embodiment of the present disclosure, when the plurality of points include the intersection target point, the terminal displays a square corresponding to the intersection target point. In practical application, the terminal may further display a right triangle corresponding to the intersection target point when the plurality of points include the intersection target point. At this time, the three vertices of the right triangle corresponding to the j-th point include: the jth point, an end point of the second side in the quadrangle corresponding to the jth point, and an end point of the first side in the quadrangle corresponding to the j +1 point, and any point in the right triangle is located outside the quadrangle corresponding to the jth point and the quadrangle corresponding to the j +1 point.
In step 208, the next point and the previous point of the intersection target point are determined to be comparison points of the intersection target point.
After the terminal determines the last point of the plurality of points and displays the quadrangle corresponding to each target point and the square corresponding to the intersection target point, the terminal can determine that the next point and the previous point of the intersection target point are comparison points of the intersection target point. Referring to fig. 6, the jth point is a crossing target point, and the terminal may determine the jth-1 point and the jth +1 point as comparison points of the jth point, that is, determine that each point adjacent to the crossing target point is a comparison point of the crossing target point.
In step 209, a vertex close to each comparison point of the intersection target point in the square corresponding to the intersection target point and the target coordinate of the intersection target point is determined as a reference vertex of each comparison point.
When the sliding mode of each comparison point is a transverse sliding mode, the target coordinate is a vertical coordinate in a preset coordinate system, and when the sliding mode corresponding to each comparison point is a longitudinal sliding mode, the target coordinate is a horizontal coordinate in the preset coordinate system. The terminal needs to determine the reference vertex for each comparison point.
With continued reference to fig. 6, the square corresponding to the j-th point has four vertices D1, D2, D3 and D4. The abscissa of D1 and D2 in the four vertexes is the same as the abscissa of the j-th point, and the ordinate of D3 and D4 is the same as the ordinate of the j-th point. When the comparison point is the j-1 st point, if the sliding mode of the j-1 st point is the longitudinal sliding mode (as shown in fig. 6), the terminal may use the vertex (e.g., D4) close to the j-1 st point of D3 and D4 among the four vertices as the reference vertex of the j-1 st point. In addition, if the sliding manner of the j-1 st point is a lateral sliding manner, the terminal may use a vertex close to the j-1 st point among the four vertices D1 and D2 as a reference vertex of the j-1 st point.
It should be noted that, the process of determining, by the terminal, the reference vertex of the j +1 th point when the comparison point is the j +1 th point may refer to the process of determining, by the terminal, the reference vertex of the j-1 th point when the comparison point is the j-1 th point, and details of the embodiment of the present disclosure are not described herein.
In step 210, at least one traversal point which is the same as and continuous to the sliding mode of each comparison point is determined, wherein the at least one traversal point comprises each comparison point and does not comprise each crossing target point, and the target coordinates of the at least one traversal point are sequentially arranged along the direction far away from the target coordinates of the crossing target points.
After determining the reference vertex of the j +1 th point, the terminal may sequentially determine whether the j +1 th point of the plurality of points and each point after the j +1 th point satisfy at least one of the three first conditions, starting from the j +1 th point. By way of example, the three first conditions may include: (1) the currently judged point is the last point of the plurality of points; (2) the plurality of points comprise points after the j +1 th point, and when the points after the j +1 th point in the plurality of points are judged, the sliding mode of the currently judged point is different from that of the j +1 th point; (3) the plurality of points include points subsequent to the j +1 th point, and when points subsequent to the j +1 th point among the plurality of points are judged, the target coordinates of the currently judged point and the target coordinates of the intersecting target point are both larger than the target coordinates of the last judged point, or the target coordinates of the currently judged point and the target coordinates of the intersecting target point are both smaller than the target coordinates of the last judged point, or the target coordinates of the currently judged point are equal to the target coordinates of the last judged point.
When a certain point satisfies at least one of the three first conditions, the terminal may stop determining the j +1 th point and the points thereafter, and regard a point that has currently been determined not to satisfy the conditions (2) and (3) of the three first conditions as at least one traversal point. So that the sliding mode of each traversal point is the same as that of the j +1 th point, at least one traversal point is continuous, and the target coordinates of the traversal points are more and more far away from the target coordinates of the intersecting target point.
After determining the reference vertex of the j-1 th point, the terminal may sequentially determine whether the j-1 th point of the plurality of points and each point before the j-1 th point satisfy at least one of the three second conditions, starting from the j-1 th point. As an example, the three second conditions may include: (1) the currently judged point is the first point of the plurality of points; (2) the plurality of points comprise points before the j-1 th point, and when the points before the j-1 th point in the plurality of points are judged, the sliding mode of the currently judged point is different from that of the j-1 th point; (3) the plurality of points include points before the j-1 th point, and when judging the points before the j-1 th point in the plurality of points, the target coordinate of the currently judged point and the target coordinate of the crossed target point are both larger than the target coordinate of the last judged point, or the target coordinate of the currently judged point and the target coordinate of the crossed target point are both smaller than the target coordinate of the last judged point, or the target coordinate of the currently judged point is equal to the target coordinate of the last judged point.
When a certain point satisfies at least one of the three second conditions, the terminal may stop determining the j-1 st point and the points before the j-1 st point, and regard a point that has been currently determined not to satisfy the conditions (2) and (3) of the three second conditions as at least one traversal point. The sliding mode of each traversal point is the same as that of the j-1 th point, at least one traversal point is continuous, and the target coordinates of the traversal points are more and more far away from the target coordinates of the crossed target points.
In step 211, a target traversal point for each comparison point of the at least one traversal point is determined when the target coordinates of the at least one traversal point are both located between the target coordinates of the intersecting target point and the target coordinates of the reference vertex for each comparison point.
After determining at least one traversal point of each comparison point, the terminal can also judge whether the target coordinates of the traversal points are located between the target coordinates of the intersecting target point and the target coordinates of the reference vertex of each comparison point. When the target coordinate of each traversal point is located between the target coordinate of the intersecting target point and the target coordinate of the reference vertex of each comparison point, the terminal may determine, as the target traversal point, the traversal point whose distance from the target coordinate of the reference vertex is the smallest among the at least one traversal point.
As shown in fig. 6, the sliding manner at the j +1 th point is a lateral sliding manner. When the j +1 th point is a comparison point, at least one traversal point of the j +1 th point includes: the terminal may determine that the abscissa of the j +1 th point, the j +2 th point, the j +4 th point, the j +5 th point, the j +6 th point and the j +7 th point is located between the abscissa of the j +1 th point and the abscissa of the reference vertex D2, and the abscissa of the j +4 th point, the j +5 th point, the j +6 th point and the j +7 th point is not located between the abscissa of the j th point and the abscissa of the reference vertex D2, at which time, the terminal may not determine the target traversal point of the j +1 th point. With continued reference to fig. 6, the sliding manner of the j-1 th point is a longitudinal sliding manner, the at least one traversal point which is the same as the sliding manner of the j-1 th point and is continuous includes the j-1 th point, the terminal may determine that the ordinate of the j-1 th point is located between the ordinate of the j-1 th point and the ordinate of the reference vertex D4, and determine that the target traversal point of the j-1 th point is the j-1 th point.
As shown in fig. 7, assuming that the sliding direction of the sliding operation is the direction F2 in fig. 7, the sliding manner at the j +1 th point is the longitudinal sliding manner. When the j +1 th point is a comparison point, the at least one traversal point which is continuous in the same sliding manner as the j +1 th point includes the j +1 th point and the j +2 th point, the terminal may determine that the ordinate of the j +1 th point and the ordinate of the j +2 th point are both located between the ordinate of the j th point and the ordinate of the reference vertex D4, and determine that the target traversal point is the j +2 th point. With continued reference to fig. 7, the sliding manner of the j-1 th point is a horizontal sliding manner, and at least one traversal point that is the same as and consecutive to the sliding manner of the j-1 th point includes: the terminal can determine that the abscissa of the j-1 st point, the j-2 nd point, the j-3 rd point, the j-4 th point and the j-5 th point is located between the abscissa of the j-1 th point and the abscissa of the reference vertex D2, and determine that the target traversal point is the j-5 th point.
In step 212, the auxiliary triangle corresponding to the reference vertex of each comparison point is displayed according to the reference vertex of each comparison point and the target traversal point.
After the terminal displays the graph shown in fig. 6, as shown in fig. 8, after determining the reference vertex D4 of the j-1 th point and the target traversal point (the j-1 th point), the terminal may display an auxiliary triangle corresponding to the reference vertex D4, where three vertices of the auxiliary triangle include: the reference vertex D4 and two end points D5 and D6 of the side where the j-1 point in the quadrangle corresponding to the j point are located.
After the terminal displays the graph shown in fig. 7, as shown in fig. 9, after determining the reference vertex D2 of the j-1 st point and the target traversal point (the j-5 th point), the terminal may display an auxiliary triangle corresponding to the reference vertex D2, where three vertices of the auxiliary triangle include: the reference vertex D2 and two end points D7 and D8 of the side where the j-5 th point in the quadrangle corresponding to the j-4 th point are located. After determining the reference vertex D4 of the j +1 th point and the target traversal point (the j +2 th point), the terminal may display an auxiliary triangle corresponding to the reference vertex D4, where the three vertices of the auxiliary triangle include: the reference vertex D4 and two endpoints D9 and D10 of the side where the j +2 th point in the quadrangle corresponding to the j +2 th point is located.
Under a general condition, an auxiliary triangle displayed by the terminal appears at the edge of the graph of the sliding track, and the auxiliary triangle is equivalent to the pen point of the sliding track, so that the terminal can also display the pen point of the sliding track in the embodiment of the disclosure, and the display effect is enriched.
In practical applications, when the terminal determines each point in step 210 (e.g., determines whether the j +1 th point and the following points satisfy three first conditions, and determines whether the j-1 th point and the preceding points satisfy three second conditions), it may also determine whether the currently determined point satisfies a third condition. The third condition may include: the target coordinates of the reference vertex of the comparison point are located between the target coordinates of the intersecting target point and the target coordinates of the currently judged point. If a certain point satisfies the third condition, the determination of the other point is stopped, and execution of steps 211 and 212 is prohibited.
In the embodiment of the present disclosure, when the terminal displays a quadrangle, a square, and a triangle (such as the aforementioned auxiliary triangle or the aforementioned right triangle), the terminal may display a solid figure (i.e., a figure surrounded by lines connected in sequence and filled in the figure), or display a hollow figure (i.e., a figure surrounded by lines connected in sequence and not filled in the figure), which is not limited in the embodiment of the present disclosure.
For example, when a user performs a sliding operation (e.g., writing a stroke on the terminal) on the terminal, the terminal may display a graphic of the sliding operation by using the method provided by the embodiment of the present disclosure. And the graphs of the sliding operation displayed by the terminal are different according to different sliding operations. For example, the principle of the different sliding operation graphs displayed by the terminal according to the different sliding operations may be as shown in any one of fig. 8 to 16, and the graphs of the sliding operations displayed in each graph may include: the pattern of the sliding track, the square, and the auxiliary triangle.
When the user performs a plurality of sliding operations on the terminal, the terminal displays a graph (including the graph of the sliding track, the square and the auxiliary triangle) of each sliding operation. By way of example, the graphics of the multiple swipe operation can be composed of one word (one word "phase" as shown in fig. 17) or multiple words (two words "watch" as shown in fig. 18).
Since the width of the graph of the sliding track displayed by the terminal in the embodiment of the disclosure changes along with the sliding speed, the graph of the sliding track displayed by the terminal more conforms to the graph obtained by the user sliding on paper with a pen. While the graph of the sliding trace displayed by the terminal in the related art may be as shown in fig. 19, the width of the graph of the sliding trace is always kept consistent, and the graph of the sliding trace is greatly different from the graph obtained by the user sliding on the paper with the pen. Through comparison, it can be found that the display effect of the graph of the sliding track in the sliding track display method provided by the embodiment of the disclosure is less different from the handwriting effect, and the graph of the sliding track displayed by the terminal in the embodiment of the disclosure is like a graph obtained by sliding a pen on paper.
It should be noted that the sliding track display method provided by the embodiment of the present disclosure may be used in a terminal installed with various operating systems, so that the sliding track display method provided by the embodiment of the present disclosure can be used in various operating systems.
It should be further noted that, in the embodiment of the present disclosure, the terminal displays at least one quadrangle corresponding to at least one target point, and optionally, after displaying the first quadrangle, the terminal may further display an initial graph according to a point before the point of which the position is changed for the first time in the z points determined in step 201. For example, the points before the point of the first position change in the z points may all be located at the first coordinate point on the preset coordinate system, and the initial graph may be defined by a target edge of the first quadrangle where the point of the first position change is located and a curve (or a broken line) connecting two ends of the target edge. The first coordinate point is located in the initial graph, and the distance between the first coordinate point and the curve (or the broken line) in the direction perpendicular to the target edge is positively correlated with the number of points before the point of the first position change.
In summary, in the sliding track display method provided by the embodiment of the present disclosure, the sliding speed corresponding to each point in at least one point is predetermined, and when the graph of the sliding track is displayed according to the sliding speed corresponding to each point, the change of the width of the graph of the sliding track can be negatively correlated with the change of the sliding speed corresponding to the plurality of points, so that the graph of the sliding track is relatively similar to the graph obtained by the user sliding on paper with a pen, and therefore, the display effect of the graph of the sliding track is less different from the handwriting effect.
Fig. 20 is a schematic structural diagram of a sliding track display apparatus according to an exemplary embodiment, and as shown in fig. 20, the sliding track display apparatus 200 may include:
a first determining module 2001, configured to sequentially determine, according to one sliding operation for the display screen, a plurality of points of a sliding trajectory for representing the sliding operation;
a second determining module 2002, configured to determine a sliding speed degree corresponding to each of the plurality of points;
a first display module 2003, configured to display a graph of the sliding track, where a change in a width of the graph of the sliding track is inversely related to a change in the sliding speed corresponding to the plurality of points.
In summary, in the sliding track display device provided in the embodiment of the disclosure, the second determining module determines the sliding speed corresponding to each point in the at least one point in advance, and then the first display module can make the change of the width of the graph of the sliding track negatively correlated with the change of the sliding speed corresponding to the plurality of points when displaying the graph of the sliding track according to the sliding speed corresponding to each point, so that the graph of the sliding track is relatively similar to the graph obtained by a user sliding on paper with a pen, and therefore, the display effect of the graph of the sliding track is improved.
Optionally, the first determining module 2001 is configured to: according to one sliding operation for the display screen, a point at which the position is first changed after the sliding operation is started and points after the point are determined as the plurality of points.
Fig. 21 is a schematic structural diagram of a first display module according to an exemplary embodiment, and as shown in fig. 21, the first display module 2003 may include:
a determining unit 20031, configured to determine, according to the sliding speed corresponding to each point, a track width corresponding to each point, where the track width corresponding to each point is inversely related to the sliding speed corresponding to each point;
a display unit 20032, configured to display a quadrangle corresponding to each target point according to a track width corresponding to each target point and a track width corresponding to a previous point of each target point, where a graph of the sliding track includes the quadrangle corresponding to each target point, and the target point is a point after a first point of the multiple points;
wherein the target point of the plurality of points includes a jth point of the plurality of points, j is greater than or equal to 2, a last point of the jth point is a j-1 point of the plurality of points, and a quadrangle corresponding to the jth point includes: the device comprises a first edge and a second edge which are parallel and opposite to each other, wherein the j-1 th point is located at the midpoint of the first edge, the j-th point is located at the midpoint of the second edge, the length of the first edge is equal to the width of a track corresponding to the j-1 th point, and the length of the second edge is equal to the width of the track corresponding to the j-th point.
Fig. 22 is a schematic structural diagram of another sliding track display device according to an exemplary embodiment, and as shown in fig. 22, on the basis of fig. 20, the sliding track display device 200 may further include:
a third determining module 2004, configured to determine a sliding manner of each point, where w is greater than or equal to 1, when an abscissa distance between a w-th point of the multiple points and a w-1-th point in a preset coordinate system on the display screen is greater than an ordinate distance, the sliding manner of the w-th point is a transverse sliding manner, and when the abscissa distance between the w-th point and the w-1-th point in the preset coordinate system is less than or equal to the ordinate distance, the sliding manner of the w-th point is a longitudinal sliding manner;
the display unit 20032 can be used for: displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last target point of each target point and the sliding mode of each target point; when the sliding mode of the jth point is the transverse sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to a vertical coordinate axis of the preset coordinate system; and when the sliding mode of the jth point is the longitudinal sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to an abscissa axis of the preset coordinate system.
Fig. 23 is a schematic structural diagram of another sliding track display device according to an exemplary embodiment, and as shown in fig. 23, on the basis of fig. 22, the sliding track display device 200 may further include:
a fourth determining module 2005, configured to determine, after receiving the width setting instruction, a target track width indicated by the width setting instruction;
the determination unit 2003 may be used to:
determining the maximum width and the minimum width corresponding to the target track width according to a preset width corresponding relation, wherein the width corresponding relation comprises the maximum width and the minimum width corresponding to at least one track width, and the track width is positively correlated with the maximum width and the minimum width corresponding to the track width;
determining a reference width corresponding to each point according to a reference width determination formula, wherein the reference width corresponding to the w-th point in the plurality of points is LcwW is more than or equal to 1, and the reference width determination formula is
Figure GDA0002793511710000281
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding speed, V, corresponding to the w-th pointyA preset sliding speed is set;
determining the minimum width corresponding to the target track width and the maximum width in the reference width corresponding to each point as the expected width corresponding to each point;
when each point meets a first preset condition, determining the expected width corresponding to each point as the track width corresponding to each point, where the first preset condition includes: the each point is a first point of the plurality of points.
Optionally, the determining unit 2003 is further configured to:
when each point meets a second preset condition, determining the track width corresponding to each point according to a first width determination formula, wherein the second preset condition comprises that: the each point is a point subsequent to a first point of the plurality of points;
wherein the track width corresponding to the ith point in the plurality of points is GiI is more than or equal to 2, and the first width determination formula is as follows:
Figure GDA0002793511710000291
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width corresponding to the ith point is the distance between the ith point and the (i-1) th point, and the ith point is the distance corresponding to the ith pointThe absolute value of the difference value between the expected width corresponding to the point and the track width corresponding to the (i-1) th point is the absolute value corresponding to the ith point, ZiAnd the minimum value of the distance and the absolute value corresponding to the ith point is obtained.
Optionally, the first preset condition further includes: the slide operation is the first slide operation after receiving the width setting instruction, and the determination unit 2003 may be further configured to:
and when the each point does not meet the first preset condition and the second preset condition, determining the expected width corresponding to the each point as the track width corresponding to the last point of the sliding track for representing the last sliding operation.
Fig. 24 is a schematic structural diagram of still another sliding track display device according to an exemplary embodiment, and as shown in fig. 24, on the basis of fig. 22, the sliding track display device 200 may further include:
a second display module 2006, configured to display a square corresponding to the intersection target point when the plurality of points include an intersection target point, where the plurality of points include a next point of the intersection target point, and a sliding manner of the intersection target point is different from a sliding manner of the next point of the intersection target point;
wherein the four vertices of the square corresponding to the intersection target points include: the intersection target point corresponds to two end points of a second edge in the quadrangle, and the intersection target point corresponds to a next end point of a first edge in the quadrangle.
Fig. 25 is a schematic structural diagram of a sliding track display device according to another exemplary embodiment, and as shown in fig. 25, on the basis of fig. 22, the sliding track display device 200 may further include:
a third display module 2007, configured to display a square corresponding to the intersection target point when the plurality of points include an intersection target point, the plurality of points include a next point of the intersection target point, and a sliding manner of the intersection target point is different from a sliding manner of the next point of the intersection target point;
wherein, three vertexes of the right triangle corresponding to the intersection target point include: the intersection target point, an end point of a second side in the quadrangle corresponding to the intersection target point, and an end point of a first side in the quadrangle corresponding to a next point of the intersection target point, and any point in the right triangle is located outside the quadrangle corresponding to the intersection target point and the quadrangle corresponding to the next point of the intersection target point.
Fig. 26 is a schematic structural diagram of another sliding track display device according to another exemplary embodiment, and as shown in fig. 26, on the basis of fig. 24, the sliding track display device 200 may further include:
a fifth determining module 2008, configured to determine that a next point and a previous point of the crossing target point are both comparison points of the crossing target point;
a sixth determining module 2009, configured to determine, as a reference vertex of each comparison point, a vertex of each comparison point close to the intersection target point in a square corresponding to the intersection target point, where the vertex is the same as a target coordinate of the intersection target point, where the target coordinate is a vertical coordinate in the preset coordinate system when a sliding manner of each comparison point is a horizontal sliding manner, and the target coordinate is a horizontal coordinate in the preset coordinate system when the sliding manner of each comparison point is a vertical sliding manner;
a seventh determining module 2010, configured to determine at least one traversal point of the plurality of points that slides in the same and consecutive manner as the each comparison point, where the at least one traversal point includes the each comparison point and does not include the each intersection target point, and the target coordinates of the at least one traversal point are sequentially arranged in a direction away from the target coordinates of the intersection target points;
an eighth determining module 2011, configured to determine, when the target coordinates of the at least one traversal point are located between the target coordinates of the intersection and the target coordinates of the reference vertex of each comparison point, a traversal point, of the at least one traversal point, whose distance from the target coordinates of the reference vertex of each comparison point is the smallest, as the target traversal point;
a fourth display module 2012, configured to display, according to the reference vertex of each comparison point and the target traversal point, an auxiliary triangle corresponding to the reference vertex of each comparison point, where three vertices of the auxiliary triangle corresponding to the reference vertex of each comparison point include: and the reference vertex of each comparison point and two end points of the edge of the target traversal point in the quadrangle corresponding to the target traversal point.
In summary, in the sliding track display device provided in the embodiment of the disclosure, the second determining module determines the sliding speed corresponding to each point in the at least one point in advance, and then when the first display module displays the graph of the sliding track according to the sliding speed corresponding to each point, the first display module can make the change of the width of the graph of the sliding track negatively correlated with the change of the sliding speed corresponding to the plurality of points, so that the graph of the sliding track is relatively similar to the graph obtained by the user sliding on paper with a pen, and therefore, the display effect of the graph of the sliding track is less different from the handwriting effect.
Fig. 27 is a block diagram illustrating a device for displaying a sliding trace 2700 according to an exemplary embodiment. For example, the apparatus 2700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 27, the apparatus 2700 may include one or more of the following components: a processing component 2702, a memory 2704, a power component 2706, a multimedia component 2708, an audio component 2710, an input/output (j/O) interface 2712, a sensor component 2714, and a communications component 2716.
The processing component 2702 generally controls the overall operation of the device 2700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 2702 may include one or more processors 2720 to execute instructions to perform all or part of the steps of the methods described above. Further, processing component 2702 can include one or more modules that facilitate interaction between processing component 2702 and other components. For example, the processing component 2702 can include a multimedia module to facilitate interaction between the multimedia component 2708 and the processing component 2702.
The memory 2704 is configured to store various types of data to support operation at the apparatus 2700. Examples of such data include instructions for any application or method operating on the device 2700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 2704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 2706 provides power to the various components of the device 2700. The power components 2706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 2700.
The multimedia component 2708 comprises a screen providing an output interface between the device 2700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 2708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 2700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 2710 is configured to output and/or input audio signals. For example, the audio component 2710 includes a microphone (MjC) configured to receive external audio signals when the device 2700 is in operating modes, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 2704 or transmitted via the communication component 2716. In some embodiments, the audio component 2710 also includes a speaker for outputting audio signals.
j/O interface 2712 provides an interface between processing component 2702 and peripheral interface modules, which can be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 2714 includes one or more sensors for providing various aspects of condition assessment for the apparatus 2700. For example, the sensor assembly 2714 can detect the open/closed state of the device 2700, the relative positioning of the components, such as a display and keypad of the device 2700, the change in position of the device 2700 or a component of the device 2700, the presence or absence of user contact with the device 2700, the orientation or acceleration/deceleration of the device 2700, and the change in temperature of the device 2700. The sensor assembly 2714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 2714 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 2714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 2716 is configured to facilitate communication between the apparatus 2700 and other devices in a wired or wireless manner. The device 2700 may access a wireless network based on a communication standard, such as WjFj, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 2716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 2716 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on radio frequency identification (RFjD) technology, infrared data association (jrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 2700 may be implemented by one or more application specific integrated circuits (ASjC), Digital Signal Processors (DSP), Digital Signal Processing Devices (DSPD), Programmable Logic Devices (PLD), Field Programmable Gate Arrays (FPGA), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as the memory 2704 including instructions that are executable by the processor 2720 of the apparatus 2700 to perform the above-described methods. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, instructions in which, when executed by a processor of the apparatus 2700, enable the apparatus 2700 to perform the sliding trajectory display method described above.
It should be noted that, the method embodiments provided in the embodiments of the present disclosure can be mutually referred to corresponding apparatus embodiments, and the embodiments of the present disclosure do not limit this.
The sequence of the steps of the method embodiments provided in the embodiments of the present disclosure can be appropriately adjusted, and the steps can be correspondingly increased or decreased according to the circumstances, and any method that can be easily conceived by those skilled in the art within the technical scope of the present disclosure is covered by the protection scope of the present disclosure, and therefore, the detailed description is omitted.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A sliding track display method, comprising:
sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at the display screen;
determining a slip velocity corresponding to each of the plurality of points;
determining the track width corresponding to each point according to the sliding speed corresponding to each point, wherein the track width corresponding to each point is inversely related to the sliding speed corresponding to each point;
displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point and the track width corresponding to the last point of each target point, wherein the target point is a point behind the first point of the plurality of points;
displaying a graph of the sliding track, wherein the graph of the sliding track comprises a quadrangle corresponding to each target point;
wherein the target point of the plurality of points includes a jth point of the plurality of points, j is greater than or equal to 2, a last point of the jth point is a j-1 point of the plurality of points, and a quadrangle corresponding to the jth point includes: the first edge and the second edge are parallel and opposite, the j-1 point is positioned at the midpoint of the first edge, the j-point is positioned at the midpoint of the second edge, the length of the first edge is equal to the track width corresponding to the j-1 point, and the length of the second edge is equal to the track width corresponding to the j-point;
when the plurality of points include a crossing target point, displaying a square corresponding to the crossing target point, wherein the plurality of points include a next point of the crossing target point, the sliding mode of the crossing target point is different from the sliding mode of the next point of the crossing target point, the sliding mode includes a transverse sliding mode and a longitudinal sliding mode, and four vertexes of the square corresponding to the crossing target point include: two end points of a second side in the quadrangle corresponding to the intersection target point and two end points of a first side in the quadrangle corresponding to a next point of the intersection target point;
determining that the next point and the previous point of the crossed target points are comparison points of the crossed target points;
determining a vertex of each comparison point close to the intersection target point in a vertex of a square corresponding to the intersection target point, which is the same as a target coordinate of the intersection target point, as a reference vertex of each comparison point, wherein when the sliding mode of each comparison point is a transverse sliding mode, the target coordinate is a vertical coordinate in a preset coordinate system, and when the sliding mode of each comparison point is a longitudinal sliding mode, the target coordinate is a horizontal coordinate in the preset coordinate system;
determining at least one traversal point which is the same as and continuous with the sliding mode of each comparison point in the plurality of points, wherein the at least one traversal point comprises each comparison point and does not comprise each intersection target point, and the target coordinates of the at least one traversal point are sequentially arranged along the direction of the target coordinates far away from the intersection target points;
when the target coordinates of the at least one traversal point are located between the target coordinates of the intersecting target point and the target coordinates of the reference vertex of each comparison point, determining the traversal point with the minimum distance from the target coordinates of the reference vertex of each comparison point in the at least one traversal point as a target traversal point;
displaying the auxiliary triangle corresponding to the reference vertex of each comparison point according to the reference vertex of each comparison point and the target traversal point, wherein three vertices of the auxiliary triangle corresponding to the reference vertex of each comparison point comprise: and the reference vertex of each comparison point and two end points of the edge of the target traversal point in the quadrangle corresponding to the target traversal point.
2. The method of claim 1, wherein sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation on a display screen comprises:
according to one sliding operation for the display screen, a point at which the position is first changed after the sliding operation is started and points after the point are determined as the plurality of points.
3. The method of claim 2, further comprising:
determining a sliding mode of each point, wherein w is more than or equal to 1, when the distance between the horizontal coordinates of the w-th point and the w-1 th point in a preset coordinate system on the display screen is greater than the distance between the vertical coordinates, the sliding mode of the w-th point is a transverse sliding mode, and when the distance between the horizontal coordinates of the w-th point and the w-1 th point in the preset coordinate system is less than or equal to the distance between the vertical coordinates, the sliding mode of the w-th point is a longitudinal sliding mode;
the displaying the quadrangle corresponding to each target point according to the track width corresponding to each target point and the track width corresponding to the last point of each target point includes:
displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last target point of each target point and the sliding mode of each target point; when the sliding mode of the jth point is the transverse sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to a vertical coordinate axis of the preset coordinate system; and when the sliding mode of the jth point is the longitudinal sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to an abscissa axis of the preset coordinate system.
4. The method of claim 2, further comprising:
after receiving a width setting instruction, determining the width of a target track indicated by the width setting instruction;
determining the track width corresponding to each point according to the sliding speed corresponding to each point, including:
determining the maximum width and the minimum width corresponding to the target track width according to a preset width corresponding relation, wherein the width corresponding relation comprises the maximum width and the minimum width corresponding to at least one track width, and the track width is positively correlated with the maximum width and the minimum width corresponding to the track width;
determining a reference width corresponding to each point according to a reference width determination formula, wherein the reference width corresponding to the w-th point in the plurality of points is LcwW is more than or equal to 1, and the reference width determination formula is
Figure FDA0003105535030000021
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding speed, V, corresponding to the w-th pointyA preset sliding speed is set;
determining the minimum width corresponding to the target track width and the maximum width in the reference width corresponding to each point as the expected width corresponding to each point;
when each point meets a first preset condition, determining the expected width corresponding to each point as the track width corresponding to each point, where the first preset condition includes: the each point is a first point of the plurality of points.
5. The method according to claim 4, wherein the determining the track width corresponding to each point according to the sliding speed corresponding to each point further comprises:
when each point meets a second preset condition, determining the track width corresponding to each point according to a first width determination formula, wherein the second preset condition comprises that: the each point is a point subsequent to a first point of the plurality of points;
wherein the track width corresponding to the ith point in the plurality of points is GiI is more than or equal to 2, and the first width determination formula is as follows:
Figure FDA0003105535030000031
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width corresponding to the ith point is obtained, the distance between the ith point and the (i-1) th point is the distance corresponding to the ith point, the absolute value of the difference value between the expected width corresponding to the ith point and the track width corresponding to the (i-1) th point is the absolute value corresponding to the ith point, and Z is the absolute value corresponding to the ith pointiAnd the minimum value of the distance and the absolute value corresponding to the ith point is obtained.
6. The method of claim 5, wherein the first preset condition further comprises: the sliding operation is the first sliding operation after receiving the width setting instruction, and the determining the track width corresponding to each point according to the sliding speed corresponding to each point further includes:
and when the each point does not meet the first preset condition and the second preset condition, determining the expected width corresponding to the each point as the track width corresponding to the last point of the sliding track for representing the last sliding operation.
7. The method of claim 3, further comprising:
when the plurality of points comprise intersection target points, displaying right triangles corresponding to the intersection target points, wherein the plurality of points comprise the next point of the intersection target points, and the sliding mode of the intersection target points is different from that of the next point of the intersection target points;
wherein, three vertexes of the right triangle corresponding to the intersection target point include: the intersection target point, an end point of a second side in the quadrangle corresponding to the intersection target point, and an end point of a first side in the quadrangle corresponding to a next point of the intersection target point, and any point in the right triangle is located outside the quadrangle corresponding to the intersection target point and the quadrangle corresponding to the next point of the intersection target point.
8. A sliding track display device, characterized by comprising:
the display screen display control device comprises a first determining module, a second determining module and a display control module, wherein the first determining module is used for sequentially determining a plurality of points of a sliding track for representing the sliding operation according to one sliding operation aiming at a display screen;
a second determining module for determining a sliding speed corresponding to each point of the plurality of points;
the first display module is used for displaying the graph of the sliding track;
the first display module includes:
the determining unit is used for determining the track width corresponding to each point according to the sliding speed corresponding to each point, and the track width corresponding to each point is inversely related to the sliding speed corresponding to each point;
a display unit, configured to display a quadrangle corresponding to each target point according to a track width corresponding to each target point and a track width corresponding to a previous point of each target point, where a graph of the sliding track includes the quadrangle corresponding to each target point, and the target point is a point after a first point of the plurality of points;
wherein the target point of the plurality of points includes a jth point of the plurality of points, j is greater than or equal to 2, a last point of the jth point is a j-1 point of the plurality of points, and a quadrangle corresponding to the jth point includes: the first edge and the second edge are parallel and opposite, the j-1 point is positioned at the midpoint of the first edge, the j-point is positioned at the midpoint of the second edge, the length of the first edge is equal to the track width corresponding to the j-1 point, and the length of the second edge is equal to the track width corresponding to the j-point;
a second display module, configured to display a square corresponding to the intersection target point when the plurality of points include an intersection target point, where the plurality of points include a next point of the intersection target point, and a sliding manner of the intersection target point is different from a sliding manner of the next point of the intersection target point, where the sliding manner includes a transverse sliding manner and a longitudinal sliding manner, and four vertices of the square corresponding to the intersection target point include: two end points of a second side in the quadrangle corresponding to the intersection target point and two end points of a first side in the quadrangle corresponding to a next point of the intersection target point;
a fifth determining module, configured to determine that a next point and a previous point of the crossing target point are both comparison points of the crossing target point;
a sixth determining module, configured to determine, as a reference vertex of each comparison point, a vertex of each comparison point close to the intersection target point in a square corresponding to the intersection target point, where, when the sliding manner of each comparison point is a transverse sliding manner, the target coordinate is a vertical coordinate in a preset coordinate system, and when the sliding manner of each comparison point is a longitudinal sliding manner, the target coordinate is a horizontal coordinate in the preset coordinate system;
a seventh determining module, configured to determine at least one traversal point that is continuous and has the same sliding manner as each comparison point in the plurality of points, where the at least one traversal point includes each comparison point and does not include each intersection target point, and the target coordinates of the at least one traversal point are sequentially arranged in a direction away from the target coordinates of the intersection target points;
an eighth determining module, configured to determine, when the target coordinates of the at least one traversal point are located between the target coordinates of the intersecting target point and the target coordinates of the reference vertex of each comparison point, a traversal point, of the at least one traversal point, whose distance from the target coordinates of the reference vertex of each comparison point is the smallest, as a target traversal point;
a fourth display module, configured to display, according to the reference vertex of each comparison point and the target traversal point, an auxiliary triangle corresponding to the reference vertex of each comparison point, where three vertices of the auxiliary triangle corresponding to the reference vertex of each comparison point include: and the reference vertex of each comparison point and two end points of the edge of the target traversal point in the quadrangle corresponding to the target traversal point.
9. The sliding track display device according to claim 8, wherein the first determining module is configured to: according to one sliding operation for the display screen, a point at which the position is first changed after the sliding operation is started and points after the point are determined as the plurality of points.
10. The sliding track display device according to claim 9, further comprising:
a third determining module, configured to determine a sliding manner of each point, where w is greater than or equal to 1, when an abscissa distance between a w-th point of the multiple points and a w-1-th point in a preset coordinate system on the display screen is greater than an ordinate distance, the sliding manner of the w-th point is a transverse sliding manner, and when the abscissa distance between the w-th point and the w-1-th point in the preset coordinate system is less than or equal to the ordinate distance, the sliding manner of the w-th point is a longitudinal sliding manner;
the display unit is used for: displaying a quadrangle corresponding to each target point according to the track width corresponding to each target point, the track width corresponding to the last target point of each target point and the sliding mode of each target point; when the sliding mode of the jth point is the transverse sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to a vertical coordinate axis of the preset coordinate system; and when the sliding mode of the jth point is the longitudinal sliding mode, a first side of a quadrangle corresponding to the jth point is parallel to an abscissa axis of the preset coordinate system.
11. The sliding track display device according to claim 9, further comprising:
the fourth determining module is used for determining the width of the target track indicated by the width setting instruction after receiving the width setting instruction;
the determination unit is configured to:
determining the maximum width and the minimum width corresponding to the target track width according to a preset width corresponding relation, wherein the width corresponding relation comprises the maximum width and the minimum width corresponding to at least one track width, and the track width is positively correlated with the maximum width and the minimum width corresponding to the track width;
determining a reference width corresponding to each point according to a reference width determination formula, wherein the reference width corresponding to the w-th point in the plurality of points is LcwW is more than or equal to 1, and the reference width determination formula is
Figure FDA0003105535030000051
LmaxIs the maximum width, L, corresponding to the width of the target trackminIs the minimum width, V, corresponding to the width of the target trackwSliding speed, V, corresponding to the w-th pointyA preset sliding speed is set;
determining the minimum width corresponding to the target track width and the maximum width in the reference width corresponding to each point as the expected width corresponding to each point;
when each point meets a first preset condition, determining the expected width corresponding to each point as the track width corresponding to each point, where the first preset condition includes: the each point is a first point of the plurality of points.
12. The sliding track display device according to claim 11, wherein the determination unit is further configured to:
when each point meets a second preset condition, determining the track width corresponding to each point according to a first width determination formula, wherein the second preset condition comprises that: the each point is a point subsequent to a first point of the plurality of points;
wherein the track width corresponding to the ith point in the plurality of points is GiI is more than or equal to 2, and the first width determination formula is as follows:
Figure FDA0003105535030000061
&is represented by the formulai-1Track width, Y, for point i-1iThe expected width corresponding to the ith point is obtained, the distance between the ith point and the (i-1) th point is the distance corresponding to the ith point, the absolute value of the difference value between the expected width corresponding to the ith point and the track width corresponding to the (i-1) th point is the absolute value corresponding to the ith point, and Z is the absolute value corresponding to the ith pointiAnd the minimum value of the distance and the absolute value corresponding to the ith point is obtained.
13. The sliding track display device according to claim 12, wherein the first preset condition further includes: the sliding operation is a first sliding operation after receiving the width setting instruction, and the determination unit is further configured to:
and when the each point does not meet the first preset condition and the second preset condition, determining the expected width corresponding to the each point as the track width corresponding to the last point of the sliding track for representing the last sliding operation.
14. The sliding track display device according to claim 10, further comprising:
a third display module, configured to display a right triangle corresponding to the intersection target point when the plurality of points include an intersection target point, where the plurality of points include a next point of the intersection target point, and a sliding manner of the intersection target point is different from a sliding manner of the next point of the intersection target point;
wherein, three vertexes of the right triangle corresponding to the intersection target point include: the intersection target point, an end point of a second side in the quadrangle corresponding to the intersection target point, and an end point of a first side in the quadrangle corresponding to a next point of the intersection target point, and any point in the right triangle is located outside the quadrangle corresponding to the intersection target point and the quadrangle corresponding to the next point of the intersection target point.
15. A readable storage medium having stored therein instructions which, when run on a processing component, cause the processing component to perform the method of claims 1 to 7.
CN201711375389.8A 2017-12-19 2017-12-19 Sliding track display method and device Active CN107977147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711375389.8A CN107977147B (en) 2017-12-19 2017-12-19 Sliding track display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711375389.8A CN107977147B (en) 2017-12-19 2017-12-19 Sliding track display method and device

Publications (2)

Publication Number Publication Date
CN107977147A CN107977147A (en) 2018-05-01
CN107977147B true CN107977147B (en) 2021-07-23

Family

ID=62006998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711375389.8A Active CN107977147B (en) 2017-12-19 2017-12-19 Sliding track display method and device

Country Status (1)

Country Link
CN (1) CN107977147B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112230786A (en) * 2020-11-18 2021-01-15 广州市华用智能科技有限公司 Light selection method and device based on mouse sliding track and computer equipment
CN113448486B (en) * 2021-09-01 2021-12-24 广州朗国电子科技股份有限公司 Method and device for realizing pen point of electronic whiteboard, storage medium and electronic whiteboard

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308578A (en) * 2008-06-20 2008-11-19 华南理工大学 Beautifying method for hand-written Chinese characters
CN103744555A (en) * 2014-01-06 2014-04-23 溢洋光电(深圳)有限公司 Bidirectional display and reduction method for instant messaging handwriting as well as related system and method
CN104035681A (en) * 2014-06-30 2014-09-10 可牛网络技术(北京)有限公司 Webpage sliding method and browser
CN106293232A (en) * 2016-08-11 2017-01-04 江苏中威科技软件系统有限公司 A kind of hand-written inputting method realizing vigour of style in writing effect and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6472171B2 (en) * 2013-08-27 2019-02-20 キヤノン株式会社 Image processing apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308578A (en) * 2008-06-20 2008-11-19 华南理工大学 Beautifying method for hand-written Chinese characters
CN103744555A (en) * 2014-01-06 2014-04-23 溢洋光电(深圳)有限公司 Bidirectional display and reduction method for instant messaging handwriting as well as related system and method
CN104035681A (en) * 2014-06-30 2014-09-10 可牛网络技术(北京)有限公司 Webpage sliding method and browser
CN106293232A (en) * 2016-08-11 2017-01-04 江苏中威科技软件系统有限公司 A kind of hand-written inputting method realizing vigour of style in writing effect and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于轮廓方法的实时手写美化技术及应用";陈露开;《中国优秀硕士学位论文全文数据库信息科技辑》;20150115(第01期);第24页第2段-第26页第5段,第45页第3段,图3-8-3-10 *
陈露开."基于轮廓方法的实时手写美化技术及应用".《中国优秀硕士学位论文全文数据库信息科技辑》.2015,(第01期),第I138-902页. *

Also Published As

Publication number Publication date
CN107977147A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
US10788978B2 (en) Method and apparatus for displaying interface and storage medium
CN107680033B (en) Picture processing method and device
CN107977934B (en) Image processing method and device
EP3276478A1 (en) Mobile terminal and method for determining scrolling speed
CN106020670A (en) Screen lightening control method, device and electronic equipment
CN107172347B (en) Photographing method and terminal
CN111369575B (en) Screen capturing method and device and storage medium
EP2921969A1 (en) Method and apparatus for centering and zooming webpage and electronic device
US10061497B2 (en) Method, device and storage medium for interchanging icon positions
CN107330868A (en) image processing method and device
EP3828682A1 (en) Method, apparatus for adding shortcut plug-in, and intelligent device
CN107341777A (en) image processing method and device
JP2023510443A (en) Labeling method and device, electronic device and storage medium
CN107977147B (en) Sliding track display method and device
EP2990905A1 (en) Method and device for displaying image
CN114205524B (en) Display control method and terminal
CN108845756B (en) Touch operation method and device, storage medium and electronic equipment
CN116071377A (en) Map labeling method and device and map labeling device
CN110244889B (en) Picture scaling method, device, terminal and storage medium
CN111373730B (en) Panoramic shooting method and terminal
CN105975188B (en) Picture position adjusting method and device
CN111383296A (en) Display method and device for drawing track and storage medium
CN116092147A (en) Video processing method, device, electronic equipment and storage medium
CN110619257B (en) Text region determining method and device
CN111263084B (en) Video-based gesture jitter detection method, device, terminal and medium

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