Picture processing method and apparatus for instant communication tool
First Claim
1. A method for processing a picture for an instant messenger, wherein the method comprises the following steps of:
- obtaining related information of an edit area captured by the instant messenger, wherein the related information comprises at least an abscissa range and an ordinate range;
obtaining and recording position information including at least coordinates of a start cursor in real time after a start notification is received and before an end notification is received;
obtaining position information of a current cursor in real time before the end notification is received;
generating a line segment according to position information of current cursor, the recorded position information of a previous cursor and the related information of the edit area; and
updating the recorded position information into the position information of the current cursor,wherein the step of generating the line segment comprises the steps of;
determining a position relationship between the start cursor and the edit area according to coordinates of the start cursor and the related information;
determining a position relationship between the current cursor and the edit area according to coordinates of the current cursor and the related information;
if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that both the current cursor and the recorded cursor are within the edit area, then generating a line segment between the recorded cursor and the current cursor;
if the position relationship between the current cursor and the edit area is different from the position relationship between the recorded cursor and the edit area, then deciding a linear equation of each of the boundaries comprised in the edit area according to the related information;
obtaining an intersection point between the line segment formed by the recorded cursor and the current cursor and each of the boundaries of the edit area according to the coordinates of the current cursor, the coordinates of the recorded cursor and the linear equation of each of the boundaries;
if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is outside the edit area and that the recorded cursor is within the edit area respectively, then generating a line segment between the intersection point and the recorded cursor; and
if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is within the edit area and that the recorded cursor is outside the edit area respectively, then generating a line segment between the intersection point and the current cursor.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and an apparatus for processing a picture of an instant messenger are disclosed, which belong to the field of computers comprising: obtaining related information of an edit region, wherein the related information comprises at least a horizontal coordinate range and a vertical coordinate range; obtaining and recording position information of an initial cursor when a start notice is received, wherein the position information comprises at least coordinates; and obtaining position information of a current cursor in real time, generating a line segment according to the position information of the current cursor, the recorded position information and the related information, and updating the recorded position information into the position information of the current cursor. The apparatus comprises a first obtaining module, a second obtaining module and a generation module. The present disclosure can draw a line according to the movement path of the cursor.
-
Citations
15 Claims
-
1. A method for processing a picture for an instant messenger, wherein the method comprises the following steps of:
-
obtaining related information of an edit area captured by the instant messenger, wherein the related information comprises at least an abscissa range and an ordinate range; obtaining and recording position information including at least coordinates of a start cursor in real time after a start notification is received and before an end notification is received; obtaining position information of a current cursor in real time before the end notification is received; generating a line segment according to position information of current cursor, the recorded position information of a previous cursor and the related information of the edit area; and updating the recorded position information into the position information of the current cursor, wherein the step of generating the line segment comprises the steps of; determining a position relationship between the start cursor and the edit area according to coordinates of the start cursor and the related information; determining a position relationship between the current cursor and the edit area according to coordinates of the current cursor and the related information; if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that both the current cursor and the recorded cursor are within the edit area, then generating a line segment between the recorded cursor and the current cursor; if the position relationship between the current cursor and the edit area is different from the position relationship between the recorded cursor and the edit area, then deciding a linear equation of each of the boundaries comprised in the edit area according to the related information; obtaining an intersection point between the line segment formed by the recorded cursor and the current cursor and each of the boundaries of the edit area according to the coordinates of the current cursor, the coordinates of the recorded cursor and the linear equation of each of the boundaries; if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is outside the edit area and that the recorded cursor is within the edit area respectively, then generating a line segment between the intersection point and the recorded cursor; and if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is within the edit area and that the recorded cursor is outside the edit area respectively, then generating a line segment between the intersection point and the current cursor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An apparatus for processing a picture for an instant messenger, comprising:
-
a display on which a cursor is displayed under control of a computing device, said computing device executing the following modules; a first obtaining module, configured to obtain related information of an edit area, wherein the related information comprises at least an abscissa range and an ordinate range; a second obtaining module, configured to obtain and record position information including at least coordinates of a start cursor in real time after a start notification is received and before an end notification is received; and a generation module, configured to generate a line segment for display on the display according to position information of a current cursor and the recorded position information of a previous cursor that are obtained by the second obtaining module and the related information of the edit area obtained by the first obtaining module, wherein the generation module comprises; a first determination unit, configured to determine a position relationship between the start cursor and the edit area according to coordinates of the start cursor and the related information; a second determination unit, configured to determine a position relationship between the current cursor and the edit area according to coordinates of the current cursor and the related information; a first generation unit, configured to generate a line segment between the recorded cursor and the current cursor when the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that both the current cursor and the recorded cursor are within the edit area; a first deciding unit, configured to decide a linear equation of each of the boundaries comprised in the edit area according to the related information when the position relationship between the current cursor and the edit area is different from the position relationship between the recorded cursor and the edit area; a third obtaining unit, configured to obtain an intersection point between the line segment formed by the recorded cursor and the current cursor and each of the boundaries of the edit area according to the coordinates of the current cursor, the coordinates of the recorded cursor and the linear equation of each of the boundaries; a second generation unit, configured to generate a line segment between the intersection point and the recorded cursor if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is outside the edit area and that the recorded cursor is within the edit area respectively; a third generation unit, configured to generate a line segment between the intersection point and the current cursor if the position relationship between the current cursor and the edit area and the position relationship between the recorded cursor and the edit area reveal that the current cursor is within the edit area and that the recorded cursor is outside the edit area respectively; and a first updating unit, configured to update the recorded position information into the position information of the current cursor. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
Specification