[go: up one dir, main page]

CN105549852B - Method and device for rotating a picture - Google Patents

Method and device for rotating a picture Download PDF

Info

Publication number
CN105549852B
CN105549852B CN201610076779.4A CN201610076779A CN105549852B CN 105549852 B CN105549852 B CN 105549852B CN 201610076779 A CN201610076779 A CN 201610076779A CN 105549852 B CN105549852 B CN 105549852B
Authority
CN
China
Prior art keywords
tail
touch
motion track
rotation
head
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.)
Expired - Fee Related
Application number
CN201610076779.4A
Other languages
Chinese (zh)
Other versions
CN105549852A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610076779.4A priority Critical patent/CN105549852B/en
Publication of CN105549852A publication Critical patent/CN105549852A/en
Application granted granted Critical
Publication of CN105549852B publication Critical patent/CN105549852B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present invention provides the spinning solution and device of a kind of picture, comprising the following steps: in picture display interface, receives the pressing instruction that user presses screen;It is instructed according to the pressing, generates and touch item;Record the motion profile for touching item;Go out the direction of rotation for touching item and rotation angle according to the moving track calculation;According to the direction of rotation for touching item and rotation angle, the rotation that the picture carries out respective direction and angle is controlled.Single finger of the present invention is just able to achieve the rotation process of picture, double finger manipulations compared with the existing technology, it appears and it is more simple and convenient, it is user-friendly, to greatly improve the friendly experience of user.

Description

一种图片的旋转方法及装置Method and device for rotating a picture

技术领域technical field

本发明涉及图片处理技术领域,尤其涉及一种图片的旋转方法及装置。The present invention relates to the technical field of picture processing, and in particular, to a method and device for rotating a picture.

背景技术Background technique

在现有技术中,图片的旋转手势需要两个手指同时按住触摸屏,如图1所示,并且顺时针或者逆时针进行旋转,从而实现图片的旋转功能。然而,现有的技术需要两个手指来进行操作,用户体验不佳。In the prior art, the rotation gesture of a picture requires two fingers to press and hold the touch screen at the same time, as shown in FIG. 1 , and rotate clockwise or counterclockwise, so as to realize the rotation function of the picture. However, the existing technology requires two fingers to operate, resulting in poor user experience.

故,有必要提出一种新的技术方案,以解决上述技术问题。Therefore, it is necessary to propose a new technical solution to solve the above-mentioned technical problems.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种图片的旋转方法及装置,旨在解决现有技术中存在的图片的旋转手势需要两个手指同时按住触摸屏,并且顺时针或者逆时针进行旋转,从而实现图片的旋转功能。然而,现有的技术需要两个手指来进行操作,用户体验不佳的问题。In view of this, the purpose of the present invention is to provide a method and device for rotating a picture, aiming at solving the problem that the rotating gesture of a picture existing in the prior art requires two fingers to press the touch screen at the same time, and rotate clockwise or counterclockwise, So as to realize the rotation function of the picture. However, the existing technology requires two fingers to operate, resulting in poor user experience.

为解决上述技术问题,本发明实施例提供了以下技术方案:In order to solve the above-mentioned technical problems, the embodiments of the present invention provide the following technical solutions:

本发明实施例提供了一种图片的旋转方法,所述图片的旋转方法,包括以下步骤:An embodiment of the present invention provides a method for rotating a picture, and the method for rotating a picture includes the following steps:

在图片显示界面,接收用户按压屏幕的按压指令;On the picture display interface, receive a pressing instruction from the user to press the screen;

根据所述按压指令,生成触摸条;generating a touch bar according to the pressing instruction;

记录所述触摸条的运动轨迹;record the movement track of the touch bar;

根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;Calculate the rotation direction and rotation angle of the touch bar according to the motion trajectory;

根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。According to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle.

为解决上述技术问题,本发明实施例还提供了以下技术方案:In order to solve the above-mentioned technical problems, the embodiments of the present invention also provide the following technical solutions:

本发明实施例还提供了一种图片的旋转装置,所述图片的旋转装置,包括以下步骤:The embodiment of the present invention also provides a picture rotation device, and the picture rotation device includes the following steps:

指令接收模块,用于在图片显示界面,接收用户按压屏幕的按压指令;The instruction receiving module is used for receiving the pressing instruction of the user pressing the screen on the picture display interface;

生成模块,用于根据所述按压指令,生成触摸条;a generating module, configured to generate a touch bar according to the pressing instruction;

记录模块,用于记录所述触摸条的运动轨迹;a recording module, used to record the movement track of the touch bar;

计算模块,用于根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;a calculation module, configured to calculate the rotation direction and rotation angle of the touch bar according to the motion trajectory;

控制模块,用于根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。The control module is configured to control the picture to rotate in the corresponding direction and angle according to the rotation direction and rotation angle of the touch bar.

相对于现有技术,本发明的图片的旋转方法及装置,通过在图片显示界面,接收用户按压屏幕的按压指令;根据所述按压指令,生成触摸条;记录所述触摸条的运动轨迹;根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。本发明单只手指便能实现图片的旋转操作,相对于现有技术的双手指操作,显得更加的简单以及便捷,方便用户操作,从而大大提升了用户的友好体验。Compared with the prior art, the method and device for rotating a picture of the present invention receive a pressing instruction from a user to press the screen on a picture display interface; generate a touch bar according to the pressing instruction; record the motion track of the touch bar; The motion track calculates the rotation direction and rotation angle of the touch bar; and controls the picture to rotate in the corresponding direction and angle according to the rotation direction and rotation angle of the touch bar. Compared with the two-finger operation in the prior art, the present invention can realize the rotation operation of the picture with a single finger, which is simpler and more convenient for the user to operate, thereby greatly improving the user-friendly experience.

附图说明Description of drawings

图1是现有技术提供的双手指控制图片旋转的界面示意图;Fig. 1 is the interface schematic diagram of two-finger control picture rotation provided by the prior art;

图2是本发明实施例一提供的图片的旋转方法的实现流程示意图;FIG. 2 is a schematic flowchart of an implementation of a method for rotating a picture provided in Embodiment 1 of the present invention;

图3是本发明实施例二提供的图片的旋转方法的实现流程示意图;3 is a schematic flowchart of the implementation of a method for rotating a picture provided in Embodiment 2 of the present invention;

图4是本发明实施例三提供的图片的旋转装置的模块示意图;4 is a schematic diagram of a module of a picture rotation device provided in Embodiment 3 of the present invention;

图5是本发明实施例四提供的图片的旋转装置的模块示意图。FIG. 5 is a schematic block diagram of a picture rotation device according to Embodiment 4 of the present invention.

具体实施方式Detailed ways

请参照附图中的图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所示例的本发明的具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Please refer to the drawings in the accompanying drawings, in which the same component symbols represent the same components, and the principles of the present invention are exemplified by being implemented in a suitable computing environment. The following description is based on exemplified specific embodiments of the invention and should not be construed as limiting other specific embodiments of the invention not detailed herein.

本发明原理以上述文字来说明,其并不代表为一种限制,本领域技术人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。本发明的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。The principle of the present invention is described by the above text, which is not meant to be a limitation. Those skilled in the art will understand that various steps and operations described below can also be implemented in hardware. The principles of the present invention operate using numerous other general-purpose or special-purpose computing, communication environments, or configurations.

实施例一Example 1

请参阅图2,所示为本发明实施例提供的图片的旋转方法。Referring to FIG. 2 , a method for rotating a picture provided by an embodiment of the present invention is shown.

所述图片的旋转方法,主要应用于移动终端中,具体包括如下步骤:The method for rotating a picture is mainly applied in a mobile terminal, and specifically includes the following steps:

在步骤S101中,在图片显示界面,接收用户按压屏幕的按压指令;In step S101, on the picture display interface, a pressing instruction of the user pressing the screen is received;

在本发明实施例中,当用户需要对图片进行旋转操作时,那么在该图片的显示界面上,用户用单只手指按压触摸屏幕,此时,移动终端会接收到用户按压屏幕的按压指令。In this embodiment of the present invention, when the user needs to rotate a picture, on the display interface of the picture, the user presses the touch screen with a single finger, and at this time, the mobile terminal receives a pressing instruction from the user to press the screen.

在步骤S102中,根据所述按压指令,生成触摸条;In step S102, a touch bar is generated according to the pressing instruction;

在本发明实施例中,由于手指触摸触摸屏的点并不是一个标准的圆形,因此,生成的触摸条是一个近似椭圆或者长方形的触摸条。In this embodiment of the present invention, since the point where the finger touches the touch screen is not a standard circle, the generated touch bar is an approximate oval or rectangular touch bar.

在步骤S103中,记录所述触摸条的运动轨迹;In step S103, record the motion track of the touch bar;

在本发明实施例中,具体的,记录所述触摸条的头部运动轨迹;以及,记录所述触摸条的尾部运动轨迹。In the embodiment of the present invention, specifically, the head movement track of the touch bar is recorded; and the tail movement track of the touch bar is recorded.

在步骤S104中,根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;In step S104, the rotation direction and rotation angle of the touch bar are calculated according to the motion track;

在本发明实施例中,根据所述触摸条的头部运动轨迹和尾部运动轨迹,计算出所述触摸条的旋转方向及旋转角度。In the embodiment of the present invention, the rotation direction and rotation angle of the touch bar are calculated according to the head movement track and the tail movement track of the touch bar.

在步骤S105中,根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。In step S105, according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle.

由上可知,本实施例一提供的图片的旋转方法,通过在图片显示界面,接收用户按压屏幕的按压指令;根据所述按压指令,生成触摸条;记录所述触摸条的运动轨迹;根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。本发明单只手指便能实现图片的旋转操作,相对于现有技术的双手指操作,显得更加的简单以及便捷,方便用户操作,从而大大提升了用户的友好体验。It can be seen from the above that the method for rotating a picture provided by the first embodiment receives a pressing instruction from the user to press the screen on the picture display interface; generates a touch bar according to the pressing instruction; records the movement track of the touch bar; The rotation direction and rotation angle of the touch bar are calculated from the motion track; according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle. Compared with the two-finger operation in the prior art, the present invention can realize the rotation operation of the picture with a single finger, which is simpler and more convenient for the user to operate, thereby greatly improving the user-friendly experience.

实施例二Embodiment 2

请参阅图3,所示为本发明实施例提供的图片的旋转方法。Referring to FIG. 3 , a method for rotating a picture according to an embodiment of the present invention is shown.

所述图片的旋转方法,主要应用于移动终端中,具体包括如下步骤:The method for rotating a picture is mainly applied in a mobile terminal, and specifically includes the following steps:

在步骤S201中,在图片显示界面,接收用户按压屏幕的按压指令;In step S201, on the picture display interface, a pressing instruction of the user pressing the screen is received;

在本发明实施例中,当用户需要对图片进行旋转操作时,那么在该图片的显示界面上,用户用单只手指按压触摸屏幕,此时,移动终端会接收到用户按压屏幕的按压指令。In this embodiment of the present invention, when the user needs to rotate a picture, on the display interface of the picture, the user presses the touch screen with a single finger, and at this time, the mobile terminal receives a pressing instruction from the user to press the screen.

在步骤S202中,根据所述按压指令,生成触摸条;In step S202, a touch bar is generated according to the pressing instruction;

在本发明实施例中,由于手指触摸触摸屏的点并不是一个标准的圆形,因此,生成的触摸条是一个近似椭圆或者长方形的触摸条。In this embodiment of the present invention, since the point where the finger touches the touch screen is not a standard circle, the generated touch bar is an approximate oval or rectangular touch bar.

在步骤S203中,记录所述触摸条的头部运动轨迹,以及记录所述触摸条的尾部运动轨迹;In step S203, record the head movement track of the touch bar, and record the tail movement track of the touch bar;

在步骤S204中,根据所述头部运动轨迹,计算出所述触摸条的头部的旋转方向及旋转角度;以及,根据所述尾部运动轨迹,计算出所述触摸条的尾部的旋转方向及旋转角度;In step S204, the rotation direction and rotation angle of the head of the touch bar are calculated according to the head movement track; and the rotation direction and the rotation angle of the tail of the touch bar are calculated according to the tail movement track Rotation angle;

在步骤S205中,计算所述触摸条头部和尾部旋转角度的平均值,其中,所述平均值为所述触摸条的旋转角度;In step S205, an average value of the rotation angles of the head and tail of the touch bar is calculated, wherein the average value is the rotation angle of the touch bar;

在步骤S206中,根据所述触摸条的头部和尾部的旋转方向,计算出所述触摸条的旋转方向;In step S206, the rotation direction of the touch bar is calculated according to the rotation directions of the head and the tail of the touch bar;

在步骤S207中,根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。In step S207, according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle.

作为本发明一实施例,所述根据所述触摸条的头部和尾部的旋转方向,计算出所述触摸条的旋转方向的步骤,具体包括:As an embodiment of the present invention, the step of calculating the rotation direction of the touch bar according to the rotation directions of the head and tail of the touch bar specifically includes:

判断所述触摸条的头部运动轨迹是否从左端滑动到右端;Determine whether the head movement track of the touch bar slides from the left end to the right end;

判断所述触摸条的尾部运动轨迹是否从右端滑动到左端;Determine whether the tail movement track of the touch bar slides from the right end to the left end;

如果判断出头部运动轨迹从左端滑动到右端,且尾部运动轨迹从右端滑动到左端,则判定出所述触摸条的旋转方向为顺时针旋转。If it is determined that the head movement track slides from the left end to the right end, and the tail movement track slides from the right end to the left end, it is determined that the rotation direction of the touch bar is clockwise.

作为本发明另一实施例,所述根据所述触摸条的头部和尾部的旋转方向,计算出所述触摸条的旋转方向的步骤,具体包括:As another embodiment of the present invention, the step of calculating the rotation direction of the touch bar according to the rotation directions of the head and tail of the touch bar specifically includes:

判断所述触摸条的头部运动轨迹是否从右端滑动到左端;Determine whether the head movement track of the touch bar slides from the right end to the left end;

判断所述触摸条的尾部运动轨迹是否从左端滑动到右端;Determine whether the tail movement track of the touch bar slides from the left end to the right end;

如果判断出头部运动轨迹从右端滑动到左端,且尾部运动轨迹从左端滑动到右端,则判定出所述触摸条的旋转方向为逆时针旋转。If it is determined that the head movement track slides from the right end to the left end, and the tail movement track slides from the left end to the right end, it is determined that the rotation direction of the touch bar is counterclockwise.

由上可知,本实施例二提供的图片的旋转方法,通过在图片显示界面,接收用户按压屏幕的按压指令;根据所述按压指令,生成触摸条;记录所述触摸条的运动轨迹;根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。本发明单只手指便能实现图片的旋转操作,相对于现有技术的双手指操作,显得更加的简单以及便捷,方便用户操作,从而大大提升了用户的友好体验。As can be seen from the above, the method for rotating a picture provided in the second embodiment receives a pressing instruction from the user to press the screen on the picture display interface; generates a touch bar according to the pressing instruction; records the motion track of the touch bar; The rotation direction and rotation angle of the touch bar are calculated from the motion track; according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle. Compared with the two-finger operation in the prior art, the present invention can realize the rotation operation of the picture with a single finger, which is simpler and more convenient for the user to operate, thereby greatly improving the user-friendly experience.

实施例三Embodiment 3

请参阅图4,为本发明实施例三提供的图片的旋转装置的模块示意图;为了便于说明,仅示出了与本发明实施例相关的部分。所述图片的旋转装置包括:指令接收模块101、生成模块102、记录模块103、计算模块104、控制模块105。所述图片的旋转装置可以是内置于移动终端中的软件单元、硬件单元或者是软硬件结合的单元。Please refer to FIG. 4 , which is a schematic block diagram of a picture rotation apparatus provided in Embodiment 3 of the present invention; for convenience of description, only parts related to the embodiment of the present invention are shown. The picture rotation device includes: an instruction receiving module 101 , a generating module 102 , a recording module 103 , a computing module 104 , and a control module 105 . The picture rotation device may be a software unit, a hardware unit or a unit combining software and hardware built in the mobile terminal.

指令接收模块101,用于在图片显示界面,接收用户按压屏幕的按压指令;The instruction receiving module 101 is used for receiving the pressing instruction of the user pressing the screen on the picture display interface;

生成模块102,用于根据所述按压指令,生成触摸条;a generating module 102, configured to generate a touch bar according to the pressing instruction;

记录模块103,用于记录所述触摸条的运动轨迹;a recording module 103, used to record the movement track of the touch bar;

计算模块104,用于根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;a calculation module 104, configured to calculate the rotation direction and rotation angle of the touch bar according to the motion trajectory;

控制模块105,用于根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。The control module 105 is configured to control the picture to rotate in the corresponding direction and angle according to the rotation direction and rotation angle of the touch bar.

在本发明实施例中,所述记录模块103包括:头部记录模块1031、以及尾部记录模块1032;In this embodiment of the present invention, the recording module 103 includes: a header recording module 1031 and a tail recording module 1032;

所述头部记录模块1031,用于记录所述触摸条的头部运动轨迹;The head recording module 1031 is used to record the head movement track of the touch bar;

所述尾部记录模块1032,用于记录所述触摸条的尾部运动轨迹;The tail recording module 1032 is used to record the tail movement track of the touch bar;

所述计算模块104,具体用于根据所述头部运动轨迹和尾部运动轨迹,计算出所述触摸条的旋转方向及旋转角度。The calculation module 104 is specifically configured to calculate the rotation direction and rotation angle of the touch bar according to the head movement track and the tail movement track.

由上可知,本实施例三提供的图片的旋转装置,通过在图片显示界面,接收用户按压屏幕的按压指令;根据所述按压指令,生成触摸条;记录所述触摸条的运动轨迹;根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。本发明单只手指便能实现图片的旋转操作,相对于现有技术的双手指操作,显得更加的简单以及便捷,方便用户操作,从而大大提升了用户的友好体验。It can be seen from the above that the picture rotation device provided in the third embodiment receives a pressing instruction from the user to press the screen on the picture display interface; generates a touch bar according to the pressing instruction; records the motion track of the touch bar; The rotation direction and rotation angle of the touch bar are calculated from the motion track; according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle. Compared with the two-finger operation in the prior art, the present invention can realize the rotation operation of the picture with a single finger, which is simpler and more convenient for the user to operate, thereby greatly improving the user-friendly experience.

实施例四Embodiment 4

请参阅图5,为本发明实施例四提供的图片的旋转装置的模块示意图;为了便于说明,仅示出了与本发明实施例相关的部分。所述图片的旋转装置包括:指令接收模块201、生成模块202、头部记录模块203、尾部记录模块204、头部计算模块205、尾部计算模块206、角度计算模块207、方向计算模块208、控制模块209。所述图片的旋转装置可以是内置于移动终端中的软件单元、硬件单元或者是软硬件结合的单元。Please refer to FIG. 5 , which is a schematic block diagram of a picture rotating apparatus according to Embodiment 4 of the present invention; for convenience of description, only parts related to the embodiment of the present invention are shown. The picture rotation device includes: an instruction receiving module 201, a generating module 202, a head recording module 203, a tail recording module 204, a head calculation module 205, a tail calculation module 206, an angle calculation module 207, a direction calculation module 208, a control Module 209. The picture rotation device may be a software unit, a hardware unit or a unit combining software and hardware built in the mobile terminal.

指令接收模块201,用于在图片显示界面,接收用户按压屏幕的按压指令;The instruction receiving module 201 is used for receiving the pressing instruction of the user pressing the screen on the picture display interface;

生成模块202,用于根据所述按压指令,生成触摸条;a generating module 202, configured to generate a touch bar according to the pressing instruction;

头部记录模块203,用于记录所述触摸条的头部运动轨迹;a head recording module 203, configured to record the head movement track of the touch bar;

尾部记录模块204,用于记录所述触摸条的尾部运动轨迹;The tail recording module 204 is used to record the tail movement track of the touch bar;

头部计算模块205,用于根据所述头部运动轨迹,计算出所述触摸条的头部的旋转方向及旋转角度;a head calculation module 205, configured to calculate the rotation direction and rotation angle of the head of the touch bar according to the head movement track;

尾部计算模块206,用于根据所述尾部运动轨迹,计算出所述触摸条的尾部的旋转方向及旋转角度;A tail calculation module 206, configured to calculate the rotation direction and rotation angle of the tail of the touch bar according to the movement trajectory of the tail;

角度计算模块207,用于计算所述触摸条头部和尾部旋转角度的平均值,其中,所述平均值为所述触摸条的旋转角度;an angle calculation module 207, configured to calculate the average value of the rotation angles of the head and the tail of the touch bar, wherein the average value is the rotation angle of the touch bar;

方向计算模块208,用于根据所述触摸条的头部和尾部的旋转方向,计算出所述触摸条的旋转方向。The direction calculation module 208 is configured to calculate the rotation direction of the touch bar according to the rotation directions of the head and the tail of the touch bar.

控制模块209,用于根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。The control module 209 is configured to control the picture to rotate in the corresponding direction and angle according to the rotation direction and rotation angle of the touch bar.

作为本发明一实施例,所述图片的旋转装置还包括:As an embodiment of the present invention, the picture rotation device further includes:

头部第一判断模块,用于判断所述触摸条的头部运动轨迹是否从左端滑动到右端;a head first judging module, configured to judge whether the head movement track of the touch bar slides from the left end to the right end;

尾部第一判断模块,用于判断所述触摸条的尾部运动轨迹是否从右端滑动到左端;A first judgment module at the tail, used for judging whether the movement track of the tail of the touch bar slides from the right end to the left end;

顺时针确定模块,用于如果判断出头部运动轨迹从左端滑动到右端,且尾部运动轨迹从右端滑动到左端,则判定出所述触摸条的旋转方向为顺时针旋转。The clockwise determination module is used to determine that the rotation direction of the touch bar is clockwise if it is determined that the head movement track slides from the left end to the right end and the tail movement track slides from the right end to the left end.

作为本发明另一实施例,所述图片的旋转装置还包括:As another embodiment of the present invention, the device for rotating the picture further includes:

头部第二判断模块,用于判断所述触摸条的头部运动轨迹是否从右端滑动到左端;a second head judgment module, configured to judge whether the head movement track of the touch bar slides from the right end to the left end;

尾部第二判断模块,用于判断所述触摸条的尾部运动轨迹是否从左端滑动到右端;a second judging module at the tail, used to judge whether the movement track of the tail of the touch bar slides from the left end to the right end;

逆时针确定模块,用于如果判断出头部运动轨迹从右端滑动到左端,且尾部运动轨迹从左端滑动到右端,则判定出所述触摸条的旋转方向为逆时针旋转The counterclockwise determination module is used to determine that the rotation direction of the touch bar is counterclockwise if it is determined that the head movement track slides from the right end to the left end, and the tail movement track slides from the left end to the right end

由上可知,本实施例四提供的图片的旋转装置,通过在图片显示界面,接收用户按压屏幕的按压指令;根据所述按压指令,生成触摸条;记录所述触摸条的运动轨迹;根据所述运动轨迹计算出所述触摸条的旋转方向及旋转角度;根据所述触摸条的旋转方向及旋转角度,控制所述图片进行相应方向及角度的旋转。本发明单只手指便能实现图片的旋转操作,相对于现有技术的双手指操作,显得更加的简单以及便捷,方便用户操作,从而大大提升了用户的友好体验。It can be seen from the above that the picture rotation device provided in the fourth embodiment receives a pressing instruction from the user to press the screen on the picture display interface; generates a touch bar according to the pressing instruction; records the motion track of the touch bar; The rotation direction and rotation angle of the touch bar are calculated from the motion track; according to the rotation direction and rotation angle of the touch bar, the picture is controlled to rotate in the corresponding direction and angle. Compared with the two-finger operation in the prior art, the present invention can realize the rotation operation of the picture with a single finger, which is simpler and more convenient for the user to operate, thereby greatly improving the user-friendly experience.

本发明实施例提供的图片的旋转方法及装置属于同一构思,其具体实现过程详见说明书全文,此处不再赘述。The method and device for rotating a picture provided by the embodiments of the present invention belong to the same concept, and the specific implementation process thereof is described in the full text of the specification, and details are not repeated here.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In summary, although the present invention has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present invention. Those of ordinary skill in the art can make various Therefore, the protection scope of the present invention is subject to the scope defined by the claims.

Claims (3)

1. A picture rotation method is characterized by comprising the following steps:
receiving a pressing instruction of pressing a screen by one hand of a user on a picture display interface;
generating a touch bar according to the pressing instruction; the touch bar is non-circular and long;
recording a motion track of a user for operating the touch strip by one hand, wherein the motion track is the motion track of the touch strip; the method comprises the following steps: recording the head motion track of the touch strip; recording the tail motion track of the touch strip;
calculating the rotation direction and the rotation angle of the touch bar according to the motion track; the method comprises the following steps: calculating the rotation direction and the rotation angle of the head of the touch bar according to the head motion track; calculating the rotation direction and the rotation angle of the tail part of the touch strip according to the tail part motion track; calculating an average value of the rotation angles of the head and the tail of the touch strip, wherein the average value is the rotation angle of the touch strip; calculating the rotation direction of the touch strip according to the rotation directions of the head and the tail of the touch strip;
controlling the picture to rotate in a corresponding direction and angle according to the rotating direction and the rotating angle of the touch bar;
the step of calculating the rotation direction of the touch bar according to the rotation directions of the head and the tail of the touch bar specifically includes: judging whether the head motion track of the touch strip slides from the left end to the right end; judging whether the tail motion track of the touch strip slides from the right end to the left end or not; if the head movement track slides from the left end to the right end and the tail movement track slides from the right end to the left end, the rotation direction of the touch bar is determined to be clockwise rotation; or,
the step of calculating the rotation direction of the touch bar according to the rotation directions of the head and the tail of the touch bar specifically includes: judging whether the head motion track of the touch strip slides from the right end to the left end or not; judging whether the tail motion track of the touch strip slides from the left end to the right end or not; and if the head motion track slides from the right end to the left end and the tail motion track slides from the left end to the right end, determining that the rotation direction of the touch bar rotates anticlockwise.
2. A picture rotating device is characterized by comprising the following steps:
the instruction receiving module is used for receiving a pressing instruction of pressing the screen by one hand of a user on the picture display interface;
the generating module is used for generating a touch bar according to the pressing instruction; the touch bar is non-circular and long;
the recording module is used for recording the motion track of the touch strip operated by a single hand of a user, and the motion track is the motion track of the touch strip;
the calculation module is used for calculating the rotation direction and the rotation angle of the touch bar according to the motion track;
the control module is used for controlling the picture to rotate in the corresponding direction and angle according to the rotating direction and the rotating angle of the touch bar;
wherein the recording module comprises: a head recording module and a tail recording module;
the head recording module is used for recording the head motion track of the touch strip;
the tail recording module is used for recording the tail motion track of the touch strip;
the calculation module comprises:
the head calculating module is used for calculating the rotating direction and the rotating angle of the head of the touch bar according to the head motion track;
the tail calculation module is used for calculating the rotation direction and the rotation angle of the tail of the touch strip according to the tail motion track;
the angle calculation module is used for calculating the average value of the rotation angles of the head and the tail of the touch strip, wherein the average value is the rotation angle of the touch strip;
the direction calculation module is used for calculating the rotation direction of the touch strip according to the rotation directions of the head and the tail of the touch strip;
the picture rotating device further comprises:
the first head part judging module is used for judging whether the head part motion track of the touch strip slides from the left end to the right end or not;
the first tail judgment module is used for judging whether the tail motion track of the touch strip slides from the right end to the left end or not;
the clockwise determination module is used for determining that the rotation direction of the touch bar is clockwise rotation if the head movement track slides from the left end to the right end and the tail movement track slides from the right end to the left end; or,
the picture rotating device further comprises:
the second head part judging module is used for judging whether the head part motion track of the touch strip slides from the right end to the left end or not;
the second tail judgment module is used for judging whether the tail motion track of the touch strip slides from the left end to the right end;
and the anticlockwise determining module is used for determining that the rotation direction of the touch bar is anticlockwise rotation if the head motion track is judged to slide from the right end to the left end and the tail motion track is judged to slide from the left end to the right end.
3. A storage medium storing a computer program, wherein the computer program causes a computer to perform the method of claim 1.
CN201610076779.4A 2016-02-03 2016-02-03 Method and device for rotating a picture Expired - Fee Related CN105549852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610076779.4A CN105549852B (en) 2016-02-03 2016-02-03 Method and device for rotating a picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610076779.4A CN105549852B (en) 2016-02-03 2016-02-03 Method and device for rotating a picture

Publications (2)

Publication Number Publication Date
CN105549852A CN105549852A (en) 2016-05-04
CN105549852B true CN105549852B (en) 2019-09-13

Family

ID=55829063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610076779.4A Expired - Fee Related CN105549852B (en) 2016-02-03 2016-02-03 Method and device for rotating a picture

Country Status (1)

Country Link
CN (1) CN105549852B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392843B (en) * 2017-07-21 2021-05-07 上海联影医疗科技股份有限公司 Image processing method, device and system
CN108089805A (en) * 2017-12-28 2018-05-29 努比亚技术有限公司 A kind of picture operation method, mobile terminal and computer readable storage medium
CN108635841B (en) * 2018-03-27 2021-08-10 网易(杭州)网络有限公司 Method and device for controlling carrier in racing game

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182147A (en) * 2014-08-29 2014-12-03 乐视网信息技术(北京)股份有限公司 Volume adjusting method and device
CN104317491A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Display content control method and device and mobile terminal
CN104360811A (en) * 2014-10-22 2015-02-18 河海大学 Single-figure hand gesture recognition method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566807A (en) * 2010-12-23 2012-07-11 联咏科技股份有限公司 Single-finger rotation gesture detection method and gesture detection circuit
CN102622158B (en) * 2011-01-28 2015-07-29 联想(北京)有限公司 Method of controlling rotation and electronic equipment
CN103092492B (en) * 2011-10-27 2016-05-04 腾讯科技(深圳)有限公司 Picture rotation method and system
CN103207756A (en) * 2012-01-13 2013-07-17 瑞轩科技股份有限公司 Touch control method
WO2014168431A1 (en) * 2013-04-10 2014-10-16 주식회사 지니틱스 Method for processing touch event and apparatus for same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182147A (en) * 2014-08-29 2014-12-03 乐视网信息技术(北京)股份有限公司 Volume adjusting method and device
CN104317491A (en) * 2014-09-30 2015-01-28 北京金山安全软件有限公司 Display content control method and device and mobile terminal
CN104360811A (en) * 2014-10-22 2015-02-18 河海大学 Single-figure hand gesture recognition method

Also Published As

Publication number Publication date
CN105549852A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN102741799B (en) Touch screen operation method and terminal
US9612675B2 (en) Emulating pressure sensitivity on multi-touch devices
WO2017185575A1 (en) Touch screen track recognition method and apparatus
US20130263013A1 (en) Touch-Based Method and Apparatus for Sending Information
US20150186004A1 (en) Multimode gesture processing
CN105573639A (en) Triggered application display method and system
WO2015131675A1 (en) Compensation method for broken slide paths, electronic device and computer storage medium
US9304612B2 (en) Off-screen input capture for mobile device
WO2013189224A1 (en) Cursor display position determination method and device
WO2014116166A1 (en) Scalable input from tracked object
JP2012530958A (en) Gesture on a touch sensitive input device to close a window or application
WO2017202287A1 (en) Page swiping method and device
US9600094B2 (en) Apparatus, method, and program product for directing motion of a writing device
CN105549852B (en) Method and device for rotating a picture
CN104571589B (en) A kind of data processing method and device based on input method
US20160070467A1 (en) Electronic device and method for displaying virtual keyboard
WO2015131590A1 (en) Method for controlling blank screen gesture processing and terminal
WO2015169017A1 (en) Method and apparatus for realizing human-machine interaction
CN105446641A (en) Method, system and mobile terminal for operating touch screen icons with one hand
WO2018218392A1 (en) Touch operation processing method and touch keyboard
WO2019037352A1 (en) Writing alignment and display method, electronic apparatus, and readable storage medium
AU2014364294B2 (en) Binding of an apparatus to a computing device
CN106412427A (en) Shooting method and mobile terminal
WO2018157655A1 (en) Method and device for redefining control display area of screen
CN105117120A (en) Crown of intelligent watch and operation method for intelligent watch

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190913

CF01 Termination of patent right due to non-payment of annual fee