[go: up one dir, main page]

CN104750275B - A kind of determining method and device of the movement speed of sliding block - Google Patents

A kind of determining method and device of the movement speed of sliding block Download PDF

Info

Publication number
CN104750275B
CN104750275B CN201310726874.0A CN201310726874A CN104750275B CN 104750275 B CN104750275 B CN 104750275B CN 201310726874 A CN201310726874 A CN 201310726874A CN 104750275 B CN104750275 B CN 104750275B
Authority
CN
China
Prior art keywords
contact point
slider
moving direction
current
slide rail
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
CN201310726874.0A
Other languages
Chinese (zh)
Other versions
CN104750275A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310726874.0A priority Critical patent/CN104750275B/en
Publication of CN104750275A publication Critical patent/CN104750275A/en
Application granted granted Critical
Publication of CN104750275B publication Critical patent/CN104750275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Position Input By Displaying (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例公开了一种滑块的移动速度的确定方法及装置,方法包括:检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;根据所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。本发明实施例无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。

The embodiment of the present invention discloses a method and device for determining the moving speed of a slider. The method includes: after detecting that the slider is selected, obtaining the moving direction of the contact point; the moving direction is that the initial position of the contact point points to the contact point The direction of the current position; determine the moving direction of the slider on the slide rail according to the moving direction of the contact point; determine the moving direction of the slider on the slide rail according to the angle between the moving direction of the contact point and the slide rail Movement rate. In the embodiment of the present invention, the moving speed of the slider can be dynamically adjusted without the contact point always being within the position range of the slider, and then the content displayed on the display can be dynamically adjusted.

Description

一种滑块的移动速度的确定方法及装置Method and device for determining the moving speed of a slider

技术领域technical field

本发明涉及数据处理领域,尤其涉及一种滑块的移动速度的确定方法及装置。The invention relates to the field of data processing, in particular to a method and device for determining the moving speed of a slider.

背景技术Background technique

在电子设备的各种软件应用中,通常为用户提供滑块,以便用户通过调节滑块来对显示器上显示的内容进行调整。滑块的移动速度决定着电子设备对显示器上显示的内容的调整速度和滑块在滑轨上的位置,滑块在滑轨上的位置决定着显示器上显示的内容。例如,在某一word文档被打开后,用户可以通过调节滑块来调整显示屏上所显示的word文档的内容,以便word文档中当前在显示屏上显示的内容之前或之后的内容显示于显示屏上;或者,在媒体播放软件中,用户可以通过调节滑块来调整媒体播放进度、音量等。In various software applications of electronic devices, a slider is usually provided for the user, so that the user can adjust the content displayed on the display by adjusting the slider. The moving speed of the slider determines the adjustment speed of the electronic device to the content displayed on the monitor and the position of the slider on the slide rail, and the position of the slider on the slide rail determines the content displayed on the monitor. For example, after a certain word document is opened, the user can adjust the content of the word document displayed on the display screen by adjusting the slider, so that the content before or after the content currently displayed on the display screen in the word document is displayed on the display screen. on the screen; or, in the media player software, the user can adjust the media playback progress, volume, etc. by adjusting the slider.

目前在电子设备的各种软件应用中,一般由用户在驱动鼠标进入滑块的位置范围并选中滑块后,在鼠标始终位于滑块的位置范围内且选中滑块的状态下,通过移动鼠标来达到拖动滑块在滑轨上移动的目的,滑块的移动速度决定于鼠标的移动速度,所述滑块的位置范围是包括滑块图标在内的一个区域范围。但是,在这一拖动滑块的过程中,用户必须始终使得鼠标位于滑块的位置范围内,一旦在拖动滑块的过程中鼠标脱离滑块的位置范围,用户将无法通过移动鼠标来拖动滑块在滑轨上移动。At present, in various software applications of electronic equipment, generally after the user drives the mouse into the position range of the slider and selects the slider, the mouse is always located within the position range of the slider and the slider is selected, by moving the mouse To achieve the purpose of dragging the slider to move on the slide rail, the moving speed of the slider is determined by the moving speed of the mouse, and the position range of the slider is an area including the slider icon. However, during the process of dragging the slider, the user must always keep the mouse within the position range of the slider. Once the mouse is out of the position range of the slider during the process of dragging the slider, the user will not be able to move the mouse. Drag the slider to move on the rail.

因此,现有技术中如果在拖动滑块的过程中鼠标脱离滑块的位置范围,将无法动态调整滑块的移动速度,进而也无法动态调整显示器上显示的内容。Therefore, in the prior art, if the mouse is out of the position range of the slider during the process of dragging the slider, the moving speed of the slider cannot be dynamically adjusted, and furthermore, the content displayed on the display cannot be dynamically adjusted.

发明内容Contents of the invention

本发明实施例中提供了一种滑块的移动速度的确定方法,无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。An embodiment of the present invention provides a method for determining the moving speed of the slider, which can dynamically adjust the moving speed of the slider without the need for the contact point to always be within the position range of the slider, and then dynamically adjust the content displayed on the display.

第一方面,提供一种滑块的移动速度的确定方法,包括:In the first aspect, a method for determining the moving speed of a slider is provided, including:

检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;After detecting that the slider is selected, obtain the moving direction of the contact point; the moving direction is the direction from the initial position of the contact point to the current position of the contact point;

根据所述接触点的移动方向确定所述滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在所述滑轨上的移动速率。Determine the movement direction of the slider on the slide rail according to the movement direction of the contact point; determine the movement of the slider on the slide rail according to the angle between the movement direction of the contact point and the slide rail rate.

结合第一方面,在第一方面第一种可能的实现方式中,所述根据所述接触点的移动方向确定滑块在滑轨上的移动方向包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining the moving direction of the slider on the slide rail according to the moving direction of the contact point includes:

确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。Determine the direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the moving direction of the slider on the slide rail.

结合第一方面,和/或第一方面第一种可能的实现方式,在第一方面第二种可能的实现方式中,所述根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块的移动速率包括:With reference to the first aspect, and/or the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, according to the distance between the moving direction of the contact point and the slide rail The included angle determines the movement rate of the slider including:

确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the first angle is the angle between the moving direction of the contact point and the slide rail, An included angle whose degree is not greater than another included angle;

根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle.

结合第一方面,和/或第一方面第一种可能的实现方式,和/或第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,所述获取接触点的移动方向包括:With reference to the first aspect, and/or the first possible implementation of the first aspect, and/or the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the acquiring contact The direction of movement of points includes:

确定接触点的初始位置;Determine the initial position of the contact point;

确定接触点的当前位置;determine the current location of the touchpoint;

根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position.

结合第一方面,和/或第一方面第一种可能的实现方式,和/或第一方面第二种可能的实现方式,和/或第一方面第三种可能的实现方式,在第一方面第四种可能的实现方式中,所述接触点的初始位置是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;In combination with the first aspect, and/or the first possible implementation of the first aspect, and/or the second possible implementation of the first aspect, and/or the third possible implementation of the first aspect, in the first In the fourth possible implementation of the aspect, the initial position of the contact point refers to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected; the current position of the contact point refers to the position of the contact point when the slider is selected. After selection, the position of the contact point on the display at the current moment;

或者,所述接触点的初始位置是指滑块被选中时,接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected; the current position of the contact point refers to the position of the contact point on the display screen at the current moment after the slider is selected;

或者,所述接触点的初始位置是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置。Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time interval from the current time; the current position of the contact point refers to the position of the slider. After the block is selected, the position of the touch point on the display at the current moment.

第二方面,提供一种滑块的移动速度的确定装置,包括:In a second aspect, a device for determining a moving speed of a slider is provided, including:

获取单元,用于检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;The obtaining unit is used to obtain the moving direction of the contact point after detecting that the slider is selected; the moving direction is a direction in which the initial position of the contact point points to the current position of the contact point;

确定单元,用于根据所述获取单元获取的所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。A determining unit, configured to determine the moving direction of the slider on the slide rail according to the moving direction of the contact point acquired by the acquiring unit; determine the sliding direction according to the angle between the moving direction of the contact point and the sliding rail The rate at which blocks move on the rails.

结合第二方面,在第二方面第一种可能的实现方式中,所述确定单元具体用于:确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。With reference to the second aspect, in a first possible implementation manner of the second aspect, the determination unit is specifically configured to: determine a direction component of the movement direction of the contact point on the slide rail, and determine the direction component of the direction component As the moving direction of the slider on the slide rail.

结合第二方面,和/或第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,所述确定单元具体用于:With reference to the second aspect, and/or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the determining unit is specifically configured to:

确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the first angle is the angle between the moving direction of the contact point and the slide rail, An included angle whose degree is not greater than another included angle;

根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle.

结合第二方面,和/或第二方面第一种可能的实现方式,和/或第二方面第二种可能的实现方式,在第二方面第三种可能的实现方式中,所述获取单元具体用于:With reference to the second aspect, and/or the first possible implementation manner of the second aspect, and/or the second possible implementation manner of the second aspect, in the third possible implementation manner of the second aspect, the acquiring unit Specifically for:

确定接触点的初始位置;Determine the initial position of the contact point;

确定接触点的当前位置;determine the current location of the touchpoint;

根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position.

结合第二方面,和/或第二方面第一种可能的实现方式,和/或第二方面第二种可能的实现方式,和/或第二方面第三种可能的实现方式,在第二方面第四种可能的实现方式中,所述接触点的初始位置是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;In combination with the second aspect, and/or the first possible implementation of the second aspect, and/or the second possible implementation of the second aspect, and/or the third possible implementation of the second aspect, in the second In the fourth possible implementation of the aspect, the initial position of the contact point refers to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected; the current position of the contact point refers to the position of the contact point when the slider is selected. After selection, the position of the contact point on the display at the current moment;

或者,所述接触点的初始位置是指滑块被选中时,接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected; the current position of the contact point refers to the position of the contact point on the display screen at the current moment after the slider is selected;

或者,所述接触点的初始位置是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置。Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time interval from the current time; the current position of the contact point refers to the position of the slider. After the block is selected, the position of the touch point on the display at the current moment.

本实施例中,检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;根据所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。本实施例根据接触点的移动方向确定滑块的移动速度,滑块的移动并不依赖于接触点始终位于滑块的位置范围内这一条件,接触点可以脱离滑块的位置范围任意移动,从而本实施例无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。In this embodiment, after detecting that the slider is selected, the moving direction of the contact point is obtained; the moving direction is the direction in which the initial position of the contact point points to the current position of the contact point; The moving direction on the sliding rail; the moving speed of the slider on the sliding rail is determined according to the angle between the moving direction of the contact point and the sliding rail. In this embodiment, the moving speed of the slider is determined according to the moving direction of the contact point. The movement of the slider does not depend on the condition that the contact point is always within the position range of the slider. The contact point can move arbitrarily outside the position range of the slider. Therefore, in this embodiment, the moving speed of the slider can be dynamically adjusted without the need for the contact point to always be within the position range of the slider, and then the content displayed on the display can be dynamically adjusted.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本发明实施例滑块的移动速度的确定方法流程示意图;1 is a schematic flow chart of a method for determining the moving speed of a slider in an embodiment of the present invention;

图2A为本发明实施例显示屏坐标图;Fig. 2A is the coordinate diagram of the display screen of the embodiment of the present invention;

图2B为本发明实施例第一种实例示意图;Fig. 2B is a schematic diagram of the first example of the embodiment of the present invention;

图2C为本发明实施例第二种实例示意图;Fig. 2C is a schematic diagram of the second example of the embodiment of the present invention;

图2D为本发明实施例第三种实例示意图;FIG. 2D is a schematic diagram of a third example of the embodiment of the present invention;

图3为本发明实施例滑块的移动速度的确定装置结构示意图;3 is a schematic structural diagram of a device for determining the moving speed of the slider in an embodiment of the present invention;

图4为本发明实施例电子设备结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

其中,本发明实施例可以适用于任何包括为用户提供滑块的软件的电子设备。Wherein, the embodiment of the present invention can be applied to any electronic device including software that provides sliders for users.

参见图1,为本发明滑块的移动速度的确定方法第一实施例示意图,该方法包括:Referring to Fig. 1, it is a schematic diagram of the first embodiment of the method for determining the moving speed of the slider in the present invention, the method includes:

步骤101:检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;Step 101: After detecting that the slider is selected, obtain the moving direction of the contact point; the moving direction is the direction from the initial position of the contact point to the current position of the contact point;

步骤102:根据所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。Step 102: Determine the moving direction of the slider on the slide rail according to the moving direction of the contact point; determine the moving rate of the slider on the slide rail according to the angle between the moving direction of the contact point and the slide rail .

所述滑块在滑轨上的移动方向和移动速率共同构成滑块在滑轨上的移动速度。The moving direction and moving speed of the slider on the slide rail jointly constitute the moving speed of the slider on the slide rail.

之后,电子设备即可根据步骤102中确定的滑块在滑轨上的移动速度相应的移动滑块并相应调整显示器上显示的内容。Afterwards, the electronic device can move the slider correspondingly according to the moving speed of the slider on the slide rail determined in step 102 and adjust the content displayed on the display accordingly.

本实施例中,检测到滑块被选中后,获取接触点的移动方向;根据所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。本实施例根据接触点的移动方向确定滑块的移动速度,滑块的移动并不依赖于接触点始终位于滑块的位置范围内这一条件,接触点可以脱离滑块的位置范围任意移动,从而本实施例无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。In this embodiment, after detecting that the slider is selected, obtain the moving direction of the contact point; determine the moving direction of the slider on the slide rail according to the moving direction of the contact point; The angle between the rails determines the rate at which the slider moves on the rails. In this embodiment, the moving speed of the slider is determined according to the moving direction of the contact point. The movement of the slider does not depend on the condition that the contact point is always within the position range of the slider. The contact point can move arbitrarily outside the position range of the slider. Therefore, in this embodiment, the moving speed of the slider can be dynamically adjusted without the need for the contact point to always be within the position range of the slider, and then the content displayed on the display can be dynamically adjusted.

以下,对图1所示本发明实施例各个步骤的实现进行更为详细的说明:Below, the realization of each step of the embodiment of the present invention shown in FIG. 1 is described in more detail:

对于步骤101:For step 101:

所述获取接触点的移动方向可以包括:The acquiring the moving direction of the contact point may include:

确定接触点的初始位置;Determine the initial position of the contact point;

确定接触点的当前位置;determine the current location of the touchpoint;

根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position.

其中,所述接触点的初始位置可以是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置;接触点的当前位置可以是指滑块被选中后,当前时刻接触点在显示屏上的位置;实际应用中所述周期的时间长度本发明并不限制,可以在实际应用中自主设置;另外,第一个周期的初始时刻可以为滑块被选中的时刻。Wherein, the initial position of the contact point may refer to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected; the current position of the contact point may refer to the position of the contact point at the current moment after the slider is selected. The position of the point on the display screen; the time length of the cycle in the actual application is not limited in the present invention, and can be set independently in the actual application; in addition, the initial moment of the first cycle can be the moment when the slider is selected.

或者,所述接触点的初始位置可以是指滑块被选中时,接触点在显示屏上的位置;接触点的当前位置可以是指滑块被选中后,当前时刻接触点在显示屏上的位置;Alternatively, the initial position of the contact point may refer to the position of the contact point on the display screen when the slider is selected; the current position of the contact point may refer to the position of the contact point on the display screen at the current moment after the slider is selected. Location;

或者,所述接触点的初始位置可以是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置可以是指滑块被选中后,当前时刻接触点在显示屏上的位置;其中,所述预设时间长度的具体数值本发明并不限制,可以在实际应用中自主设置。Alternatively, the initial position of the contact point may refer to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time length from the current time; the current position of the contact point may be Refers to the position of the contact point on the display screen at the current moment after the slider is selected; wherein, the specific value of the preset time length is not limited in the present invention, and can be set independently in practical applications.

其中,所述当前时刻可以是本发明步骤101的执行时刻。Wherein, the current moment may be the execution moment of step 101 of the present invention.

在本发明实施例中,所述显示屏可以是非触摸显示屏也可以是触摸显示屏,这里并不限制。所述接触点是指滑块被选中时以及被选中后,电子设备可以检测到的指示方式在显示屏上的位置。所述电子设备可以检测到的指示方式包括但不限于鼠标、手指接触显示屏、触控笔接触显示屏等。例如,所述接触点可以为鼠标选中滑块时以及选中滑块后,鼠标在显示屏上的位置;或者,所述接触点也可以为用户通过手或者触控笔选中滑块时以及选中滑块后,手或者触控笔与显示屏接触的位置;等等。In the embodiment of the present invention, the display screen may be a non-touch display screen or a touch display screen, which is not limited here. The contact point refers to the position on the display screen of the indication means that can be detected by the electronic device when the slider is selected and after it is selected. The indication methods that can be detected by the electronic device include, but are not limited to, a mouse, a finger touching a display screen, a stylus touching a display screen, and the like. For example, the contact point can be the position of the mouse on the display screen when the mouse selects the slider and after the slider is selected; behind the block, where the hand or stylus makes contact with the display; and so on.

显示屏上的各个像素点可以通过坐标的方式记录和定位,接触点的初始位置、当前位置也可以通过接触点对应位置的像素点的坐标来记录,进一步的,所述接触点的移动方向也可以根据所述初始位置和当前位置的坐标来确定或者标识。在实际应用中如何建立显示屏上像素点所属平面的坐标系,本发明并不限制。Each pixel on the display screen can be recorded and positioned by means of coordinates. The initial position and current position of the contact point can also be recorded by the coordinates of the pixel corresponding to the position of the contact point. Further, the moving direction of the contact point can also be It may be determined or identified according to the coordinates of the initial position and the current position. How to establish the coordinate system of the plane to which the pixels on the display screen belong in practical application is not limited by the present invention.

例如图2A所示,假设以显示屏最左下角的像素点作为坐标原点O,显示屏最下方的一行像素点构成坐标系的横坐标轴(即x轴),显示屏最左方的一列像素点构成坐标系的纵坐标轴(即y轴);滑块以及滑轨210位于显示屏的右方,滑轨210平行于y轴,如果假设接触点的初始位置为点A,点A的坐标为(1016,555),接触点的当前位置为点B,点B的坐标为(980,666),那么显然可以通过坐标确定接触点的移动方向为点A(1016,555)指向点B(980,666)的方向,甚至所述接触点的移动方向也可以直接通过这两个位置的坐标来标识。For example, as shown in Figure 2A, assuming that the pixel in the lower left corner of the display is used as the coordinate origin O, the row of pixels at the bottom of the display constitutes the abscissa axis of the coordinate system (that is, the x-axis), and the pixel in the leftmost column of the display Points constitute the ordinate axis (y-axis) of the coordinate system; the slider and slide rail 210 are located on the right of the display screen, and the slide rail 210 is parallel to the y-axis. If the initial position of the contact point is assumed to be point A, the coordinates of point A is (1016,555), the current position of the contact point is point B, and the coordinates of point B are (980,666), then it is obvious that the moving direction of the contact point can be determined from point A (1016,555) to point B (980,666) , even the moving direction of the contact point can be directly identified by the coordinates of these two positions.

对于步骤102:For step 102:

其中,所述根据所述接触点的移动方向确定滑块在滑轨上的移动方向可以包括:Wherein, said determining the moving direction of the slider on the slide rail according to the moving direction of the contact point may include:

确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。Determine the direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the moving direction of the slider on the slide rail.

仍以图2A为例,由于滑轨平行于纵坐标轴,而接触点的移动方向为点A(1016,555)指向点B(980,666)的方向,因此,所述接触点的移动方向在所述滑轨上的方向分量为:滑轨上纵坐标为555的点C指向滑轨上纵坐标为666的点D的方向。Still taking Figure 2A as an example, since the slide rail is parallel to the ordinate axis, and the moving direction of the contact point is point A (1016,555) pointing to the direction of point B (980,666), therefore, the moving direction of the contact point is The direction component on the slide rail is: the point C on the slide rail whose ordinate is 555 points to the direction of the point D on the slide rail whose ordinate is 666.

其中,所述根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块的移动速率可以包括:Wherein, the determining the moving rate of the slider according to the angle between the moving direction of the contact point and the sliding rail may include:

确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;接触点的移动方向与滑轨所形成的两个夹角分别为第一夹角和第二夹角,第一夹角的度数不大于第二夹角的度数。Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the two angles formed by the moving direction of the contact point and the slide rail are respectively the first included angle and the second included angle, The degrees of the first included angle are not greater than the degrees of the second included angle.

根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle.

在实际应用中,也可以确定第二夹角的度数,根据第二夹角的度数确定滑块的移动速率,这时第二夹角度数与所述滑块的移动速率成正比。In practical applications, the degree of the second included angle may also be determined, and the moving speed of the slider is determined according to the degree of the second included angle. At this time, the second included angle is proportional to the moving speed of the slider.

其中,由于第一夹角的度数取值区间为[0,90],第一夹角的正切或正弦与第一夹角的度数成正比,第一夹角的余切或余弦与第一夹角的度数成反比,因此,在实际应用中,可以不直接计算第一夹角的具体度数,而是通过第一夹角的正切、余切、正弦或者余弦来表征第一夹角的度数。其中,第一夹角的正切、余切、正弦或者余弦可以通过接触点的初始位置和当前位置的坐标来计算。具体的,Wherein, since the range of degrees of the first included angle is [0,90], the tangent or sine of the first included angle is proportional to the degree of the first included angle, and the cotangent or cosine of the first included angle is proportional to the first included angle The degrees of the angles are inversely proportional. Therefore, in practical applications, instead of directly calculating the specific degrees of the first included angle, the degrees of the first included angle can be represented by the tangent, cotangent, sine or cosine of the first included angle. Wherein, the tangent, cotangent, sine or cosine of the first included angle can be calculated according to the coordinates of the initial position and the current position of the contact point. specific,

以通过第一夹角的正切来表征第一夹角的度数为例,参见图2A所示,接触点的移动方向为点A(1016,555)指向点B(980,666)的方向,而滑轨与纵坐标轴平行,那么滑轨与接触点的移动方向的第一夹角∠E的正切=(1016-980)/(666-555);Take the tangent of the first included angle to characterize the degree of the first included angle as an example, as shown in Figure 2A, the moving direction of the contact point is point A (1016,555) pointing to the direction of point B (980,666), and the sliding rail Parallel to the ordinate axis, then the tangent of the first angle ∠E between the slide rail and the moving direction of the contact point = (1016-980)/(666-555);

相应的,可以根据第一夹角的正切来确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的正切成反比。Correspondingly, the moving speed of the slider can be determined according to the tangent of the first included angle, wherein the moving speed of the slider is inversely proportional to the tangent of the first included angle.

其中,第一夹角的度数(或者第一夹角的正切、或者第一夹角的余切、或者第一夹角的正弦、或者第一夹角的余弦)与滑块的移动速率之间的具体函数关系可以在实际应用中自主设定,本发明实施例并不限制。Among them, between the degree of the first included angle (or the tangent of the first included angle, or the cotangent of the first included angle, or the sine of the first included angle, or the cosine of the first included angle) and the moving rate of the slider The specific functional relationship of can be set independently in practical applications, which is not limited by the embodiments of the present invention.

以下对本发明实施例滑块的移动速度的确定方法举例说明:The following is an example of the determination method of the moving speed of the slider in the embodiment of the present invention:

1、如果所述接触点的初始位置是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置,接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置,那么,参见图2B所示,当滑块220被选中后,由鼠标或者手指或者触控笔等形成的接触点无需一直位于滑块的位置范围内,而是可以脱离滑块的位置范围随意滑动。例如,假设滑块220被选中后,接触点的移动轨迹如图2B中的移动轨迹230所示,滑块220被选中的时刻设为时间0点,周期设为T,时间0点是第一个周期的初始时刻,那么:当前时刻为t1时,接触点在当前周期的初始时刻3T所在的位置为接触点的初始位置,设为点N,接触点在t1时刻所在的位置为接触点的当前位置,设为点M,接触点的移动方向为点N指向点M,接触点的移动方向在滑轨上的方向分量为点N指向点P,接触点的移动方向与滑轨的第一夹角为∠MNP。1. If the initial position of the contact point refers to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected, the current position of the contact point refers to the position of the contact point at the current moment after the slider is selected. position on the display screen, then, as shown in FIG. 2B , when the slider 220 is selected, the contact point formed by the mouse or finger or stylus does not need to be within the position range of the slider all the time, but can be disengaged. The position range of the slider can slide freely. For example, suppose that after the slider 220 is selected, the moving track of the contact point is shown as the moving track 230 in FIG. The initial moment of a cycle, then: when the current moment is t1, the position of the contact point at the initial moment 3T of the current cycle is the initial position of the contact point, set point N, and the position of the contact point at the moment t1 is the contact point’s The current position is set as point M, the moving direction of the contact point is point N pointing to point M, the direction component of the moving direction of the contact point on the slide rail is point N pointing to point P, the moving direction of the contact point is the same as the first point of the slide rail The included angle is ∠MNP.

2、如果接触点的初始位置是指滑块被接触点选中时,接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;那么,参见图2C所示,当滑块220被选中后,由鼠标或者手指或者触控笔等形成的接触点无需一直位于滑块的位置范围内,而是可以脱离滑块的位置范围随意滑动。例如,滑块220被接触点选中后,接触点的移动轨迹如图2C中的移动轨迹230所示,接触点选中滑块220的时刻假设为时间0点,滑块被选中时接触点的位置为接触点的初始位置,设为点X,接触点在当前时刻t1所在的位置为接触点的当前位置,设为点Y,接触点的移动方向为点X指向点Y,接触点的移动方向在滑轨上的方向分量为点X指向点Z,接触点的移动方向与滑轨的第一夹角为∠YXZ。2. If the initial position of the touch point refers to the position of the touch point on the display when the slider is selected by the touch point; the current position of the touch point refers to the position of the touch point on the display at the current moment after the slider is selected ; Then, as shown in FIG. 2C , when the slider 220 is selected, the contact point formed by the mouse or finger or stylus does not need to be within the position range of the slider all the time, but can be free from the position range of the slider. slide. For example, after the slider 220 is selected by the contact point, the moving track of the contact point is shown in the moving track 230 in FIG. is the initial position of the contact point, set it as point X, the position of the contact point at the current time t1 is the current position of the contact point, set it as point Y, the moving direction of the contact point is point X pointing to point Y, the moving direction of the contact point The direction component on the slide rail is point X pointing to point Z, and the first included angle between the moving direction of the contact point and the slide rail is ∠YXZ.

3、如果所述接触点的初始位置是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;那么,参见图2D所示,当滑块220被接触点选中后,由鼠标或者手指或者触控笔等形成的接触点无需一直位于滑块的位置范围内,而是可以脱离滑块的位置范围随意滑动。例如,预设时间长度为Δt,滑块220被接触点选中后,接触点的移动轨迹如图2D中的移动轨迹230所示,滑块220被接触点选中的时刻设为时间0点,接触点在当前时刻t1所在的位置为接触点的当前位置,设为点S,接触点在t0=t1-Δt时刻所在的位置为接触点的初始位置,设为点Q,接触点的移动方向为点Q指向点S,接触点的移动方向在滑轨上的方向分量为点Q指向点R,接触点的移动方向与滑轨的第一夹角为∠SQR。3. If the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time interval from the current time; the current position of the contact point refers to After the slider is selected, the position of the contact point on the display screen at the current moment; then, referring to FIG. 2D , when the slider 220 is selected by the contact point, the contact point formed by the mouse or finger or stylus does not need to be displayed all the time. It is within the position range of the slider, but can slide freely out of the position range of the slider. For example, the preset time length is Δt. After the slider 220 is selected by the contact point, the moving track of the contact point is shown as the moving track 230 in FIG. The position of the point at the current time t1 is the current position of the contact point, which is set as point S, and the position of the contact point at the time t0=t1-Δt is the initial position of the contact point, which is set as point Q, and the moving direction of the contact point is Point Q points to point S, the direction component of the moving direction of the contact point on the slide rail is point Q pointing to point R, and the first included angle between the moving direction of the contact point and the slide rail is ∠SQR.

当电子设备确定了滑块在滑轨上的移动速度后,就可以根据滑块在滑轨上的移动速度相应的移动滑块并相应调整显示器上显示的内容。本发明实施例中如何根据滑块在滑轨上的移动速度响应移动滑块并相应调整显示器上显示的内容本发明并不限制,不再赘述。After the electronic device determines the moving speed of the slider on the slide rail, it can move the slider accordingly according to the moving speed of the slider on the slide rail and adjust the content displayed on the display accordingly. In the embodiment of the present invention, how to respond to moving the slider according to the moving speed of the slider on the slide rail and correspondingly adjust the content displayed on the display is not limited by the present invention, and will not be repeated here.

参见图3,为本发明实施例滑块的移动速度的确定装置结构示意图,该装置300包括:Referring to FIG. 3 , it is a schematic structural diagram of a device for determining the moving speed of the slider according to an embodiment of the present invention. The device 300 includes:

获取单元310,用于检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;The obtaining unit 310 is configured to obtain the moving direction of the contact point after detecting that the slider is selected; the moving direction is a direction in which the initial position of the contact point points to the current position of the contact point;

确定单元320,用于根据所述获取单元310获取的所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。The determining unit 320 is configured to determine the moving direction of the slider on the slide rail according to the moving direction of the contact point acquired by the acquiring unit 310; according to the angle between the moving direction of the contact point and the sliding rail Determines the rate at which the slider moves on the rail.

可选地,所述确定单元320具体可以用于:确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。Optionally, the determining unit 320 may be specifically configured to: determine a direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the direction of the slider on the slide rail. direction of movement.

可选地,所述确定单元320具体可以用于:Optionally, the determining unit 320 may be specifically configured to:

确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the first angle is the angle between the moving direction of the contact point and the slide rail, An included angle whose degree is not greater than another included angle;

根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle.

可选地,所述获取单元310具体可以用于:Optionally, the acquiring unit 310 may be specifically configured to:

确定滑块的初始位置;Determine the initial position of the slider;

确定接触点的当前位置;determine the current location of the touchpoint;

根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position.

本实施例中,根据接触点的移动方向确定滑块的移动速度,滑块的移动并不依赖于接触点始终位于滑块的位置范围内这一条件,接触点可以脱离滑块的位置范围任意移动,从而本实施例无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。In this embodiment, the moving speed of the slider is determined according to the moving direction of the contact point. The movement of the slider does not depend on the condition that the contact point is always within the position range of the slider. Therefore, in this embodiment, the moving speed of the slider can be dynamically adjusted without the need for the contact point to always be within the position range of the slider, and then the content displayed on the display can be dynamically adjusted.

参见图4,为本发明实施例提供的电子设备结构示意图,电子设备400包括:处理器410、存储器420、收发器430和总线440;Referring to FIG. 4 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, the electronic device 400 includes: a processor 410, a memory 420, a transceiver 430, and a bus 440;

处理器410、存储器420、收发器430通过总线440相互连接;总线440可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 410, the memory 420, and the transceiver 430 are connected to each other through a bus 440; the bus 440 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 4 , but it does not mean that there is only one bus or one type of bus.

存储器420,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器420可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 420 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 420 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

收发器430用于连接其他设备,并与其他设备进行通信。The transceiver 430 is used to connect and communicate with other devices.

所述处理器410执行所述程序代码,用于检测到滑块被选中,获取接触点的移动方向;所述移动方向是从滑块的初始位置指向接触点当前位置的方向;根据所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率。The processor 410 executes the program code for detecting that the slider is selected, and obtaining the moving direction of the contact point; the moving direction is a direction from the initial position of the slider to the current position of the contact point; according to the contact The moving direction of the point determines the moving direction of the slider on the slide rail; the moving speed of the slider on the slide rail is determined according to the angle between the moving direction of the contact point and the slide rail.

可选地,所述处理器410具体可以用于:确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。Optionally, the processor 410 may be specifically configured to: determine a direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the direction of the slider on the slide rail. direction of movement.

可选地,所述处理器410具体可以用于:确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。Optionally, the processor 410 may be specifically configured to: determine a degree of a first included angle between the moving direction of the contact point and the slide rail; the first included angle is the movement direction of the contact point Among the two included angles formed by the direction and the slide rail, the angle whose degree is not greater than the other included angle; determine the moving rate of the slider according to the degree of the first included angle, wherein the movement of the slider The rate is inversely proportional to the degree of the first included angle.

可选地,所述处理器410具体可以用于:确定滑块的初始位置;确定接触点的当前位置;根据所述初始位置和当前位置确定接触点的移动方向。Optionally, the processor 410 may be specifically configured to: determine an initial position of the slider; determine a current position of the contact point; and determine a moving direction of the contact point according to the initial position and the current position.

其中,所述电子设备还可以包括显示器,所述显示器可以通过总线440与处理器410相互连接,处理器410根据所述确定的滑块在滑轨上的移动速度相应的控制显示器中显示的滑块在滑轨上移动并相应调整显示器中显示的内容。Wherein, the electronic device may further include a display, and the display may be connected to the processor 410 through the bus 440, and the processor 410 controls the slider displayed on the display according to the determined moving speed of the slider on the slide rail. The blocks move on the rails and adjust what is shown in the display accordingly.

本实施例中,根据接触点的移动方向确定滑块的移动速度,滑块的移动并不依赖于接触点始终位于滑块的位置范围内这一条件,接触点可以脱离滑块的位置范围任意移动,从而本实施例无需接触点一直位于滑块的位置范围内,就可以动态调整滑块的移动速度,进而动态调整显示器上显示的内容。In this embodiment, the moving speed of the slider is determined according to the moving direction of the contact point. The movement of the slider does not depend on the condition that the contact point is always within the position range of the slider. Therefore, in this embodiment, the moving speed of the slider can be dynamically adjusted without the need for the contact point to always be within the position range of the slider, and then the content displayed on the display can be dynamically adjusted.

本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technologies in the embodiments of the present invention can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solutions in the embodiments of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiment.

以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。The embodiments of the present invention described above are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (8)

1.一种滑块的移动速度的确定方法,其特征在于,包括:1. A method for determining the moving speed of a slide block, comprising: 检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;After detecting that the slider is selected, obtain the moving direction of the contact point; the moving direction is the direction in which the initial position of the contact point points to the current position of the contact point; 根据所述接触点的移动方向确定所述滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在所述滑轨上的移动速率;Determine the movement direction of the slider on the slide rail according to the movement direction of the contact point; determine the movement of the slider on the slide rail according to the angle between the movement direction of the contact point and the slide rail rate; 所述根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块的移动速率包括:The determining the moving rate of the slider according to the angle between the moving direction of the contact point and the sliding rail includes: 确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the first angle is the angle between the moving direction of the contact point and the slide rail, An included angle whose degree is not greater than another included angle; 根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle. 2.根据权利要求1所述的方法,其特征在于,所述根据所述接触点的移动方向确定滑块在滑轨上的移动方向包括:2. The method according to claim 1, wherein said determining the moving direction of the slider on the slide rail according to the moving direction of the contact point comprises: 确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。Determine the direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the moving direction of the slider on the slide rail. 3.根据权利要求1或2所述的方法,其特征在于,所述获取接触点的移动方向包括:3. The method according to claim 1 or 2, wherein said obtaining the moving direction of the contact point comprises: 确定接触点的初始位置;Determine the initial position of the contact point; 确定接触点的当前位置;determine the current location of the touchpoint; 根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position. 4.根据权利要求1或2所述的方法,其特征在于,所述接触点的初始位置是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;4. The method according to claim 1 or 2, wherein the initial position of the contact point refers to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected; The current position refers to the position of the touch point on the display screen at the current moment after the slider is selected; 或者,所述接触点的初始位置是指滑块被选中时,接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected; the current position of the contact point refers to the position of the contact point on the display screen at the current moment after the slider is selected; 或者,所述接触点的初始位置是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置。Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time interval from the current time; the current position of the contact point refers to the position of the slider. After the block is selected, the position of the touch point on the display at the current moment. 5.一种滑块的移动速度的确定装置,其特征在于,包括:5. A device for determining the moving speed of a slider, comprising: 获取单元,用于检测到滑块被选中后,获取接触点的移动方向;所述移动方向是接触点的初始位置指向接触点当前位置的方向;The obtaining unit is used to obtain the moving direction of the contact point after detecting that the slider is selected; the moving direction is a direction in which the initial position of the contact point points to the current position of the contact point; 确定单元,用于根据所述获取单元获取的所述接触点的移动方向确定滑块在滑轨上的移动方向;根据所述接触点的移动方向与所述滑轨之间的夹角确定滑块在滑轨上的移动速率;A determining unit, configured to determine the moving direction of the slider on the slide rail according to the moving direction of the contact point acquired by the acquiring unit; determine the sliding direction according to the angle between the moving direction of the contact point and the sliding rail The speed at which the block moves on the slide; 所述确定单元具体用于:The determining unit is specifically used for: 确定所述接触点的移动方向与所述滑轨之间的第一夹角的度数;所述第一夹角是所述接触点的移动方向与所述滑轨形成的两个夹角中、度数不大于另一个夹角度数的夹角;Determine the degrees of the first angle between the moving direction of the contact point and the slide rail; the first angle is the angle between the moving direction of the contact point and the slide rail, An included angle whose degree is not greater than another included angle; 根据所述第一夹角的度数确定滑块的移动速率,其中,所述滑块的移动速率与所述第一夹角的度数成反比。The moving speed of the slider is determined according to the degree of the first included angle, wherein the moving speed of the slider is inversely proportional to the degree of the first included angle. 6.根据权利要求5所述的装置,其特征在于,所述确定单元具体用于:确定所述接触点的移动方向在所述滑轨上的方向分量,将该方向分量的方向作为所述滑块在所述滑轨上的移动方向。6. The device according to claim 5, wherein the determining unit is specifically configured to: determine a direction component of the moving direction of the contact point on the slide rail, and use the direction of the direction component as the The direction of movement of the slider on the rail. 7.根据权利要求5或6所述的装置,其特征在于,所述获取单元具体用于:7. The device according to claim 5 or 6, wherein the acquiring unit is specifically used for: 确定接触点的初始位置;Determine the initial position of the contact point; 确定接触点的当前位置;determine the current location of the touchpoint; 根据所述初始位置和当前位置确定接触点的移动方向。The moving direction of the contact point is determined according to the initial position and the current position. 8.根据权利要求5或6所述的装置,其特征在于,所述接触点的初始位置是指滑块被选中后,当前周期的初始时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;8. The device according to claim 5 or 6, wherein the initial position of the contact point refers to the position of the contact point on the display screen at the initial moment of the current cycle after the slider is selected; The current position refers to the position of the touch point on the display screen at the current moment after the slider is selected; 或者,所述接触点的初始位置是指滑块被选中时,接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置;Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected; the current position of the contact point refers to the position of the contact point on the display screen at the current moment after the slider is selected; 或者,所述接触点的初始位置是指滑块被选中后,位于当前时刻之前、与当前时刻间隔预设时间长度的时刻时接触点在显示屏上的位置;接触点的当前位置是指滑块被选中后,当前时刻接触点在显示屏上的位置。Alternatively, the initial position of the contact point refers to the position of the contact point on the display screen when the slider is selected, before the current time and at a time interval of a preset time interval from the current time; the current position of the contact point refers to the position of the slider. After the block is selected, the position of the touch point on the display at the current moment.
CN201310726874.0A 2013-12-25 2013-12-25 A kind of determining method and device of the movement speed of sliding block Active CN104750275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310726874.0A CN104750275B (en) 2013-12-25 2013-12-25 A kind of determining method and device of the movement speed of sliding block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310726874.0A CN104750275B (en) 2013-12-25 2013-12-25 A kind of determining method and device of the movement speed of sliding block

Publications (2)

Publication Number Publication Date
CN104750275A CN104750275A (en) 2015-07-01
CN104750275B true CN104750275B (en) 2018-07-03

Family

ID=53590093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310726874.0A Active CN104750275B (en) 2013-12-25 2013-12-25 A kind of determining method and device of the movement speed of sliding block

Country Status (1)

Country Link
CN (1) CN104750275B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110197725A (en) * 2019-05-23 2019-09-03 浙江大学 It is a kind of based on intelligent mobile terminal to refer to motion detection finger dexterity test method
CN112346635A (en) * 2020-10-22 2021-02-09 杭州安恒信息技术股份有限公司 Method and device for realizing sliding block effect based on SVG (scalable vector graphics), and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1091536A (en) * 1992-12-23 1994-08-31 塔利根蒂公司 The object oriented architecture system
CN1099159A (en) * 1993-06-29 1995-02-22 国际商业机器公司 Method and device for providing a two-dimensional position-sensitive scrolling icon
US6677965B1 (en) * 2000-07-13 2004-01-13 International Business Machines Corporation Rubber band graphical user interface control
CN101237482A (en) * 2007-02-03 2008-08-06 Lg电子株式会社 Mobile communication device and method of controlling the operation of the mobile communication device
CN101673184A (en) * 2009-07-16 2010-03-17 苏州瀚瑞微电子有限公司 Method for controlling scroll to scrolling and extending on touch pad

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1091536A (en) * 1992-12-23 1994-08-31 塔利根蒂公司 The object oriented architecture system
CN1099159A (en) * 1993-06-29 1995-02-22 国际商业机器公司 Method and device for providing a two-dimensional position-sensitive scrolling icon
US6677965B1 (en) * 2000-07-13 2004-01-13 International Business Machines Corporation Rubber band graphical user interface control
CN101237482A (en) * 2007-02-03 2008-08-06 Lg电子株式会社 Mobile communication device and method of controlling the operation of the mobile communication device
CN101673184A (en) * 2009-07-16 2010-03-17 苏州瀚瑞微电子有限公司 Method for controlling scroll to scrolling and extending on touch pad

Also Published As

Publication number Publication date
CN104750275A (en) 2015-07-01

Similar Documents

Publication Publication Date Title
TWI584164B (en) Emulating pressure sensitivity on multi-touch devices
CN103262007B (en) For the method and apparatus using time shaft bar to control touch-screen, there is the record medium of the program for described method and apparatus recorded wherein and there is the user terminal of described method and apparatus
CN109643210B (en) Device manipulation using hovering
US10452188B2 (en) Predictive compensation for a latency of an input device
CN105094411B (en) Electronic device, drawing method thereof, and computer program product
CN103645844A (en) Page displaying method and device
CN103412720B (en) Process method and the device thereof of touch control type input signal
JP2013530587A5 (en)
US10877565B2 (en) Method and system for controlling play of multimedia content
CN104346083A (en) Display control system and method based on sliding touch operation
TWI768407B (en) Prediction control method, input system and computer readable recording medium
CN102750035B (en) The determination method and apparatus of display position of cursor
CN111679767B (en) Window extension method and associated electronics
CN104750275B (en) A kind of determining method and device of the movement speed of sliding block
US9875020B2 (en) Method for capturing user input from a touch screen and device having a touch screen
CN103309581A (en) A method and device for positioning a progress bar
US8698772B2 (en) Visual object manipulation
TWI492168B (en) Method for generating movement position coordinates
CN108132721A (en) Generate method, touch device and the portable electronic device of drag gesture
CN104699394B (en) A kind of information processing method and electronic equipment
CN104699286B (en) The method and electronic equipment of a kind of information processing
KR101271357B1 (en) Timeline-based contents control method and device using dynamic distortion and control method and device for video and audio clips using the same
CN115904063A (en) Non-contact human-computer interaction pen handwriting generation method, device, equipment and system
CN117760364A (en) Folding angle determining method and device of folding screen, electronic equipment and storage medium
US20140232666A1 (en) Virtual Navigation Apparatus, Navigation Method, and Non-Transitory Computer Readable Medium Thereof

Legal Events

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