The method for drafting of a kind of interface element and device
Technical field
The application relates to field of computer technology, particularly relates to method for drafting and the device of a kind of interface element.
Background technology
At present, the interface element in display interface there may be location tracking relation each other.With focus and
As a example by focus frame both interface elements, between them, exist for location tracking relation.Specifically, having can
Can be after focus is moved, focus frame, under the control of focus frame control, be followed the trail of and is moved to the current institute of focus
In position.Wherein, focus frame moves to focus present position, refers to that focus frame control is current in focus
Focus frame is drawn in position.Or, it is after focus frame is moved, focus is in the control of focal controls
Under, follow the trail of and move to focus frame present position, i.e. focal controls in the drafting of focus frame present position
Focus.
As a example by focus frame tracing focus, the mode that prior art realizes location tracking is as follows:
When focus is after original position moves to target location, obtain the information of target location (generally based on aobvious
Show the coordinate figure in the screen coordinate system that interface is set up);Focus frame control is according to the target location got
Information, draws focus frame, thus reaches the purpose that focus frame tracing focus moves in this target location.
Said method has problems in that, moves to the moment of target location relative to focus, and focus is frameed shift
Moving moment of this target location can exist bigger delayed, and this bigger delayed existence may cause using
Family takes for focus frame and does not desirably move to target location, so user can again trigger focus and
Focus frame moves, and this generates maloperation, result in the unnecessary process wasting of resources.
Summary of the invention
The embodiment of the present application provides the method for drafting of a kind of interface element, is used for solving using of the prior art
The position tracking method of interface element, can cause the unnecessary problem processing the wasting of resources.
The embodiment of the present application also provides for the device of the drafting of a kind of interface element, is used for solving to use prior art
In the position tracking method of interface element, the unnecessary problem processing the wasting of resources can be caused.
The embodiment of the present application employing following technical proposals:
A kind of method for drafting of interface element, including:
Obtain the information characterizing the first interface element movement tendency;According to described information, it was predicted that the first Interface Element
The target location that element will move to;Second contact surface element is drawn according to described target location.
A kind of drawing apparatus of interface element, including:
Movement tendency information acquisition unit, for obtaining the information characterizing the first interface element movement tendency;Mesh
Cursor position predicting unit, for according to described information, it was predicted that the target position that the first interface element will move to
Put;Drawing unit, draws for drawing position at the second contact surface element determined according to described target location
Second contact surface element.
At least one technical scheme above-mentioned that the embodiment of the present application uses can reach following beneficial effect:
Owing to the target location that the first interface element will move to can be doped, and paint according to target location
Second contact surface element processed, it is to avoid after the first interface element moves to target location, just carries out second contact surface
The drafting of element, thus reduce the hysteresis quality that second contact surface element moves, it is to avoid because the repetition of user
The unnecessary process wasting of resources moving operation and cause.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes of the application
Point, the schematic description and description of the application is used for explaining the application, is not intended that to the application not
Work as restriction.In the accompanying drawings:
The flow process that implements of the method for drafting of a kind of interface element that Fig. 1 provides for the embodiment of the present application is illustrated
Figure;
Fig. 1 a is the schematic diagram of the time shaft described in the embodiment of the present application;
The focus at a kind of digital TV screen interface that Fig. 1 b provides for the embodiment of the present application and focus frame position
Relation schematic diagram;
The focus at a kind of digital TV screen interface that Fig. 1 c provides for the embodiment of the present application and focus frame position
Relation schematic diagram;
The concrete structure schematic diagram drawing assembly of a kind of interface element that Fig. 1 d provides for the embodiment of the present application;
The tool of the method for drafting of focus or focus frame in a kind of DTV that Fig. 2 provides for the embodiment of the present application
Body realizes schematic flow sheet;
The concrete structure schematic diagram of the drawing apparatus of a kind of interface element that Fig. 3 provides for the embodiment of the present application.
Detailed description of the invention
For making the purpose of the application, technical scheme and advantage clearer, specifically real below in conjunction with the application
Execute example and technical scheme is clearly and completely described by corresponding accompanying drawing.Obviously, described
Embodiment is only some embodiments of the present application rather than whole embodiments.Based on the enforcement in the application
Example, the every other enforcement that those of ordinary skill in the art are obtained under not making creative work premise
Example, broadly falls into the scope of the application protection.
Below in conjunction with accompanying drawing, describe the technical scheme that each embodiment of the application provides in detail.
Embodiment 1
The embodiment of the present application provides the method for drafting of a kind of interface element, is used for solving in prior art interface
The lag issues occurred when element moves.The method implement schematic flow sheet as it is shown in figure 1,
Mainly comprise the steps:
Step 11, obtains the information characterizing the first interface element movement tendency;
Wherein, the first interface element, for existing in two interface elements of location tracking relation, comparatively speaking
The interface element first moved.
In one embodiment, obtain the information characterizing the first interface element movement tendency, including: obtain
At least two location parameter of the first interface element, and the first interface element is positioned at said two location parameter
The moment during position represented respectively;According to described at least two location parameter, determine the first interface element
Moving direction;According to described at least two location parameter, and the first interface element is positioned at said two position
In moment during the position that parameter represents respectively, determine the translational speed of the first interface element.
Such as, if assuming, the first interface element started to be moved from the T1 moment, and in the T1 moment, first
The location parameter of interface element is (0,11), the T2 moment after 5s, the position ginseng of the first interface element
Number is (0,20), thus according to the two location parameter, it may be determined that go out the motion side of the first interface element
To for vertically mobile (as along vertical coordinate axle Y-axis).
For example, it is assumed that sample according to the location parameter of the sample frequency focusing of 10ms, get Jiao
The point location parameter in the t1 moment is (0,10), and the focus location parameter in the t2 moment is (0,20),
Time interval between t1 moment and t2 moment is 10ms, then the movement velocity that can calculate focus is
(20-10)/10;Or, when the first interface element is according to the default speed uniform motion of default,
The motion velocity information of the first interface element can obtain from system set-up information.
In the embodiment of the present application, location parameter, refer to any information that can represent interface element present position,
This information is such as coordinate figure etc..
In the embodiment of the present application, the mode obtaining the information characterizing the first interface element movement tendency is the most permissible
Including following two:
Mode one: according to the default location parameter sampling period, obtains and characterizes the first interface element movement tendency
Information.
Such as, as a example by the first interface element is as focus, if the location parameter sampling period 30ms preset,
Then system will obtain the focus now coordinate figure of present position in screen coordinate system automatically every 30ms, makees
It is the location parameter of the first interface element, and according to the location parameter of the first interface element, obtains sign first
The information of interface element movement tendency.Wherein, in order to obtain the direction of motion information of the first interface element, adopt
The location parameter of the first interface element that sample obtains at least needs two.
Mode two: after receiving the first interface element change in location triggering command, obtains and characterizes the first Interface Element
The information of element movement tendency.
Such as, as a example by the first interface element is for digital TV screen focus, it is assumed that user is defeated by remote controller
Enter focal position and adjusted instruction, then, at this DTV after receiving this instruction, focus can have been obtained and work as
Front location parameter in screen coordinate system;Further, according to the default location parameter sampling period, obtain
Take focus location parameter during being moved;And by each position parameter got, obtain focus
Movement tendency information.
The mode of the movement tendency information obtaining focus according to location parameter in mode one and mode two can be joined
According to above, here is omitted.
In one embodiment, in order to guarantee at set time intervals location parameter to be adopted
Sample, the embodiment of the present application provides the mode of a kind of timing sampling.Which specifically includes:
According to the sampling period, system timer is set, whenever the timing time of system timer arrives according to adopting
During the sampling instant that the sample cycle is determined, the first interface element location parameter is sampled.For example, it is assumed that
Need every 30ms to obtain the location parameter of a secondary focal point, then the time arranging system timer is 30ms, enters
And by by the timing time of system timer, sample every the location parameter of 30ms focusing.
Step 12, according to the information characterizing the first interface element movement tendency, it was predicted that the first interface element will
The target location moved to;
In one embodiment, if the information of the first interface element movement tendency includes the first interface element
Translational speed and moving direction, then the specific implementation of step 12 may include that according to display interface
Drafting cycle, described translational speed and moving direction, it was predicted that the target that the first interface element will move to
Position.
In the drafting cycle of above-mentioned display interface, i.e. interface (is such as being comprised the first interface element and the second boundary
The interface of surface element) drafting cycle of display interface of being followed when drawing, the drafting of this display interface
Cycle can be 30ms, 40ms, etc..When the drafting cycle of display interface is 30ms, can be every
30ms carries out the drafting at a frame interface.In the embodiment of the present application, this display interface is drawn the tool in cycle
Body size does not limits.
In the embodiment of the present application, if assuming to carry out pre-in the target location that the first interface element will be moved to
During survey, the first interface element is currently in drawn nth frame interface, and, the drafting of display interface
Cycle is 30ms, then, in step 12, it is possible to according to the drafting cycle 30ms of this display interface,
Information with sign the first interface element movement tendency got, it was predicted that the first interface element is at N+1
The target location that the interfaces such as frame or N+2 frame will move to time drawn.
Such as, if the central point of the first interface element be currently in drawn nth frame interface (10,
0) this position, the drafting cycle of display interface is 30ms, characterizes the movement tendency of the first interface element
Information includes when the direction of motion is the most to the right and movement velocity is 5/30ms, then, permissible
Dope the first interface element when N+1 frame interface is drawn, be in (15,0) this target location.
Wherein, in above-mentioned (10,0) 10, in movement velocity expression formula 5/30ms 5, and above-mentioned (15,
0) 15 in, can be all the unit length in interface coordinate system.
It should be noted that in one embodiment, in order to according to the first interface element motion got
The target location that information prediction first interface element of trend will move to, the embodiment of the present application provides one
Estimation algorithm, this algorithm can be completed by the first interface element displacement estimator.
It should be noted that this estimator is in addition to having may be used for step 12, it is also possible to be used for
Step 11.Such as, this estimator can calculate the according to the location parameter of the first interface element got
The translational speed of one interface element, and determine the moving direction of the first interface element;And then according to instantaneous speed
Degree, moving direction, it was predicted that the target location that the first interface element will move to.
As a example by the first interface element is as focus, assume to set up if following:
1, this focus shows on the interface of intelligent television;
2, this intelligent television is with the drafting cycle of 30ms, draws each frame display interface;
3, focus X-axis in the horizontal direction moves;
4, in the T0 moment, intelligent television receives focus movement instruction, i.e. focus started to move in the T0 moment
Dynamic;
5, the focus location parameter in the T0 moment is (x0, y1);
6, according to the sampling period of default, the location parameter of focusing is sampled.Wherein, this is adopted
The sample cycle is identical with the drafting cycle of display interface, for 30ms.
So, to complete the step of above-mentioned calculating process as follows for this estimator:
One, as shown in Figure 1a, it is assumed that focus starts with movement in the T0 moment, then, this estimator is permissible
Get the location parameter (x0, y1) of focus in the T0 moment, get the position ginseng of focus in the T1 moment
Number (x1, y1);The location parameter (x2, y1) of focus is got in the T2 moment.
Wherein, T0 moment and T1 moment, the time interval between T1 and T2 is drafting cycle, i.e. 30ms.
Two, the location parameter (x0, y1) of the focus that this estimator got according to the T0 moment and the T1 moment
The location parameter (x1, y1) of the focus got, calculates the horizontal coordinate before and after focus moves poor:
TotalDistanceX=x1-x0.
Three, it is in the moment T1 of (x1, y1) according to totalDistanceX, focus, and focus is in
The moment T0 of (x0, y1), the translational speed of calculating focus:
FocusViewMovingVelocityX=totalDistanceX ÷ (T1-T0).
Four, according to translational speed and T2, the calculating focus displacement from T0 to T2:
ExpectedDistanceX=focusViewMovingVelocityX × (T2-T0).I.e., it was predicted that focus is in sight
The T2 that will arrive, moves how many distances relative to present position during T0.
Five, according to the location parameter (x0, y1) of T0 moment focus, the location parameter of T1 moment focus (x1,
Y1), it may be determined that the information of the movement tendency going out focus is X-axis in the horizontal direction.
Six, according to the information of the movement tendency of focus determined and calculate
ExpectedDistanceX, measurable go out the target location that will move in this moment of T2 of focus, i.e.
Focus location parameter after X-axis moves in the horizontal direction is (x0+expectedDistanceX, y1).
Computing Principle based on above-mentioned estimator, such as, it is assumed that focus started to be moved in the t0 moment, its
The location parameter in t0 moment is (0,9), if according to the default focal position parameter sampling cycle, getting
The focus location parameter in the t1 moment is (0,12), then may determine that the moving direction of focus is for along Vertical Square
Move to Y direction;Can calculate at the location parameter in t0 moment and t1 moment according to focus simultaneously
Focus t0 to t1 during this period of time in displacement be: (12-9)=3, time interval is: t1-t0=30ms.
Then according to displacement and time interval, the translational speed of focus can be calculated: 3 ÷ 30=0.1.Assume to need
Focus to be predicted arrived in the t2 moment sampling period 30ms of systemic presupposition (time interval of t2 Yu t1 be)
The parameter of target location, then according to moving direction and the translational speed of focus of focus, can calculate and discharge of the coke
The distance that point moved in the t2 moment is: instantaneous velocity × (t2-t1)=0.1 × 30=3;Then focus is when t2
The location parameter being carved into the target location reached is (0,15).
Step 13, draws second contact surface element according to target location.
In the embodiment of the present application, draw the moment of second contact surface element according to described target location, there may be
Following three kinds of situations:
Situation 1: when the first interface element moves to target location, draws second contact surface according to target location
Element.
For example, it is assumed that the first interface element arrives target in the T1 moment (particular moment the most described)
Position, then in the T1 moment, draw second contact surface element according to target location.
For example, if assume: 1, according to the drafting cycle of 30ms, draw comprise the first interface element and
The display interface of second contact surface element;2, that step 11 gets, for characterizing the first interface by performing
The information of element movement tendency is: the first interface element is respectively at the first frame display interface drawn and the second frame
Location parameter in display interface;3, the first interface element is currently at the second frame display interface.So,
According to described target location draw second contact surface element moment, can be drafting the 3rd frame display interface time
Carve, be i.e. later than the moment of the drafting moment 30ms of the second frame display interface.
Situation 2: when before the first interface element moves to target location, draws according to target location
Second contact surface element.
It is assumed that the first interface element starts in the T0 moment mobile, arrive target location in the T1 moment, then may be used
With after the T0 moment, (particular moment the most described) sometime before the T1 moment, according to
Second contact surface element is drawn in target location.
Situation 3: (this moment in the setting duration after the moment that the first interface element moves to target location
After any instant set in duration, all can be considered as particular moment described above), according to target position
Put drafting second contact surface element.Wherein, this setting duration, should meet: user will not be made visually,
The moment of drawing experiencing second contact surface element substantially lags behind the drafting moment of the first interface element.
It is assumed that the first interface element arrives target location in the T1 moment, the most the latest in the T1+ Δ T moment, paint
Second contact surface element processed.Wherein, [0, Δ T] is above-mentioned setting duration.
In the embodiment of the present application, draw second contact surface element according to the target location determined, specifically can wrap
Include following two implementation:
Implementation 1: according to target location and the distance threshold of setting, determines the first drafting position;And
Described particular moment, draw second contact surface element according to target location.
Specifically, the position that current with second contact surface element in target location location parameter represents (is called for short afterwards
Element current location) between distance less than set distance threshold time, element current location can be determined
Position is drawn for second contact surface element;Thus in described particular moment, element current location is painted as first
Position processed, and second contact surface element is drawn in this position.Especially, target location is likely current with element
Position overlaps, and the most above-mentioned distance is 0.
When distance between target location and element current location is not less than the distance threshold set, can be by
Target location is defined as second contact surface element and draws position;Thus in particular moment, draw the in target location
Second interface element.
In one embodiment, for the distance threshold according to target location and setting, second contact surface is determined
Element draws position, and the embodiment of the present application provides a kind of estimation algorithm, and this algorithm can be by second contact surface element
Displacement estimator completes, and concrete algorithm is as follows:
1、totalDistanceX!=0&&ViewMovingDistanceX==0;
2, (wherein 0.45 is the most adjustable to expectedDistanceX > 0.45*totalDistanceX
Parameter), and focusViewAccmulateDistanceX < expectedDistanceX).
Wherein the specific algorithm of parameters is described above, and here is omitted.
Implementation 2: according to target location, it is judged that the first interface element moves to institute at the first interface element
State the moment of target location, if be moved to outside the viewing area that second contact surface element currently occupies;According to
Judged result, determines that second contact surface element draws position;And move to described target position at the first interface element
In the moment put, draw position at second contact surface element and draw second contact surface element.
Specifically, it is that the first interface element moves to described target location at the first interface element when judged result
Moment be moved to outside the viewing area that second contact surface element currently occupies, then target location is defined as
Second interface element draws position;When judged result is described in the first interface element moves at the first interface element
The moment of target location does not move to outside the viewing area that second contact surface element currently occupies, then by the second boundary
The position, viewing area that surface element currently occupies, is defined as second contact surface element and draws position.
Such as, as a example by DTV, it is assumed that the first interface element is focus, second contact surface element is focus
Frame.Assuming under original state, on screen as shown in Figure 1 b, focus and focus frame are all in identical position
Putting, wherein, the viewing area that focus frame currently occupies is the gray area in figure.When user passes through remote controller
Focusing is moved so that after focus moves to position as illustrated in figure 1 c, due to the position of focus
Do not move to, outside the gray area shown in Fig. 1 c, the most now gray area position is defined as second
Interface element draws position.
In one embodiment, the moment of described target location is moved at the first interface element to the second boundary
The mode that surface element carries out drawing may include that according to the first interface element move to described target location time
Carve the feature being in the 3rd interface element that second contact surface element draws position, draw second contact surface element.
Specifically, draw second contact surface element according to the feature of the 3rd interface element, may refer to according to
Make second contact surface element possess the mode of this feature, draw second contact surface element;May also mean that according to making
Second interface element does not possess the mode of this feature, draws second contact surface element.
Such as, as a example by the TV play poster that digital television switching is selected, if focus is from TV play poster A
(wherein TV play poster A is square) (wherein TV play poster B is for long to move to TV play poster B
Square, and this TV play poster B position is the target location determined), then the mesh arrived in focus
When cursor position draws focus frame, by the shape facility according to poster B, focus frame is depicted as rectangle.
It should be noted that the feature of the 3rd interface element includes: shape, color, size, animation effect
Deng.
Said method can be completed by the drafting assembly of a kind of interface element as shown in Figure 1 d, this Interface Element
Element drafting assembly specifically include with lower module: movement tendency data obtaining module, target prodiction module,
Drafting module, system timer and core calculations module (include the first interface element displacement estimator
With second contact surface element displacement estimator).
The function of above-mentioned each module introduced below.
Above-mentioned steps 11 can be completed by movement tendency data obtaining module.
The target location that the first interface element described in step 12 will move to, can be by target location
Parameter that prediction module calculates according to the first interface element displacement estimator and predict and draw.This is first years old
The functional realiey mode of interface element displacement estimator refers to above, and here is omitted.
System timer can set fixed time interval as the sampling period, so that location parameter obtains
The time interval that delivery block can set according to system timer, is carried out the location parameter of the first interface element
Sampling.
Second contact surface element displacement estimator, is used for according to target location and the distance threshold of setting, really
Determine second contact surface element and draw position.The functional realiey mode of this second contact surface element displacement estimator is detailed
Seing above, here is omitted.
Drafting module, can will move to target location, to the first boundary according to the first interface element of prediction
Surface element is drawn;And draw position according to the second contact surface element determined, second contact surface element is carried out
Draw.
The said method provided by the embodiment of the present application 1, the method is by transporting the first interface element
The information of dynamic trend calculates, and can dope the target location that the first interface element will move to, enter
And second contact surface element can be drawn in particular moment according to target location, reduce second contact surface element and move
Dynamic hysteresis quality, thus avoid because user's repeats mobile operation, decrease taking of system resource,
Improve the operational efficiency of system.
It should be noted that the executive agent of each step of the provided method of embodiment 1 may each be same and sets
Standby, or, the method also by distinct device as executive agent.Such as, the holding of step 11 and step 12
Row main body can be the first interface element control, and the executive agent of step 13 can be second contact surface element control
Part;The most such as, the executive agent of step 11 can be the first interface element control, step 12 and step 13
Executive agent can be second contact surface element control;For another example, step 11~the executive agent of step 13
It can be all second contact surface element control;Etc..
Embodiment 2
The embodiment of the present application provides focus or the method for drafting of focus frame in a kind of DTV, is used for solving now
The lag issues occurred when having focusing or focus frame in technology to move.The method implement flow process
Schematic diagram is as in figure 2 it is shown, mainly comprise the steps:
Step 21, DTV STB obtains the movement tendency information of the first interface element;
In the embodiment of the present application, it is assumed that the first interface element is focus, then by focus in position the most in the same time
Put parameter, obtain the movement tendency information of focus, including: obtain at least two location parameter of focus, with
And the moment that focus is when being positioned at the position that said two location parameter represents respectively;According to described at least two position
Put parameter, determine the moving direction of focus;According to described at least two location parameter, and focus is positioned at institute
State the moment during position that two location parameters represent respectively, determine the translational speed of focus.
Wherein, the movement tendency information of focus is obtained, including following two mode:
Mode one: according to the default focal position parameter sampling cycle, obtain the movement tendency information of focus;
Mode two: after receiving the first interface element change in location triggering command, obtains the movement tendency of focus
Information.
Step 22, according to the movement tendency information of the focus obtained, it was predicted that the target position that focus will move to
Put;
In one embodiment, if this target location, will move in a certain particular moment for focus
Position, and the information of focussing movement trend includes translational speed and the moving direction of focus, then step 22
Specific implementation may include that the drafting cycle according to display interface, described translational speed and movement side
To, it was predicted that the target location that focus will move to.
Such as, if following hypothesis is set up:
1, this DTV is with the drafting cycle of 30ms, draws each frame display interface;
2, focus X-axis in the horizontal direction moves;
3, in the T0 moment, Digital TV Receiving is to focus movement instruction, i.e. focus started to move in the T0 moment
Dynamic;
4, the focus location parameter in the T0 moment is (x0, y1).
4, according to the sampling period (30ms) of default, the location parameter of focusing is sampled.
5, according to the sampling period of default, the location parameter of focusing is sampled.Wherein, this is adopted
The sample cycle is identical with the drafting cycle of display interface, for 30ms.
6, according to the sampling period (30ms) of default, in the position ginseng of the focus that the t2 moment gets
Number is (x2, y1).
In one embodiment, according to the movement tendency information of the focus obtained, focusing will move to
Target location be predicted specifically include following sub-step:
Sub-step 1, according to the current location parameter of focus, calculates the horizontal coordinate before and after focus moves poor:
TotalDistanceX=(x2-x1).
Sub-step 2, according to the totalDistanceX of described acquisition, and the 30ms sampling week of default
Phase, calculate the translational speed of focus: focusViewMovingVelocityX=(x2-x1) ÷ 30.
Sub-step 3, according to focusViewMovingVelocityX, and specific moment t3, Qi Zhongsuo
After the t3 moment stated is positioned at the t2 moment on a timeline, calculating Focus prediction displacement:
ExpectedDistanceX=focusViewMovingVelocityX × (t3-t2).
Sub-step 4, according to the location parameter of the focus that t1 moment and t2 moment get, can obtain Jiao
The direction of motion of point is x-axis in the horizontal direction.
Sub-step 5, according to the direction of motion of the focus of described acquisition and the displacement in special time,
The most measurable go out, the target location that focus will move to reach, i.e. focus moves in X-axis in the horizontal direction
The location parameter of the target location arrived is (x2+expectedDistanceX, y1).
Step 23, draws focus frame according to described target location.
In one embodiment, when prediction focus target location and be not moved to what focus frame was currently located
Outside the band of position, it is determined that it is the current location of focus frame that the second contact surface element gone out draws position.
Such as, when user is moved by remote controller focusing, predict according to step 22, first
It is (x3, y3) that interface element moves to the parameter of the target location, moment focus place of described target location,
And this position is still in the Current location area of focus frame, the most now the current location of focus frame repaints
Focus frame.
Usually, the region at TV poster B place is moved to when focus from the region at TV poster A place
Time, the size of TV poster A and TV poster B, color, the feature such as shape is probably different,
For feature and TVs such as the size of the focus frame of the region drafting at TV poster B place, color, shapes
The feature of poster B matches, and the embodiment of the present application provides a kind of method, for moving to target according to focus
During position, the 3rd interface element at focus place is (when i.e. focus moves to target location, in this position
3rd interface element) feature, draw focus frame.
Such as, move to from the region (TV poster A is square) at TV poster A place when focus
The region (TV poster B is triangle) at TV poster B place, then draw focus frame in target area
Time, focus frame is depicted as triangle.
The said method provided by the embodiment of the present application 2, the method passes through focusing (or focus frame)
Movement tendency information calculate, the target position that focus (or focus frame) will move to can be doped
Put, and then can draw at target location focusing frame (or burnt) point, reduce second contact surface element
The hysteresis quality of movement, thus avoid the unnecessary process money caused because of the repeating mobile operation of user
Source is wasted, and improves the operational efficiency of system.
Embodiment 3
The embodiment of the present application provides the drawing apparatus of a kind of interface element, is used for solving in prior art interface
The lag issues occurred when element moves.This device implement schematic flow sheet as shown in Figure 4,
Mainly include movement tendency information acquisition unit 31, target prodiction unit 32 and drawing unit 33.
Wherein movement tendency information acquisition unit, for obtaining the letter characterizing the first interface element movement tendency
Breath;
Target prodiction unit, for according to described information, it was predicted that the first interface element will move to
Target location;
Drawing unit, draws for drawing position at the second contact surface element determined according to described target location
Second contact surface element.
In one embodiment, drawing unit, it is used for: in particular moment, paints according to described target location
Second contact surface element processed.
In one embodiment, described particular moment is not later than the first interface element and moves to described target position
The moment put.
In one embodiment, drawing unit, it is used for: according to the distance threshold of described target location and setting
Value, determines the first drafting position;And in described particular moment, draw position first and draw second contact surface unit
Element;Or according to described target location, it is judged that whether the first interface element is moved in described particular moment
Outside the viewing area that second interface element currently occupies;According to judged result, determine the second drafting position;And
Described particular moment, draw position second and draw second contact surface element.
In one embodiment, drawing unit, it is used for: work as with second contact surface element in described target location
Distance between the position that front location parameter represents, during less than the distance threshold set, in the first Interface Element
Element moves to the moment of described target location, and the position represented at the location parameter that second contact surface element is current is painted
Second contact surface element processed;The position that the location parameter current with second contact surface element in described target location represents
Between distance, not less than set distance threshold time, move to described target location at the first interface element
Moment, described target location draw second contact surface element.
In one embodiment, drawing unit, it is used for: work as with second contact surface element in described target location
Distance between the position that front location parameter represents, during not less than the distance threshold set, at the first interface
Element moves to the moment of described target location, draws second contact surface element in described target location.
In one embodiment, drawing unit, it is used for: obtain and be in described target in described particular moment
The feature of the 3rd interface element of position;According to described feature, draw second contact surface element.
In one embodiment, described feature include following at least one: color, size, animation imitate
Really, shape etc..
In one embodiment, movement tendency information acquisition unit, it is used for: receiving the first interface element
After change in location triggering command, obtain the information characterizing the first interface element movement tendency;Or according to default
In the location parameter sampling period, obtain the information characterizing the first interface element movement tendency.
In one embodiment, movement tendency information acquisition unit, it is used for: according to default location parameter
In the sampling period, obtain the information characterizing the first interface element movement tendency.
In one embodiment, the information of described sign the first interface element movement tendency, including: first
The translational speed of interface element and moving direction.
In one embodiment, movement tendency information acquisition unit, it is used for: obtain the first interface element
At least two location parameter, and the first interface element is positioned at the position that said two location parameter represents respectively
Time moment;According to described at least two location parameter, determine the moving direction of the first interface element;According to
Described at least two location parameter, and the first interface element is positioned at what said two location parameter represented respectively
In moment during position, determine the translational speed of the first interface element.
In one embodiment, target prodiction unit, be used for: according to drafting cycle of display interface,
Described translational speed and moving direction, it was predicted that the target location that the first interface element will move to.
Use the said apparatus that the embodiment of the present application 3 provides, owing to using target prodiction unit to first
The movement tendency information of interface element calculates, and can dope the mesh that the first interface element will move to
Cursor position, and then can be when the first interface element moves to described target location, in target location pair
Second contact surface element is drawn, and reduces the hysteresis quality that second contact surface element moves, thus avoid because
User repeats mobile operation, decreases taking of system resource, improves the operational efficiency of system.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or knot
The form of the embodiment in terms of conjunction software and hardware.And, the present invention can use and wherein wrap one or more
Computer-usable storage medium containing computer usable program code (include but not limited to disk memory,
CD-ROM, optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention
The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and
/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding
The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating
The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one
The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set
In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory
Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart
The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes
Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices
Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one
The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
In a typical configuration, calculating equipment includes one or more processor (CPU), input/defeated
Outgoing interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory
(RAM) and/or the form such as Nonvolatile memory, such as read only memory (ROM) or flash memory (flash RAM).
Internal memory is the example of computer-readable medium.
Computer-readable medium includes that removable media permanent and non-permanent, removable and non-can be by appointing
Where method or technology realize information storage.Information can be computer-readable instruction, data structure, program
Module or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory
(PRAM), static RAM (SRAM), dynamic random access memory (DRAM), its
The random access memory (RAM) of his type, read only memory (ROM), electrically erasable are read-only
Memorizer (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read only memory
(CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, tape magnetic
Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be calculated
The information that equipment accesses.According to defining herein, computer-readable medium does not include temporary computer-readable matchmaker
Body (transitory media), such as data signal and the carrier wave of modulation.
Also, it should be noted term " includes ", " comprising " or its any other variant are intended to non-
Comprising of exclusiveness, so that include that the process of a series of key element, method, commodity or equipment not only wrap
Include those key elements, but also include other key elements being not expressly set out, or also include for this process,
The key element that method, commodity or equipment are intrinsic.In the case of there is no more restriction, statement " include
One ... " key element that limits, it is not excluded that including the process of described key element, method, commodity or setting
Other identical element is there is also in Bei.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey
Sequence product.Therefore, the application can use complete hardware embodiment, complete software implementation or combine software and
The form of the embodiment of hardware aspect.And, the application can use and wherein include calculating one or more
The computer-usable storage medium of machine usable program code (include but not limited to disk memory, CD-ROM,
Optical memory etc.) form of the upper computer program implemented.
The foregoing is only embodiments herein, be not limited to the application.For this area skill
For art personnel, the application can have various modifications and variations.All institutes within spirit herein and principle
Any modification, equivalent substitution and improvement etc. made, within the scope of should be included in claims hereof.