WO2020133386A1 - Note partial selection method, apparatus, electronic terminal and readable storage medium - Google Patents

Note partial selection method, apparatus, electronic terminal and readable storage medium Download PDF

Info

Publication number
WO2020133386A1
WO2020133386A1 PCT/CN2018/125454 CN2018125454W WO2020133386A1 WO 2020133386 A1 WO2020133386 A1 WO 2020133386A1 CN 2018125454 W CN2018125454 W CN 2018125454W WO 2020133386 A1 WO2020133386 A1 WO 2020133386A1
Authority
WO
WIPO (PCT)
Prior art keywords
note
coordinate point
closed
track
trajectory
Prior art date
Application number
PCT/CN2018/125454
Other languages
French (fr)
Chinese (zh)
Inventor
张政
李友
牛佳明
Original Assignee
深圳市柔宇科技有限公司
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 深圳市柔宇科技有限公司 filed Critical 深圳市柔宇科技有限公司
Priority to PCT/CN2018/125454 priority Critical patent/WO2020133386A1/en
Priority to CN201880095887.3A priority patent/CN112639713A/en
Publication of WO2020133386A1 publication Critical patent/WO2020133386A1/en

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/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

Definitions

  • the present invention relates to the field of note editing in electronic equipment, and more specifically, to a method, device, electronic terminal, and readable storage medium for partial note selection.
  • the user draws a picture in the APP, and when the user wants to characterize and modify a specific area of the picture, such as implementing a gradient operation on the color of the specific area, etc. Can carry out the secondary editing operation of all areas. Therefore, due to the inability of the existing method to partially edit the notes in a specific area, the user experience is greatly reduced.
  • the technical problem to be solved is to provide a method, device, electronic terminal, and readable storage medium for local selection of notes in view of the above-mentioned defects of the prior art.
  • the technical solution adopted to solve the technical problem is to provide a partial note selection method, which is applied to a display terminal, and the note is displayed on the display terminal.
  • the method includes:
  • the note information includes coordinate data of all pixels in the note
  • the acquiring the closed track of the touch track includes:
  • the first coordinate point is the coordinate point obtained at the first moment
  • the second coordinate point is the coordinate point obtained at the second moment
  • the second moment is greater than the first moment
  • traversing all the pixels in the note, and selecting all the pixel sets surrounded by the closed track include:
  • the pixel is located in the smallest rectangular area where the closed trajectory is located, form a ray using the pixel as the origin, and obtain the number of intersections of the ray and the closed trajectory;
  • the judging whether any one of all pixels is located in the smallest rectangular area where the closed trajectory is located includes:
  • the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
  • the method further includes:
  • the editing includes changing color, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing.
  • a partial note selection device is also provided, which is applied to a display terminal.
  • the note is displayed on the display terminal.
  • the device includes:
  • a note acquiring unit configured to acquire note information, the note information including coordinate data of all pixels in the note;
  • a touch display unit configured to detect the touch action and display the touch track of the touch action according to the touch action
  • a trajectory acquiring unit configured to acquire a closed trajectory of the touch trajectory
  • the selecting unit is used to traverse all pixels in the note, and select all sets of pixels surrounded by the closed trajectory.
  • the set of pixels is the selected part of the note.
  • trajectory acquisition unit includes:
  • a coordinate point obtaining module configured to obtain a set of coordinate points sorted in time according to the touch action according to the touch action;
  • the first judgment module is used to:
  • the first coordinate point is the coordinate point obtained at the first moment
  • the second coordinate point is the coordinate point obtained at the second moment
  • the second moment is greater than the first moment
  • the selection unit includes:
  • the second judgment module is used for judging whether any one of all pixels is located in the smallest rectangular area where the closed track is located;
  • a selection module for forming a ray with the pixel point as the origin when the pixel point is within the smallest rectangular area where the closed trajectory is located, and obtaining the number of intersection points of the ray and the closed trajectory, and determining the Whether the number of rays and the closed intersection is an odd number; if so, select the pixel.
  • the second judgment module is specifically used to:
  • the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
  • an editing unit for partially editing the note includes changing color, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing Or vertical and horizontal proportions to expand or contract.
  • an electronic terminal including a processor and a memory, where the processor is used to implement the steps of the note partial selection method described above when executing the computer program stored in the memory.
  • a readable storage medium is also provided on which a computer program is stored, which when executed by the processor implements the steps of the note partial selection method as described above.
  • the local selection method of notes adopts a closed trajectory drawn arbitrarily by the user to realize the arbitrary selection of the local parts of the notes, which can realize the secondary editing of the local parts of the notes, which solves the problem that the existing local parts cannot be selected and edited.
  • the method is simple 3. Less calculation and lower complexity, while improving the user experience, it can also effectively reduce the performance consumption of the terminal.
  • FIG. 1 is a schematic flowchart of a partial note selection method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a partial note selection method provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a touch trajectory in a partial note selection method provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a closed trajectory in a partial note selection method provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of any pixel of a note in a closed track provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of performing a second edit on a part of a note by a method for selecting a partial note according to an embodiment of the present invention
  • FIG. 7 is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention.
  • FIG. 8 is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • an embodiment of the present invention provides a partial note selection method, which can implement partial selection of notes on the terminal screen and partial selection of selected notes
  • the secondary editing operation simplifies the secondary editing operation method and improves the efficiency and accuracy of the secondary editing operation, which can effectively avoid misoperations outside the local area and improve the user experience.
  • the local note selection method can be applied to a display terminal, where the display area of the display terminal can be used to display notes.
  • the display terminal includes but is not limited to a smart phone, smart watch, tablet computer, etc.
  • the operating system of the display terminal includes but is not limited to Android operating system, iOS operating system, Windows operating system, Linux operating system, etc.
  • the partial note selection method provided by the embodiment of the present invention may include the following steps:
  • Step S1 Obtain note information.
  • the note can be obtained by reading the note stored in the storage device, or generated by the user editing, can also receive the note through the network, or can also receive the note through short-range wireless transmission, or can be wired Receive notes, etc. by means of transmission.
  • the embodiments of the present invention may obtain notes in various ways.
  • the note in the embodiment of the present invention includes Chinese characters, wherein the part of the note may be one or more strokes of the Chinese character, or a part of one or more strokes.
  • the notes of the embodiments of the present invention further include drawings, where the notes partially include a part of the drawings.
  • the picture can be any picture.
  • notes in the embodiment of the present invention may also be English letters, lines, etc., and the note parts are part or parts of the English letters, or the note parts are part of the lines, etc.
  • the embodiments of the present invention provide users with various forms, and are not limited to the methods described herein.
  • the note partial selection method may receive a user-initiated instruction to start a note partial selection operation through a display terminal.
  • the user-selected operation instruction for starting the partial selection of the note may include, but is not limited to, an action instruction input by the user (such as an instruction generated by a touch operation or an instruction generated by a key operation) or a voice instruction.
  • the action instruction input by the user may be double-click, click, drag, swipe, long press, etc., or a combination of several.
  • the note information includes coordinate data of all pixels in the note.
  • Step S2 Detect the touch action and display the touch track of the touch action according to the touch action.
  • the detection of the touch action can be completed by the display terminal.
  • the touch action is a touch action applied by the user on the touch panel of the display terminal.
  • the user can directly touch the touchpad with a limb (such as a finger) to generate a touch action, or write on the touchpad with a stylus to generate a touch action.
  • the touch track obtained by the touch panel can be displayed in real time through the display screen of the display terminal, where the touch panel and the display screen can be an integrated structure or a discrete structure.
  • the touch trajectory generated according to the touch action there are various forms of the touch trajectory generated according to the touch action.
  • the user can apply different operations on the touch panel to draw the touch trajectory, Feature adjustment, etc.
  • it is possible to detect whether the touch track has been enlarged or reduced vertically, horizontally or horizontally, or vertically or horizontally, or deleted If you receive instructions to expand or shrink the touch track vertically, horizontally or horizontally, or vertically or horizontally, or delete the touch track, or delete the touch track, you can use
  • the received command performs corresponding modification actions to make the touch track expand or shrink vertically, horizontally expand or shrink, or vertically or horizontally proportionally expand or shrink, or delete part of the touch track, etc., so that it can be based on user needs Obtain different touch trajectories corresponding to requirements.
  • the adjustment of the characteristics of the touch trajectory includes but is not limited to length, width, grayscale, shape, color, transparency, etc.
  • the touch track is shown in FIG. 3.
  • the note displayed on the display terminal 100 in FIG. 3 is a line, and the line includes the first segment 101 and the second segment 102.
  • the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and from coordinate point A2 to coordinate point An (denoted as The third part 203) has three parts.
  • the coordinate point A0, the coordinate point A1, the coordinate point A2, and the coordinate point An are obtained in the chronological order of the touch action.
  • the coordinate point A2 only represents that it is obtained after the coordinate point A1, and does not represent that the coordinate point A2 is The coordinate point generated by the touch action next to the coordinate point A1 at the next moment.
  • n is greater than 0.
  • Step S3 Obtain the closed track of the touch track.
  • the closed track of the touch track can be obtained in the following manner:
  • the first coordinate point is any coordinate point in the set of coordinate points sorted by time. Further, the first coordinate point is a coordinate point acquired at the first moment, the second coordinate point is a coordinate point acquired at the second moment, and the second moment is greater than the first moment. It should be noted that the first moment and the second moment are only used to represent any two moments in the coordinate points in the coordinate point set sorted by time, and do not represent the first moment and the second moment at the start of the touch action .
  • the obtained time-ordered coordinate point set has the same first coordinate point and second coordinate point, it is further determined whether the second coordinate point and the first coordinate point coincide for the first time. Then, the coordinate points acquired between the first time and the second time are selected, wherein the trajectory formed by the coordinate points acquired between the first time and the second time is a closed trajectory.
  • the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and There are three parts from coordinate point A2 to coordinate point An (denoted as the third part 203).
  • the coordinate point A1 is the first coordinate point
  • the coordinate point A2 is the second coordinate point.
  • the first coordinate point A1 and the second coordinate point A2 are the same coordinate point. Therefore, the first coordinate The trajectory (second part 202) formed by the coordinate points between the point A1 and the second coordinate point A2 (including the first coordinate point A1 and the second coordinate point A2) is the closed trajectory to be acquired, and the obtained closure The trajectory (second part 202) is shown in Figure 4.
  • the closed trajectory is an irregular graph.
  • the closed trajectory in this embodiment of the present invention may also be a regular graph.
  • the closed track in the embodiment of the present invention is a closed line.
  • the regular figure includes but is not limited to a circle, an ellipse, a square, a rectangle, a diamond, a trapezoid, etc., and may be one or more of them.
  • Step S4 traverse all the pixels in the note, and select all the sets of pixels surrounded by the closed track.
  • the set of pixels is the selected part of the note.
  • 202 in FIG. 4 is the acquired closed trajectory, and the line formed by the first segment 101 and the second segment 102 is the note displayed on the display terminal 100, which is closed in FIG. 4
  • the second section 102 surrounded by the track 202 is the selected part of the note.
  • the coordinate point data of the closed track includes the maximum and minimum values of the horizontal coordinate of the closed track, and the maximum and minimum values of the vertical coordinate; then, determine the horizontal coordinate of any one of all pixels Whether it is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and whether the ordinate of any pixel is greater than the minimum value of the closed track and less than the maximum of the closed track value.
  • the coordinate data of all pixel points of the note and the coordinate point data of the closed track are based on the same coordinate system.
  • M (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the The ordinate of the pixel M; the minimum value of the abscissa of the closed trajectory 202 is x min , the maximum value of the abscissa of the closed trajectory 202 is x max , the minimum value of the ordinate of the closed trajectory 202 is y min , the value of the closed trajectory 202 The maximum value of the ordinate is y max .
  • y max As shown in Figure 4, when the pixel M(x 0 , y 0 ) satisfies:
  • the other pixels in all the pixels in the note can be judged whether they are within the smallest rectangular area where the closed track 202 is located according to the above method.
  • the closed trajectory is rectangular, and the smallest rectangular area where the closed trajectory is located is itself. Therefore, there is no need to perform the step of "determining whether the pixel is within the closed trajectory".
  • the "minimum rectangular area” here means the first straight line parallel to the abscissa passing through the coordinate point with the largest ordinate in the closed trajectory, and the first line parallel to the abscissa passing through the coordinate point with the smallest ordinate in the closed trajectory A straight line, a third straight line parallel to the ordinate passing the coordinate point with the largest abscissa in the closed track, and a fourth straight line parallel to the ordinate passing the coordinate point with the smallest abscissa in the closed track Closed area.
  • determining whether the pixel is within the closed track can be achieved in the following ways:
  • the pixel is used as the origin to form a ray, and the number of intersections of the ray and the closed trajectory is obtained; it is further determined whether the number of intersections of the ray and the closed trajectory is an odd number; if so, the pixel is selected.
  • M(x 0 , y 0 ) is any one of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the longitudinal of the pixel M coordinate.
  • the ray formed with the pixel point M(x 0 , y 0 ) as the origin is MN, as can be seen from FIG. 5, only when the intersection point of MN and the closed track 203 is an odd number, the pixel point M(x 0 , y 0 ) within the closed trajectory 203.
  • the pixel point M(x 0 , y 0 ) satisfies the number of intersections of rays and the closed trajectory 203 formed with the origin as an odd number, the pixel point M(x 0 , y 0 ) can be determined, The pixel M (x 0 , y 0 ) can be selected.
  • all the pixels in the note can be determined whether they are in the closed trajectory in the above manner, so as to select the pixel set in the closed trajectory according to the determination result, so as to obtain the selected note part.
  • the embodiment of the present invention traverses all the pixels in the note to select all the pixel points surrounded by the closed trajectory to obtain the part of the note that needs to be selected, which satisfies the user's need to select the note locally and improves the user experience.
  • the partial note selection method in the embodiment of the present invention is simple and requires less calculation. While improving the user experience, it can also reduce the performance consumption of the display terminal.
  • FIG. 2 it is a schematic flowchart of a partial note selection method provided by an embodiment of the present invention.
  • the local note selection method of this embodiment further includes the following steps:
  • Step S5 Edit the notes locally.
  • step S5 is executed after the completion of step S4, that is, after the note part is determined, the editing operation of the note part is executed.
  • editing includes, but is not limited to, changing colors, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing, Or move. That is, it can realize the operation of changing the color of the selected note part, merging the note part, splitting the note part, deleting the note part, adding the note part, modifying the width of the note part, and modifying the note part Length, expand the note part vertically, shrink the note part vertically, expand the note part horizontally, shrink the note part horizontally, or enlarge the note part vertically or horizontally, or shrink the note part vertically, or move the note part, etc.
  • editing the note part includes receiving and executing a color setting instruction, note information merging instruction, note information splitting instruction, note information deleting instruction, adding note instruction, modifying note width instruction, and modifying note length instruction for the note portion , At least one of zoom instruction and move instruction.
  • 202 is a closed track
  • the user can input an instruction to modify the width of the part of the note enclosed in the closed track 202 as needed, such as an instruction to increase the width of the part of the note, to display the terminal 100 performs an increase action according to the received instruction to increase the width of the local part of the note, so that the width of the second segment 102 enclosed in the closed track 202 becomes thicker; or, the user can input to change the The instruction of the color of the note part, the display terminal 100 executes a modification action according to the received instruction to change the color of the note part enclosed in the closed track 202, and changes the color of the second segment 102 enclosed in the closed track 202 to the set s color.
  • the length, transparency, etc. of the second segment 102 enclosed in the closed track 202 may be modified according to the modification needs.
  • the problem that the existing local area cannot be selected and the local area is edited twice is solved, and the method for local selection of notes in the present invention is simple, which greatly reduces the amount of calculation, reduces the complexity of searching, and reduces the performance consumption of the terminal. At the same time, it can effectively improve the user experience.
  • an embodiment of the present invention further provides a local note selection device, which can be used to implement the foregoing local note selection method.
  • the note partial selection device can be applied to a display terminal, and the note of the note partial selection device is displayed on the display terminal.
  • the display terminal includes but is not limited to a smart phone, smart watch, tablet computer, etc.
  • the operating system of the display terminal includes but is not limited to Android operating system, iOS operating system, Windows operating system, Linux operating system, etc.
  • the device for partial selection of notes provided by an embodiment of the present invention may include:
  • the note acquiring unit 701 is used to acquire note information, and the note information includes coordinate data of all pixels in the note.
  • the note can be obtained by reading the note stored in the storage device, or generated by the user editing, can also receive the note through the network, or can also receive the note through short-range wireless transmission, or can be wired Receive notes, etc. by means of transmission.
  • the embodiments of the present invention may obtain notes in various ways.
  • the note in the embodiment of the present invention includes Chinese characters, wherein the part of the note may be one or more strokes of the Chinese character, or a part of one or more strokes.
  • the notes of the embodiments of the present invention further include drawings, where the notes partially include a part of the drawings.
  • the picture can be any picture.
  • notes in the embodiment of the present invention may also be English letters, lines, etc., and the note parts are part or parts of the English letters, or the note parts are part of the lines, etc.
  • the embodiments of the present invention provide users with various forms, and are not limited to the methods described herein.
  • the note partial selection method may receive a user-initiated instruction to start a note partial selection operation through a display terminal.
  • the user-selected operation instruction for starting the partial selection of the note may include, but is not limited to, an action instruction input by the user (such as an instruction generated by a touch operation or an instruction generated by a key operation) or a voice instruction.
  • the action instruction input by the user may be double-click, click, drag, swipe, long press, etc., or a combination of several.
  • the note information includes coordinate data of all pixels in the note.
  • the touch display unit 702 is used to detect the touch action and display the touch track of the touch action according to the touch action.
  • the touch display unit 702 may include a touch pad and a display screen.
  • the touch pad is used to detect a touch action and generate a touch track according to the touch action.
  • the generated touch track is displayed on the display screen. .
  • the touch action is a touch action applied by the user on the touch panel of the display terminal.
  • the user can directly touch the touchpad with a limb (such as a finger) to generate a touch action, or write on the touchpad with a stylus to generate a touch action.
  • the touch track obtained by the touch panel can be displayed in real time through the display screen of the display terminal, where the touch panel and the display screen can be an integrated structure or a discrete structure.
  • the touch trajectory generated according to the touch action there are various forms of the touch trajectory generated according to the touch action.
  • the user can apply different operations on the touch panel to draw the touch trajectory, Feature adjustment, etc.
  • it is possible to detect whether the touch track has been enlarged or reduced vertically, horizontally or horizontally, or vertically or horizontally, or deleted Partial trajectory of the track, or moving the touch trajectory, etc. if you receive instructions to expand or contract the touch trajectory vertically, horizontally or horizontally, or vertically or horizontally, or delete the part of the touch trajectory, you can The received command performs corresponding modification actions to make the touch track expand or shrink vertically, horizontally expand or shrink, or vertically or horizontally proportionally expand or shrink, or delete part of the touch track, etc., so that it can be based on user needs Obtain different touch trajectories corresponding to requirements.
  • the adjustment of the characteristics of the touch trajectory includes but is not limited to length, width, grayscale, shape, color, transparency, etc.
  • the touch track is shown in FIG. 3.
  • the note displayed on the display terminal 100 in FIG. 3 is a line, and the line includes the first segment 101 and the second segment 102.
  • the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and from coordinate point A2 to coordinate point An (denoted as The third part 203) has three parts.
  • the coordinate point A0, the coordinate point A1, the coordinate point A2, and the coordinate point An are obtained in the chronological order of the touch action.
  • the coordinate point A2 only represents that it is obtained after the coordinate point A1, and does not represent that the coordinate point A2 is The coordinate point generated by the touch action next to the coordinate point A1 at the next moment.
  • n is greater than 0.
  • the track obtaining unit 703 is used to obtain a closed track of the touch track.
  • the track acquisition unit 703 includes: a coordinate point acquisition module and a first judgment module.
  • the coordinate point obtaining module is used to obtain a set of coordinate points sorted by time according to the touch action.
  • the first judgment module is used to judge whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the second coordinate point obtained at the second moment The coordinate point, the second moment is greater than the first moment. If yes, it is determined whether the first coordinate point and the second coordinate point coincide for the first time. If so, the coordinate points obtained between the first time and the second time are selected; the coordinate points obtained between the first time and the second time are selected.
  • the formed track is a closed track.
  • the first coordinate point is any coordinate point in the set of coordinate points sorted by time.
  • first moment and the second moment are only used to represent any two moments in the coordinate points in the coordinate point set sorted by time, and do not represent the first moment and the second moment at the start of the touch action .
  • the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and There are three parts from coordinate point A2 to coordinate point An (denoted as the third part 203).
  • the coordinate point A1 is the first coordinate point
  • the coordinate point A2 is the second coordinate point.
  • the first coordinate point A1 and the second coordinate point A2 are the same coordinate point. Therefore, the first coordinate The trajectory (second part 202) formed by the coordinate points between the point A1 and the second coordinate point A2 (including the first coordinate point A1 and the second coordinate point A2) is the closed trajectory to be acquired, and the obtained closure The trajectory (second part 202) is shown in Figure 4.
  • the closed trajectory is an irregular graph.
  • the closed trajectory in this embodiment of the present invention may also be a regular graph.
  • the closed track in the embodiment of the present invention is a closed line.
  • the regular figure includes but is not limited to a circle, an ellipse, a square, a rectangle, a diamond, a trapezoid, etc., and may be one or more of them.
  • the selecting unit 704 is used to traverse all the pixels in the note, and select all sets of pixels surrounded by the closed track, and the set of pixels is the selected part of the note.
  • 202 in FIG. 4 is the acquired closed trajectory, and the line formed by the first segment 101 and the second segment 102 is the note displayed on the display terminal 100, which is closed in FIG. 4
  • the second section 102 surrounded by the track 202 is the selected part of the note.
  • the optional selection unit 704 includes: a second judgment module and a selection module.
  • the second judgment module is used to judge whether any one of all pixels is located in the smallest rectangular area where the closed track is located.
  • determining whether any pixel of all pixels in the note is located in the smallest rectangular area where the closed track is located can be determined by the second determining module in the following manner.
  • the coordinate point data of the closed track is obtained; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate. Then, determine whether the abscissa of any pixel in all pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and whether the vertical coordinate of any pixel is greater than that of the closed track The minimum value of the ordinate is smaller than the maximum value of the ordinate of the closed track.
  • the coordinate data of all pixel points of the note and the coordinate point data of the closed track are based on the same coordinate system.
  • M (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the The ordinate of the pixel M; the minimum value of the abscissa of the closed trajectory 202 is x min , the maximum value of the abscissa of the closed trajectory 202 is x max , the minimum value of the ordinate of the closed trajectory 202 is y min , the value of the closed trajectory 202 The maximum value of the ordinate is y max .
  • y max As shown in Figure 4, when the pixel M(x 0 , y 0 ) satisfies:
  • the other pixels in all the pixels in the note can be judged whether they are within the smallest rectangular area where the closed track 202 is located according to the above method.
  • the second determination module is further used to further determine whether the pixel point is within the closed track when the pixel point is within the smallest rectangular area where the closed track is located.
  • the closed trajectory is rectangular, and the smallest rectangular area where the closed trajectory is located is itself. Therefore, there is no need to perform the step of "determining whether the pixel is within the closed trajectory".
  • the "minimum rectangular area” here means the first straight line parallel to the abscissa passing through the coordinate point with the largest ordinate in the closed trajectory, and the first line parallel to the abscissa passing through the coordinate point with the smallest ordinate in the closed trajectory A straight line, a third straight line parallel to the ordinate passing the coordinate point with the largest abscissa in the closed track, and a fourth straight line parallel to the ordinate passing the coordinate point with the smallest abscissa in the closed track Closed area.
  • the selection module is used to form a ray with the pixel as the origin when the pixel is located in the smallest rectangular area where the closed trajectory is located, and obtain the number of intersections of the ray and the closed trajectory, and determine whether the number of rays and the closed intersection is It is an odd number; if it is, the pixel is selected.
  • M(x 0 , y 0 ) is any one of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the longitudinal of the pixel M coordinate.
  • the ray formed with the pixel point M(x 0 , y 0 ) as the origin is MN, as can be seen from FIG. 5, only when the intersection point of MN and the closed track 203 is an odd number, the pixel point M(x 0 , y 0 ) within the closed trajectory 203.
  • the pixel point M(x 0 , y 0 ) satisfies the number of intersections of rays and the closed trajectory 203 formed with the origin as an odd number, the pixel point M(x 0 , y 0 ) can be determined, The pixel M (x 0 , y 0 ) can be selected.
  • all the pixels in the note can be determined whether they are in the closed trajectory in the above manner, so as to select the pixel set in the closed trajectory according to the determination result, so as to obtain the selected note part.
  • FIG. 8 it is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention.
  • This embodiment further includes an editing unit 705 on the basis of the note partial selection device of the foregoing embodiment.
  • the editing unit 705 is used to partially edit the notes, and the editing includes changing the color, merging, splitting, deleting, increasing, modifying the width, modifying the length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or Zoom out.
  • editing includes, but is not limited to, changing colors, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing, Or move. That is, it can realize the operation of changing the color of the selected note part, merging the note part, splitting the note part, deleting the note part, adding the note part, modifying the width of the note part, and modifying the note part Length, expand the note part vertically, shrink the note part vertically, expand the note part horizontally, shrink the note part horizontally, or enlarge the note part vertically or horizontally, or shrink the note part vertically, or move the note part, etc.
  • the editing unit 705 includes: a receiving execution module.
  • the receiving and executing module is used to receive and execute a color setting instruction, a note information merging instruction, a note information splitting instruction, a note information deleting instruction, a note adding instruction, a modify note width instruction, and a note length instruction, At least one of zoom instruction and move instruction.
  • the note acquisition unit 701, the touch display unit 702, the track acquisition unit 703, the selection unit 704, and the editing unit 705 are all provided in the display terminal.
  • FIG. 9 is a schematic structural diagram of an electronic terminal according to an embodiment of the present invention.
  • the electronic terminal is a display terminal 100, and notes can be displayed on the display terminal 100.
  • the electronic terminal shown in FIG. 9 is only an example, and should not bring any limitation to the functions and use scope of the embodiments of the present invention.
  • the electronic terminal includes a processor 901 and a storage device 908.
  • the processor 901 is used to execute the computer program stored in the storage device 908, the steps of the aforementioned partial note selection method are implemented.
  • the electronic terminal may further include a read-only memory (ROM) 902 and/or a random access memory (RAM) 903, and the processor 901 may be based on a program stored in the read-only memory (ROM) 902 Or a program loaded into random access memory (RAM) 903 from storage device 908 to perform various appropriate actions and processes.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data necessary for the operation of the electronic terminal are also stored.
  • the processor 901, ROM 902, and RAM 903 are connected to each other through a bus 904.
  • the following devices can be connected to the I/O interface 905: including input devices 906 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speaker, vibration
  • input devices 906 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.
  • LCD liquid crystal display
  • An output device 907 such as a storage device
  • the communication device 909 may allow the electronic terminal to perform wireless or wired communication with other devices to exchange data.
  • FIG. 9 shows an electronic terminal having various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or provided instead.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present invention include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or from the ROM 902 was installed.
  • the processor 901 the above-mentioned functions defined in the method of the embodiments of the present invention are executed.
  • the aforementioned computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal that is transmitted in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: electric wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic terminal; or it may exist alone without being assembled into the electronic terminal.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic terminal, the electronic terminal is caused to: acquire at least two Internet protocol addresses; send the node evaluation device including the at least two A node evaluation request for an Internet protocol address, wherein the node evaluation device selects and returns an Internet protocol address from the at least two Internet protocol addresses; receives the Internet protocol address returned by the node evaluation device; wherein, the obtained The Internet Protocol address indicates the edge node in the content distribution network.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic terminal, the electronic terminal is caused to: receive a node evaluation request including at least two Internet protocol addresses; Among the at least two Internet protocol addresses, select the Internet protocol address; return the selected Internet protocol address; wherein, the received Internet protocol address indicates an edge node in the content distribution network.
  • the computer program code for performing the operations of the embodiments of the present invention may be written in one or more programming languages or a combination thereof.
  • the above programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include Conventional procedural programming language-such as "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, through an Internet service provider Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider Internet connection for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present invention may be implemented in software or hardware. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • An embodiment of the present invention further provides a readable storage medium on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • the readable storage media include but are not limited to magnetic disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, and portable compact Disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any combination of the above devices.
  • the readable storage medium may be the readable storage medium included in the above electronic terminal, or may be a readable storage medium that exists independently but is not installed in the electronic terminal.
  • the computer program stored in the readable storage medium may be one or more programs.

Abstract

The present application relates to a note partial selection method, an apparatus, an electronic terminal and a readable storage medium, used in a display terminal, a note being displayed on the display terminal, and the method comprising: acquiring note information, the note information comprising coordinate data of all pixel points in the note; detecting a touch control action, and displaying a touch control track of the touch control action according to the touch control action; acquiring a closed track of the touch control track; traversing all pixel points in the note, and selecting the set of all pixel points surrounded by the closed track, the set of pixel points being a selected note part. Thus, a user draws a closed track at will so as to select any part of a note, thereby enabling secondary editing of part of a note, solving the problem of there being no way to perform partial selection and editing of part of a note; in addition, the method is simple, computation volume is small, and complexity is low, which, in addition to improving user experience, can also effectively lower terminal performance consumption.

Description

一种笔记局部选取方法、装置、电子终端和可读存储介质Local note selection method, device, electronic terminal and readable storage medium 技术领域Technical field
本发明涉及电子设备笔记编辑领域,更具体地说,涉及一种笔记局部选取方法、装置、电子终端和可读存储介质。The present invention relates to the field of note editing in electronic equipment, and more specifically, to a method, device, electronic terminal, and readable storage medium for partial note selection.
背景技术Background technique
现有的手机APP中,当用户进行笔记操作时,若需要对笔记进行二次操作,只能实现全部区域的二次编辑操作,无法对特定区域进行二次编辑操作,这给用户的使用带来极大的不便。In the existing mobile phone APP, when the user performs a note operation, if the user needs to perform a second operation on the note, only the second edit operation of the entire area can be realized, and the second edit operation cannot be performed on the specific area, which gives the user Come in great inconvenience.
例如,用户在APP中画了一幅画,当用户想对该幅画的某个特定区域进行特性化修改时,如对该特定区域的颜色实现渐变色操作等,而由于现有的方式只能进行全部区域的二次编辑操作。因此,由于现有方式无法实现对特定区域的笔记进行局部编辑,大大降低了用户的使用体验。For example, the user draws a picture in the APP, and when the user wants to characterize and modify a specific area of the picture, such as implementing a gradient operation on the color of the specific area, etc. Can carry out the secondary editing operation of all areas. Therefore, due to the inability of the existing method to partially edit the notes in a specific area, the user experience is greatly reduced.
技术问题technical problem
要解决的技术问题在于,针对现有技术的上述缺陷,提供一种笔记局部选取方法、装置、电子终端和可读存储介质。The technical problem to be solved is to provide a method, device, electronic terminal, and readable storage medium for local selection of notes in view of the above-mentioned defects of the prior art.
技术解决方案Technical solution
解决其技术问题所采用的技术方案是:提供一种笔记局部选取方法,应用于显示终端,所述笔记显示于所述显示终端,所述方法包括:The technical solution adopted to solve the technical problem is to provide a partial note selection method, which is applied to a display terminal, and the note is displayed on the display terminal. The method includes:
获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;Acquiring note information, the note information includes coordinate data of all pixels in the note;
检测触控动作并根据所述触控动作显示所述触控动作的触控轨迹;Detecting a touch action and displaying the touch track of the touch action according to the touch action;
获取所述触控轨迹的闭合轨迹;Acquiring the closed track of the touch track;
遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合,所述像素点集合为选取的笔记局部。。Traverse all the pixels in the note, and select all the sets of pixels surrounded by the closed track, and the set of pixels is the selected part of the note. .
进一步地,所述获取所述触控轨迹的闭合轨迹包括:Further, the acquiring the closed track of the touch track includes:
根据所述触控动作获取所述触控轨迹按时间排序的坐标点集合;Acquiring a set of coordinate points of the touch trajectory ordered by time according to the touch action;
判断所述坐标点集合中是否具有相同的第一坐标点和第二坐标点;所述第一坐标点为第一时刻获取的坐标点,所述第二坐标点为第二时刻获取的坐标点,所述第二时刻大于所述第一时刻;Determine whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the coordinate point obtained at the second moment , The second moment is greater than the first moment;
若是,则判断所述第一坐标点与所述第二坐标点是否第一次重合,若是,选取所述第一时刻到第二时刻之间获取的坐标点;所述第一时刻到第二时刻之间获取的坐标点所形成的轨迹为所述闭合轨迹。If yes, determine whether the first coordinate point and the second coordinate point coincide for the first time. If yes, select the coordinate point obtained from the first time to the second time; from the first time to the second The trajectory formed by the coordinate points acquired between moments is the closed trajectory.
进一步地,所述遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合包括:Further, the traversing all the pixels in the note, and selecting all the pixel sets surrounded by the closed track include:
判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内;Determine whether any one of all pixels is located in the smallest rectangular area where the closed track is located;
若该像素点位于所述闭合轨迹所在的最小矩形区域内,以该像素点为原点形成射线,并获取所述射线与所述闭合轨迹交叉点的数量;If the pixel is located in the smallest rectangular area where the closed trajectory is located, form a ray using the pixel as the origin, and obtain the number of intersections of the ray and the closed trajectory;
判断所述射线与所述闭合轨迹交叉点的数量是否为奇数;Determine whether the number of intersections of the ray and the closed track is an odd number;
若是,则选取该像素点。If yes, then select the pixel.
进一步地,所述判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内包括:Further, the judging whether any one of all pixels is located in the smallest rectangular area where the closed trajectory is located includes:
获取所述闭合轨迹的坐标点数据;所述坐标点数据包括所述闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;Obtain the coordinate point data of the closed track; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
判断所述所有像素点中的任一像素点的横坐标是否大于所述闭合轨迹的横坐标的最小值、且小于所述闭合轨迹的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述闭合轨迹的纵坐标的最小值、且小于所述闭合轨迹的纵坐标的最大值。Judging whether the abscissa of any pixel in all the pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and the longitudinal of the any pixel Whether the coordinates are greater than the minimum value of the longitudinal coordinate of the closed track and less than the maximum value of the longitudinal coordinate of the closed track.
进一步地,所述选取所有被所述闭合轨迹包围的像素点集合之后,所述方法还包括:Further, after selecting all pixel sets surrounded by the closed trajectory, the method further includes:
对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。Partially edit the note, the editing includes changing color, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing.
另一方面,还提供一种笔记局部选取装置,应用于显示终端,所述笔记显示于所述显示终端,所述装置包括:On the other hand, a partial note selection device is also provided, which is applied to a display terminal. The note is displayed on the display terminal. The device includes:
笔记获取单元,用于获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;A note acquiring unit, configured to acquire note information, the note information including coordinate data of all pixels in the note;
触控显示单元,用于检测触控动作并根据所述触控动作显示所述触控动作的触控轨迹;A touch display unit, configured to detect the touch action and display the touch track of the touch action according to the touch action;
轨迹获取单元,用于获取所述触控轨迹的闭合轨迹;A trajectory acquiring unit, configured to acquire a closed trajectory of the touch trajectory;
选取单元,用于遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合,所述像素点集合为选取的笔记局部。The selecting unit is used to traverse all pixels in the note, and select all sets of pixels surrounded by the closed trajectory. The set of pixels is the selected part of the note.
进一步地,所述轨迹获取单元包括:Further, the trajectory acquisition unit includes:
坐标点获取模块,用于根据所述触控动作获取所述触控轨迹按时间排序的坐标点集合;A coordinate point obtaining module, configured to obtain a set of coordinate points sorted in time according to the touch action according to the touch action;
第一判断模块,用于:The first judgment module is used to:
判断所述坐标点集合中是否具有相同的第一坐标点和第二坐标点;所述第一坐标点为第一时刻获取的坐标点,所述第二坐标点为第二时刻获取的坐标点,所述第二时刻大于所述第一时刻;Determine whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the coordinate point obtained at the second moment , The second moment is greater than the first moment;
若是,则判断所述第一坐标点与所述第二坐标点是否第一次重合,若是,选取所述第一时刻到第二时刻之间获取的坐标点;所述第一时刻到第二时刻之间获取的坐标点所形成的轨迹为所述闭合轨迹。If yes, determine whether the first coordinate point and the second coordinate point coincide for the first time. If yes, select the coordinate point obtained from the first time to the second time; from the first time to the second The trajectory formed by the coordinate points acquired between moments is the closed trajectory.
进一步地,所述选取单元包括:Further, the selection unit includes:
第二判断模块,用于判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内;The second judgment module is used for judging whether any one of all pixels is located in the smallest rectangular area where the closed track is located;
选取模块,用于在该像素点位于所述闭合轨迹所在的最小矩形区域内时,以该像素点为原点形成射线,并获取所述射线与所述闭合轨迹交叉点的数量,以及判断所述射线与所述闭合交叉点的数量是否为奇数;若是,则选取该像素点。A selection module for forming a ray with the pixel point as the origin when the pixel point is within the smallest rectangular area where the closed trajectory is located, and obtaining the number of intersection points of the ray and the closed trajectory, and determining the Whether the number of rays and the closed intersection is an odd number; if so, select the pixel.
进一步地,所述第二判断模块具体用于:Further, the second judgment module is specifically used to:
获取所述闭合轨迹的坐标点数据;所述坐标点数据包括所述闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;Obtain the coordinate point data of the closed track; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
判断所述所有像素点中的任一像素点的横坐标是否大于所述闭合轨迹的横坐标的最小值、且小于所述闭合轨迹的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述闭合轨迹的纵坐标的最小值、且小于所述闭合轨迹的纵坐标的最大值。Judging whether the abscissa of any pixel in all the pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and the longitudinal of the any pixel Whether the coordinates are greater than the minimum value of the longitudinal coordinate of the closed track and less than the maximum value of the longitudinal coordinate of the closed track.
进一步地,还包括:编辑单元,用于对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。Further, it also includes: an editing unit for partially editing the note, the editing includes changing color, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing Or vertical and horizontal proportions to expand or contract.
另一方面,还提供一种电子终端,包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机程序时实现如上所述的笔记局部选取方法的步骤。On the other hand, there is also provided an electronic terminal, including a processor and a memory, where the processor is used to implement the steps of the note partial selection method described above when executing the computer program stored in the memory.
另一方面,还提供可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的笔记局部选取方法的步骤。On the other hand, a readable storage medium is also provided on which a computer program is stored, which when executed by the processor implements the steps of the note partial selection method as described above.
有益效果Beneficial effect
笔记局部选取方法通过用户任意绘制的闭合轨迹以实现对笔记局部的任意选取,可以实现对笔记局部的二次编辑,解决了现有无法对笔记局部进行局部选取和编辑的问题,另外,方法简单、计算量少,复杂度低,在提升用户使用体验的同时,还可以有效降低终端的性能消耗。The local selection method of notes adopts a closed trajectory drawn arbitrarily by the user to realize the arbitrary selection of the local parts of the notes, which can realize the secondary editing of the local parts of the notes, which solves the problem that the existing local parts cannot be selected and edited. In addition, the method is simple 3. Less calculation and lower complexity, while improving the user experience, it can also effectively reduce the performance consumption of the terminal.
附图说明BRIEF DESCRIPTION
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below with reference to the drawings and embodiments. In the drawings:
图1是本发明一实施例提供的一种笔记局部选取方法的流程示意图;FIG. 1 is a schematic flowchart of a partial note selection method according to an embodiment of the present invention;
图2是本发明一实施例提供的一种笔记局部选取方法的流程示意图;2 is a schematic flowchart of a partial note selection method provided by an embodiment of the present invention;
图3是本发明一实施例提供的一种笔记局部选取方法中的触控轨迹示意图;FIG. 3 is a schematic diagram of a touch trajectory in a partial note selection method provided by an embodiment of the present invention;
图4是本发明一实施例提供的一种笔记局部选取方法中的闭合轨迹示意图;4 is a schematic diagram of a closed trajectory in a partial note selection method provided by an embodiment of the present invention;
图5是本发明一实施例提供的笔记任一像素点在闭合轨迹内的示意图;5 is a schematic diagram of any pixel of a note in a closed track provided by an embodiment of the present invention;
图6是本发明一实施例提供的一种笔记局部选取方法对笔记局部进行二次编辑示意图;6 is a schematic diagram of performing a second edit on a part of a note by a method for selecting a partial note according to an embodiment of the present invention;
图7是本发明一实施例提供的一种笔记局部选取装置的原理框图;7 is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention;
图8是本发明一实施例提供的一种笔记局部选取装置的原理框图;8 is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention;
图9是本发明实施例提供的一种终端的结构示意图。9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
本发明的最佳实施方式Best Mode of the Invention
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present invention.
为了解决现有终端不能对笔记进行局部二次编辑的问题,本发明实施例提供了一种笔记局部选取方法,该方法可以实现对终端屏幕上的笔记进行局部选取以及对所选取的笔记局部进行二次编辑操作,简化了二次编辑的操作方法,并提升了二次编辑的操作效率及准确率,可以有效避免局部区域外的误操作,提升用户使用体验。In order to solve the problem that the existing terminal cannot perform partial secondary editing of notes, an embodiment of the present invention provides a partial note selection method, which can implement partial selection of notes on the terminal screen and partial selection of selected notes The secondary editing operation simplifies the secondary editing operation method and improves the efficiency and accuracy of the secondary editing operation, which can effectively avoid misoperations outside the local area and improve the user experience.
参考图1,为本发明一实施例提供的一种笔记局部选取方法的流程示意图。该笔记局部选取方法可以应用于显示终端,其中,该显示终端的显示区域可以用于显示笔记。可选的,该显示终端包括但不限于智能手机、智能手表、平板电脑等。进一步地,该显示终端的操作系统包括但不限于Android操作系统、iOS操作系统、Windows操作系统、Linux操作系统等。Referring to FIG. 1, it is a schematic flowchart of a partial note selection method according to an embodiment of the present invention. The local note selection method can be applied to a display terminal, where the display area of the display terminal can be used to display notes. Optionally, the display terminal includes but is not limited to a smart phone, smart watch, tablet computer, etc. Further, the operating system of the display terminal includes but is not limited to Android operating system, iOS operating system, Windows operating system, Linux operating system, etc.
具体的,如图1所示,本发明实施例提供的笔记局部选取方法可以包括以下步骤:Specifically, as shown in FIG. 1, the partial note selection method provided by the embodiment of the present invention may include the following steps:
步骤S1、获取笔记信息。Step S1: Obtain note information.
本发明实施例中,笔记可以通过读取存储在存储装置中的笔记得到,或者通过用户编辑产生,也可以通过网络接收笔记,或者还可以通过近距离无线传输的方式接收笔记,或者可以通过有线传输的方式接收笔记等。本发明实施例可以通过多种方式获取笔记。In the embodiment of the present invention, the note can be obtained by reading the note stored in the storage device, or generated by the user editing, can also receive the note through the network, or can also receive the note through short-range wireless transmission, or can be wired Receive notes, etc. by means of transmission. The embodiments of the present invention may obtain notes in various ways.
可选的,本发明实施例的笔记包括汉字,其中,笔记局部可以为汉字的一个或多个笔划,或者一个或多个笔划的局部。Optionally, the note in the embodiment of the present invention includes Chinese characters, wherein the part of the note may be one or more strokes of the Chinese character, or a part of one or more strokes.
当然,可以理解地,在其他一些实施例中,本发明实施例的笔记还包括图画,其中,笔记局部包括图画的一部分。可选的,图画可以为任意图片。Of course, it can be understood that in some other embodiments, the notes of the embodiments of the present invention further include drawings, where the notes partially include a part of the drawings. Optionally, the picture can be any picture.
进一步地,本发明实施例的笔记还可以为英文字母、线条等,笔记局部为英文字母的一部分或者多个部分,或者笔记局部为线条的一部分等。本发明实施例为用户提供多种形式,并不限于本文所描述的方式。Further, the notes in the embodiment of the present invention may also be English letters, lines, etc., and the note parts are part or parts of the English letters, or the note parts are part of the lines, etc. The embodiments of the present invention provide users with various forms, and are not limited to the methods described herein.
可选的,本发明实施例的笔记局部选取方法可以通过显示终端接收用户输入的启动笔记局部选取操作指令。其中,用户输入的启动笔记局部选取操作指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。Optionally, the note partial selection method according to an embodiment of the present invention may receive a user-initiated instruction to start a note partial selection operation through a display terminal. Wherein, the user-selected operation instruction for starting the partial selection of the note may include, but is not limited to, an action instruction input by the user (such as an instruction generated by a touch operation or an instruction generated by a key operation) or a voice instruction. The action instruction input by the user may be double-click, click, drag, swipe, long press, etc., or a combination of several.
启动笔记局部选取操作后,即获取笔记信息。其中,笔记信息包括笔记中的所有像素点的坐标数据。After the local note selection operation is started, the note information is obtained. The note information includes coordinate data of all pixels in the note.
步骤S2、检测触控动作并根据触控动作显示触控动作的触控轨迹。Step S2: Detect the touch action and display the touch track of the touch action according to the touch action.
具体的,对触控动作的检测可以由显示终端完成。其中,触控动作为用户施加在显示终端的触控板上的触控动作。其中,用户可以通过肢体(如手指)直接触摸触控板以产生触控动作,也可以通过触控笔在触控板上书写以产生触控动作。Specifically, the detection of the touch action can be completed by the display terminal. The touch action is a touch action applied by the user on the touch panel of the display terminal. Among them, the user can directly touch the touchpad with a limb (such as a finger) to generate a touch action, or write on the touchpad with a stylus to generate a touch action.
可选的,触控板获取触控动作所产生的触控轨迹的方式有很多种,可参考现有的方案,本发明实施例不再赘述。Optionally, there are many ways for the touchpad to obtain the touch trajectory generated by the touch action, and reference may be made to the existing solution, which will not be repeated in the embodiments of the present invention.
进一步地,触控板获取到的触控轨迹可以通过显示终端的显示屏进行实时显示,其中,触控板与显示屏可以为一体式结构,也可以为分立结构。Further, the touch track obtained by the touch panel can be displayed in real time through the display screen of the display terminal, where the touch panel and the display screen can be an integrated structure or a discrete structure.
本发明实施例中,根据触控动作所产生的触控轨迹有多种形式,在绘制触控轨迹的过程中,通过用户施加在触控板的不同操作,可以实现对触控轨迹的绘制、特性调节等,具体的,在将触控轨迹显示于显示终端后,可以通过检测是否接收到将触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小、或者删除触控轨迹部分轨迹等指令,若接收到将触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小、或者删除触控轨迹部分轨迹、或者移动触控轨迹等指令,则可以根据所接收的指令执行相应的修改动作,使触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小等,或者将触控轨迹的部分轨迹删除等,从而可以根据用户的需求得到与需求对应的不同的触控轨迹,其中,触控轨迹的特性调节包括但不限于长度、宽度、灰度、形状、颜色、透明度等,通过调节绘制的触控轨迹,可以得到不同形状、大小、颜色等的触控轨迹,从而可以根据用户的需求得到多样化的触控轨迹,增强个性化特性。In the embodiments of the present invention, there are various forms of the touch trajectory generated according to the touch action. In the process of drawing the touch trajectory, the user can apply different operations on the touch panel to draw the touch trajectory, Feature adjustment, etc. Specifically, after displaying the touch track on the display terminal, it is possible to detect whether the touch track has been enlarged or reduced vertically, horizontally or horizontally, or vertically or horizontally, or deleted If you receive instructions to expand or shrink the touch track vertically, horizontally or horizontally, or vertically or horizontally, or delete the touch track, or delete the touch track, you can use The received command performs corresponding modification actions to make the touch track expand or shrink vertically, horizontally expand or shrink, or vertically or horizontally proportionally expand or shrink, or delete part of the touch track, etc., so that it can be based on user needs Obtain different touch trajectories corresponding to requirements. Among them, the adjustment of the characteristics of the touch trajectory includes but is not limited to length, width, grayscale, shape, color, transparency, etc. By adjusting the drawn touch trajectory, different shapes, The touch trajectory of size, color, etc., so that you can get a variety of touch trajectories according to user needs, and enhance personalized features.
其中,触控轨迹如图3所示,作为示例,在图3中显示在显示终端100的笔记为一线条,该线条包括第一段101和第二段102两部分。而触控轨迹包括从坐标点A0到坐标点A1(记为第一部分201)、从坐标点A1到坐标点A2(记为第二部分202)、以及从坐标点A2到坐标点An(记为第三部分203)共三部分。其中,坐标点A0、坐标点A1、坐标点A2、坐标点An是按触控动作的时间顺序获得的,坐标点A2仅代表其是在坐标点A1之后获得的,并不代表坐标点A2是仅次于坐标点A1的下一个时刻的触控动作产生的坐标点。其中,n大于0。The touch track is shown in FIG. 3. As an example, the note displayed on the display terminal 100 in FIG. 3 is a line, and the line includes the first segment 101 and the second segment 102. The touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and from coordinate point A2 to coordinate point An (denoted as The third part 203) has three parts. Among them, the coordinate point A0, the coordinate point A1, the coordinate point A2, and the coordinate point An are obtained in the chronological order of the touch action. The coordinate point A2 only represents that it is obtained after the coordinate point A1, and does not represent that the coordinate point A2 is The coordinate point generated by the touch action next to the coordinate point A1 at the next moment. Among them, n is greater than 0.
步骤S3、获取触控轨迹的闭合轨迹。Step S3: Obtain the closed track of the touch track.
本发明实施例中,触控轨迹的闭合轨迹可以通过以下方式获得:In the embodiment of the present invention, the closed track of the touch track can be obtained in the following manner:
首先,根据触控动作获取触控轨迹按时间排序的坐标点集合。First, according to the touch action, a set of coordinate points sorted by time according to the touch trajectory is obtained.
其次,判断所获得的按时间排序的坐标点集合中是否具有相同的第一坐标点和第二坐标点。其中,第一坐标点为按时间排序的坐标点集合中的任意一个坐标点。进一步地,第一坐标点是在第一时刻获取的坐标点,第二坐标点为第二时刻获取的坐标点,且第二时刻大于第一时刻。需要说明的是,第一时刻、第二时刻仅用于表示按时间排序的坐标点集合中的坐标点中的任意两个时刻,并不代表在触控动作开始的第一时刻和第二时刻。Secondly, it is determined whether the obtained time-ordered coordinate point set has the same first coordinate point and second coordinate point. The first coordinate point is any coordinate point in the set of coordinate points sorted by time. Further, the first coordinate point is a coordinate point acquired at the first moment, the second coordinate point is a coordinate point acquired at the second moment, and the second moment is greater than the first moment. It should be noted that the first moment and the second moment are only used to represent any two moments in the coordinate points in the coordinate point set sorted by time, and do not represent the first moment and the second moment at the start of the touch action .
进一步地,若在所获得的按时间排序的坐标点集合中具有相同的第一坐标点和第二坐标点,则进一步判断该第二坐标点与第一坐标点是否为第一次重合,若是,则选取第一时刻至第二时刻之间获取的坐标点,其中,第一时刻到第二时刻之间获取的坐标点形成的轨迹即为闭合轨迹。Further, if the obtained time-ordered coordinate point set has the same first coordinate point and second coordinate point, it is further determined whether the second coordinate point and the first coordinate point coincide for the first time. Then, the coordinate points acquired between the first time and the second time are selected, wherein the trajectory formed by the coordinate points acquired between the first time and the second time is a closed trajectory.
在一个具体示例中,如图3所示,触控轨迹包括从坐标点A0到坐标点A1(记为第一部分201)、从坐标点A1到坐标点A2(记为第二部分202)、以及从坐标点A2到坐标点An(记为第三部分203)共三部分。In a specific example, as shown in FIG. 3, the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and There are three parts from coordinate point A2 to coordinate point An (denoted as the third part 203).
其中,坐标点A1为第一坐标点,坐标点A2为第二坐标点,由图3中可以看出,第一坐标点A1与第二坐标点A2为相同的坐标点,因此,第一坐标点A1到第二坐标点A2之间的坐标点(包括第一坐标点A1和第二坐标点A2)所形成的轨迹(第二部分202)即为所需要获取的闭合轨迹,所获得的闭合轨迹(第二部分202)如图4所示。Among them, the coordinate point A1 is the first coordinate point, and the coordinate point A2 is the second coordinate point. As can be seen from FIG. 3, the first coordinate point A1 and the second coordinate point A2 are the same coordinate point. Therefore, the first coordinate The trajectory (second part 202) formed by the coordinate points between the point A1 and the second coordinate point A2 (including the first coordinate point A1 and the second coordinate point A2) is the closed trajectory to be acquired, and the obtained closure The trajectory (second part 202) is shown in Figure 4.
图4中仅示出了闭合轨迹的一种具体示例,在图4中,闭合轨迹为不规则图形,当然,可以理解地,本发明实施例的闭合轨迹还可以为规则图形。可选的,本发明实施例的闭合轨迹为闭合线条。其中,当闭合轨迹为规则图形时,该规则图形包括但不限于圆形、椭圆形、正方形、长方形、菱形、梯形等,可以为其中的一项或多项。Only a specific example of the closed trajectory is shown in FIG. 4. In FIG. 4, the closed trajectory is an irregular graph. Of course, it can be understood that the closed trajectory in this embodiment of the present invention may also be a regular graph. Optionally, the closed track in the embodiment of the present invention is a closed line. When the closed trajectory is a regular figure, the regular figure includes but is not limited to a circle, an ellipse, a square, a rectangle, a diamond, a trapezoid, etc., and may be one or more of them.
步骤S4、遍历笔记中的所有像素点,选取所有被闭合轨迹包围的像素点集合,像素点集合为选取的笔记局部。Step S4, traverse all the pixels in the note, and select all the sets of pixels surrounded by the closed track. The set of pixels is the selected part of the note.
如图4所示,作为示例,图4中的202即为所获取的闭合轨迹,第一段101和第二段102所形成的线条即为显示在显示终端100上的笔记,图4中闭合轨迹202所包围的第二段102即为所选取的笔记局部。As shown in FIG. 4, as an example, 202 in FIG. 4 is the acquired closed trajectory, and the line formed by the first segment 101 and the second segment 102 is the note displayed on the display terminal 100, which is closed in FIG. 4 The second section 102 surrounded by the track 202 is the selected part of the note.
可选的,本发明实施例的笔记局部选取可以通过以下方式获得:Optionally, the partial selection of notes in this embodiment of the present invention may be obtained in the following manner:
首先,先判断所获取的笔记中的所有像素点中的任一像素点是否位于闭合轨迹所在的最小矩形区域内。First, first determine whether any one of all pixels in the acquired note is located in the smallest rectangular area where the closed track is located.
其中,判断笔记中的所有像素点的任一像素点是否位于闭合轨迹所在的最小矩形区域内可以通过以下方式进行判断:Among them, whether any pixel of all pixels in the note is located in the smallest rectangular area where the closed track is located can be judged in the following manner:
获取闭合轨迹的坐标点数据,该坐标点数据包括闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;然后,判断所有像素点中的任一像素点的横坐标是否大于闭合轨迹的横坐标的最小值、且小于闭合轨迹的横坐标的最大值,以及任一像素点的纵坐标是否大于闭合轨迹的纵坐标的最小值、且小于闭合轨迹的纵坐标的最大值。本发明实施例中,笔记的所有像素点的坐标数据与闭合轨迹的坐标点数据是基于同一坐标系的。Obtain the coordinate point data of the closed track, the coordinate point data includes the maximum and minimum values of the horizontal coordinate of the closed track, and the maximum and minimum values of the vertical coordinate; then, determine the horizontal coordinate of any one of all pixels Whether it is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and whether the ordinate of any pixel is greater than the minimum value of the closed track and less than the maximum of the closed track value. In the embodiment of the present invention, the coordinate data of all pixel points of the note and the coordinate point data of the closed track are based on the same coordinate system.
具体示例参考图5,图5中M(x 0,y 0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x 0为该像素点M的横坐标,y 0为该像素点M的纵坐标;闭合轨迹202的横坐标的最小值为x min,闭合轨迹202的横坐标的最大值为x max,闭合轨迹202的纵坐标的最小值为y min,闭合轨迹202的纵坐标的最大值为y max。如图4所示,当该像素点M(x 0,y 0)满足: For a specific example, refer to FIG. 5. In FIG. 5, M (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the The ordinate of the pixel M; the minimum value of the abscissa of the closed trajectory 202 is x min , the maximum value of the abscissa of the closed trajectory 202 is x max , the minimum value of the ordinate of the closed trajectory 202 is y min , the value of the closed trajectory 202 The maximum value of the ordinate is y max . As shown in Figure 4, when the pixel M(x 0 , y 0 ) satisfies:
x min<x 0<x max,且y min<y 0<y max时,则可以确定,该像素点M(x 0,y 0)在闭合轨迹202的最小矩形区域内。 When x min <x 0 <x max and y min <y 0 <y max , it can be determined that the pixel M(x 0 , y 0 ) is within the smallest rectangular area of the closed trajectory 202.
可以理解地,笔记中的所有像素点中的其他像素点均可以按照上述的方来判断是否在闭合轨迹202所在的最小矩形区域内。Understandably, the other pixels in all the pixels in the note can be judged whether they are within the smallest rectangular area where the closed track 202 is located according to the above method.
其次,当确定该像素点位于闭合轨迹所在的最小矩形区域内,进一步判断该像素点是否在闭合轨迹内。在一具体实例中,该闭合轨迹为矩形,则该以闭合轨迹所在的最小矩形区域即为其本身,因此,不需再执行步骤“判断该像素点是否在闭合轨迹内”。这里的“最小矩形区域”表示经过该闭合轨迹中具有最大纵坐标的坐标点的平行于横坐标的第一直线、经过该闭合轨迹中具有最小纵坐标的坐标点的平行于横坐标的第一直线、经过该闭合轨迹中具有最大横坐标的坐标点的平行于纵坐标的第三直线、经过该闭合轨迹中具有最小横坐标的坐标点的平行于纵坐标的第四直线交叉构成的闭合区域。Secondly, when it is determined that the pixel is located in the smallest rectangular area where the closed track is located, it is further determined whether the pixel is within the closed track. In a specific example, the closed trajectory is rectangular, and the smallest rectangular area where the closed trajectory is located is itself. Therefore, there is no need to perform the step of "determining whether the pixel is within the closed trajectory". The "minimum rectangular area" here means the first straight line parallel to the abscissa passing through the coordinate point with the largest ordinate in the closed trajectory, and the first line parallel to the abscissa passing through the coordinate point with the smallest ordinate in the closed trajectory A straight line, a third straight line parallel to the ordinate passing the coordinate point with the largest abscissa in the closed track, and a fourth straight line parallel to the ordinate passing the coordinate point with the smallest abscissa in the closed track Closed area.
其中,判断该像素点是否在闭合轨迹内可以通过以下方式实现:Among them, determining whether the pixel is within the closed track can be achieved in the following ways:
具体的,以该像素点为原点形成射线,并获取射线与闭合轨迹交叉点的数量;进一步判断射线与闭合轨迹交叉点的数量是否为奇数;若是,则选取该像素点。Specifically, the pixel is used as the origin to form a ray, and the number of intersections of the ray and the closed trajectory is obtained; it is further determined whether the number of intersections of the ray and the closed trajectory is an odd number; if so, the pixel is selected.
如图5所示,M(x 0,y 0)为笔记中的所有像素点的中的任意一个像素点,其中x 0为该像素点M的横坐标,y 0为该像素点M的纵坐标。以像素点M(x 0,y 0)为原点所形成的射线为MN,由图5中可以看出,仅当MN与闭合轨迹203的交叉点为奇数时,该像素点M(x 0,y 0)在闭合轨迹203内。因此,当该像素点M(x 0,y 0)满足以其为原点所形成的射线与闭合轨迹203的交叉点的数量为奇数时,可以判定该像素点 M(x 0,y 0),可以选取该像素点M(x 0,y 0)。 As shown in FIG. 5, M(x 0 , y 0 ) is any one of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the longitudinal of the pixel M coordinate. The ray formed with the pixel point M(x 0 , y 0 ) as the origin is MN, as can be seen from FIG. 5, only when the intersection point of MN and the closed track 203 is an odd number, the pixel point M(x 0 , y 0 ) within the closed trajectory 203. Therefore, when the pixel point M(x 0 , y 0 ) satisfies the number of intersections of rays and the closed trajectory 203 formed with the origin as an odd number, the pixel point M(x 0 , y 0 ) can be determined, The pixel M (x 0 , y 0 ) can be selected.
当然,可以理解地,笔记中的所有像素点均可以通过以上方式确定是否在闭合轨迹内,从而根据判定结果选取在闭合轨迹内的像素点集合,以得到所需要选取的笔记局部。Of course, it can be understood that all the pixels in the note can be determined whether they are in the closed trajectory in the above manner, so as to select the pixel set in the closed trajectory according to the determination result, so as to obtain the selected note part.
本发明实施例遍历笔记中的所有像素点,以选取所有被闭合轨迹包围的像素点集合,以得到所需要选取的笔记局部,满足了用户对笔记进行局部选取的需求,提升了用户使用体验。The embodiment of the present invention traverses all the pixels in the note to select all the pixel points surrounded by the closed trajectory to obtain the part of the note that needs to be selected, which satisfies the user's need to select the note locally and improves the user experience.
进一步地,本发明实施例的笔记局部选取方法简单、计算量少,在提升用户使用体验的同时,还可以降低显示终端的性能消耗。Further, the partial note selection method in the embodiment of the present invention is simple and requires less calculation. While improving the user experience, it can also reduce the performance consumption of the display terminal.
参考图2,为本发明一实施例提供的笔记局部选取方法的流程示意图。该实施例的笔记局部选取方法在前述实施例的基础上,进一步包括以下步骤:Referring to FIG. 2, it is a schematic flowchart of a partial note selection method provided by an embodiment of the present invention. The local note selection method of this embodiment, based on the foregoing embodiment, further includes the following steps:
步骤S5、对笔记局部进行编辑。Step S5: Edit the notes locally.
其中,步骤S5是在步骤S4完成后执行的,即完成笔记局部确定后,再执行对笔记局部的编辑操作。Wherein, step S5 is executed after the completion of step S4, that is, after the note part is determined, the editing operation of the note part is executed.
可选的,本发明实施例中,编辑包括但不限于改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小、或移动。即可以实现对所选取的笔记局部进行改变颜色的操作,对笔记局部进行合并,对笔记局部进行拆分,对笔记局部进行删除,对笔记局部进行增加,修改笔记局部的宽度,修改笔记局部的长度,纵向扩大笔记局部,纵向缩小笔记局部,横向扩大笔记局部,横向缩小笔记局部,或者纵横等比例扩大笔记局部,或者纵横等比例缩小笔记局部,或者移动笔记局部等。Optionally, in the embodiment of the present invention, editing includes, but is not limited to, changing colors, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing, Or move. That is, it can realize the operation of changing the color of the selected note part, merging the note part, splitting the note part, deleting the note part, adding the note part, modifying the width of the note part, and modifying the note part Length, expand the note part vertically, shrink the note part vertically, expand the note part horizontally, shrink the note part horizontally, or enlarge the note part vertically or horizontally, or shrink the note part vertically, or move the note part, etc.
进一步地,对笔记局部进行编辑包括:接收并执行针对笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令、移动指令中的至少一项。通过上述指令,灵活的对笔记局部进行调节编辑,使对笔记局部的二次编辑更加个性化、多样化。Further, editing the note part includes receiving and executing a color setting instruction, note information merging instruction, note information splitting instruction, note information deleting instruction, adding note instruction, modifying note width instruction, and modifying note length instruction for the note portion , At least one of zoom instruction and move instruction. Through the above instructions, the note part can be flexibly adjusted and edited, so that the second edit of the part can be more personalized and diversified.
在一个具体实施例中,如图6所示,202为闭合轨迹,用户根据需要可以输入修改包围在闭合轨迹202内的笔记局部的宽度的指令,如增大笔记局部的宽度的指令,显示终端100根据所接收的增大笔记局部的宽度的指令执行增大动作,使包围在闭合轨迹202内的第二段102的宽度变粗;或者,用户根据需要可以输入改变包围在闭合轨迹202内的笔记局部的颜色的指令,显示终端100根据所接收的改变包围在闭合轨迹202内的笔记局部的颜色的指令执行修改动作,将包围在闭合轨迹202内的第二段102的颜色修改为所设置的颜色。或者,也可以根据修改需要修改包围在闭合轨迹202内的第二段102的长度、透明度等。In a specific embodiment, as shown in FIG. 6, 202 is a closed track, and the user can input an instruction to modify the width of the part of the note enclosed in the closed track 202 as needed, such as an instruction to increase the width of the part of the note, to display the terminal 100 performs an increase action according to the received instruction to increase the width of the local part of the note, so that the width of the second segment 102 enclosed in the closed track 202 becomes thicker; or, the user can input to change the The instruction of the color of the note part, the display terminal 100 executes a modification action according to the received instruction to change the color of the note part enclosed in the closed track 202, and changes the color of the second segment 102 enclosed in the closed track 202 to the set s color. Alternatively, the length, transparency, etc. of the second segment 102 enclosed in the closed track 202 may be modified according to the modification needs.
综上,解决了现有无法选取局部区域,对局部区域进行二次编辑的问题,并且本发明的笔记局部选取方法简单,大大减少了计算量,降低了查找复杂度,降低终端的性能消耗,同时还可以有效提升用户使用体验。In summary, the problem that the existing local area cannot be selected and the local area is edited twice is solved, and the method for local selection of notes in the present invention is simple, which greatly reduces the amount of calculation, reduces the complexity of searching, and reduces the performance consumption of the terminal. At the same time, it can effectively improve the user experience.
参考图7,本发明一实施例还提供了一种笔记局部选取装置,可以用于实现前述的笔记局部选取方法。该笔记局部选取装置可以应用于显示终端,且该笔记局部选取装置的笔记显示于显示终端。可选的,该显示终端包括但不限于智能手机、智能手表、平板电脑等。进一步地,该显示终端的操作系统包括但不限于Android操作系统、iOS操作系统、Windows操作系统、Linux操作系统等。Referring to FIG. 7, an embodiment of the present invention further provides a local note selection device, which can be used to implement the foregoing local note selection method. The note partial selection device can be applied to a display terminal, and the note of the note partial selection device is displayed on the display terminal. Optionally, the display terminal includes but is not limited to a smart phone, smart watch, tablet computer, etc. Further, the operating system of the display terminal includes but is not limited to Android operating system, iOS operating system, Windows operating system, Linux operating system, etc.
如图7所示,本发明实施例提供的笔记局部选取装置可以包括:As shown in FIG. 7, the device for partial selection of notes provided by an embodiment of the present invention may include:
笔记获取单元701,用于获取笔记信息,笔记信息包括笔记中的所有像素点的坐标数据。The note acquiring unit 701 is used to acquire note information, and the note information includes coordinate data of all pixels in the note.
本发明实施例中,笔记可以通过读取存储在存储装置中的笔记得到,或者通过用户编辑产生,也可以通过网络接收笔记,或者还可以通过近距离无线传输的方式接收笔记,或者可以通过有线传输的方式接收笔记等。本发明实施例可以通过多种方式获取笔记。In the embodiment of the present invention, the note can be obtained by reading the note stored in the storage device, or generated by the user editing, can also receive the note through the network, or can also receive the note through short-range wireless transmission, or can be wired Receive notes, etc. by means of transmission. The embodiments of the present invention may obtain notes in various ways.
可选的,本发明实施例的笔记包括汉字,其中,笔记局部可以为汉字的一个或多个笔划,或者一个或多个笔划的局部。Optionally, the note in the embodiment of the present invention includes Chinese characters, wherein the part of the note may be one or more strokes of the Chinese character, or a part of one or more strokes.
当然,可以理解地,在其他一些实施例中,本发明实施例的笔记还包括图画,其中,笔记局部包括图画的一部分。可选的,图画可以为任意图片。Of course, it can be understood that in some other embodiments, the notes of the embodiments of the present invention further include drawings, where the notes partially include a part of the drawings. Optionally, the picture can be any picture.
进一步地,本发明实施例的笔记还可以为英文字母、线条等,笔记局部为英文字母的一部分或者多个部分,或者笔记局部为线条的一部分等。本发明实施例为用户提供多种形式,并不限于本文所描述的方式。Further, the notes in the embodiment of the present invention may also be English letters, lines, etc., and the note parts are part or parts of the English letters, or the note parts are part of the lines, etc. The embodiments of the present invention provide users with various forms, and are not limited to the methods described herein.
可选的,本发明实施例的笔记局部选取方法可以通过显示终端接收用户输入的启动笔记局部选取操作指令。其中,用户输入的启动笔记局部选取操作指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。Optionally, the note partial selection method according to an embodiment of the present invention may receive a user-initiated instruction to start a note partial selection operation through a display terminal. Wherein, the user-selected operation instruction for starting the partial selection of the note may include, but is not limited to, an action instruction input by the user (such as an instruction generated by a touch operation or an instruction generated by a key operation) or a voice instruction. The action instruction input by the user may be double-click, click, drag, swipe, long press, etc., or a combination of several.
启动笔记局部选取操作后,即获取笔记信息。其中,笔记信息包括笔记中的所有像素点的坐标数据。After the local note selection operation is started, the note information is obtained. The note information includes coordinate data of all pixels in the note.
触控显示单元702,用于检测触控动作并根据触控动作显示触控动作的触控轨迹。The touch display unit 702 is used to detect the touch action and display the touch track of the touch action according to the touch action.
本发明实施例中,触控显示单元702可以包括触控板和显示屏,触控板用于检测触控动作并根据触控动作生成触控轨迹,所生成的触控轨迹通过显示屏进行显示。In the embodiment of the present invention, the touch display unit 702 may include a touch pad and a display screen. The touch pad is used to detect a touch action and generate a touch track according to the touch action. The generated touch track is displayed on the display screen. .
其中,触控动作为用户施加在显示终端的触控板上的触控动作。其中,用户可以通过肢体(如手指)直接触摸触控板以产生触控动作,也可以通过触控笔在触控板上书写以产生触控动作。The touch action is a touch action applied by the user on the touch panel of the display terminal. Among them, the user can directly touch the touchpad with a limb (such as a finger) to generate a touch action, or write on the touchpad with a stylus to generate a touch action.
可选的,触控板获取触控动作所产生的触控轨迹的方式有很多种,可参考现有的方案,本发明实施例不再赘述。Optionally, there are many ways for the touchpad to obtain the touch trajectory generated by the touch action, and reference may be made to the existing solution, which will not be repeated in the embodiments of the present invention.
进一步地,触控板获取到的触控轨迹可以通过显示终端的显示屏进行实时显示,其中,触控板与显示屏可以为一体式结构,也可以为分立结构。Further, the touch track obtained by the touch panel can be displayed in real time through the display screen of the display terminal, where the touch panel and the display screen can be an integrated structure or a discrete structure.
本发明实施例中,根据触控动作所产生的触控轨迹有多种形式,在绘制触控轨迹的过程中,通过用户施加在触控板的不同操作,可以实现对触控轨迹的绘制、特性调节等,具体的,在将触控轨迹显示于显示终端后,可以通过检测是否接收到将触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小、或者删除触控轨迹部分轨迹、或者移动触控轨迹等指令,若接收到将触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小、或者删除触控轨迹部分轨迹等指令,则可以根据所接收的指令执行相应的修改动作,使触控轨迹纵向扩大或缩小、横向扩大或缩小、或者纵横等比例扩大或缩小等,或者将触控轨迹的部分轨迹删除等,从而可以根据用户的需求得到与需求对应的不同的触控轨迹,其中,触控轨迹的特性调节包括但不限于长度、宽度、灰度、形状、颜色、透明度等,通过调节绘制的触控轨迹,可以得到不同形状、大小、颜色等的触控轨迹,从而可以根据用户的需求得到多样化的触控轨迹,增强个性化特性。In the embodiments of the present invention, there are various forms of the touch trajectory generated according to the touch action. In the process of drawing the touch trajectory, the user can apply different operations on the touch panel to draw the touch trajectory, Feature adjustment, etc. Specifically, after displaying the touch track on the display terminal, it is possible to detect whether the touch track has been enlarged or reduced vertically, horizontally or horizontally, or vertically or horizontally, or deleted Partial trajectory of the track, or moving the touch trajectory, etc., if you receive instructions to expand or contract the touch trajectory vertically, horizontally or horizontally, or vertically or horizontally, or delete the part of the touch trajectory, you can The received command performs corresponding modification actions to make the touch track expand or shrink vertically, horizontally expand or shrink, or vertically or horizontally proportionally expand or shrink, or delete part of the touch track, etc., so that it can be based on user needs Obtain different touch trajectories corresponding to requirements. Among them, the adjustment of the characteristics of the touch trajectory includes but is not limited to length, width, grayscale, shape, color, transparency, etc. By adjusting the drawn touch trajectory, different shapes, The touch trajectory of size, color, etc., so that you can get a variety of touch trajectories according to user needs, and enhance personalized features.
其中,触控轨迹如图3所示,作为示例,在图3中显示在显示终端100的笔记为一线条,该线条包括第一段101和第二段102两部分。而触控轨迹包括从坐标点A0到坐标点A1(记为第一部分201)、从坐标点A1到坐标点A2(记为第二部分202)、以及从坐标点A2到坐标点An(记为第三部分203)共三部分。其中,坐标点A0、坐标点A1、坐标点A2、坐标点An是按触控动作的时间顺序获得的,坐标点A2仅代表其是在坐标点A1之后获得的,并不代表坐标点A2是仅次于坐标点A1的下一个时刻的触控动作产生的坐标点。其中,n大于0。The touch track is shown in FIG. 3. As an example, the note displayed on the display terminal 100 in FIG. 3 is a line, and the line includes the first segment 101 and the second segment 102. The touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and from coordinate point A2 to coordinate point An (denoted as The third part 203) has three parts. Among them, the coordinate point A0, the coordinate point A1, the coordinate point A2, and the coordinate point An are obtained in the chronological order of the touch action. The coordinate point A2 only represents that it is obtained after the coordinate point A1, and does not represent that the coordinate point A2 is The coordinate point generated by the touch action next to the coordinate point A1 at the next moment. Among them, n is greater than 0.
轨迹获取单元703,用于获取触控轨迹的闭合轨迹。The track obtaining unit 703 is used to obtain a closed track of the touch track.
本发明实施例中,轨迹获取单元703包括:坐标点获取模块和第一判断模块。In the embodiment of the present invention, the track acquisition unit 703 includes: a coordinate point acquisition module and a first judgment module.
坐标点获取模块,用于根据触控动作获取触控轨迹按时间排序的坐标点集合。The coordinate point obtaining module is used to obtain a set of coordinate points sorted by time according to the touch action.
第一判断模块,用于:判断坐标点集合中是否具有相同的第一坐标点和第二坐标点;第一坐标点为第一时刻获取的坐标点,第二坐标点为第二时刻获取的坐标点,第二时刻大于第一时刻。若是,则判断第一坐标点与第二坐标点是否第一次重合,若是,选取第一时刻到第二时刻之间获取的坐标点;第一时刻到第二时刻之间获取的坐标点所形成的轨迹为闭合轨迹。其中,第一坐标点为按时间排序的坐标点集合中的任意一个坐标点。The first judgment module is used to judge whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the second coordinate point obtained at the second moment The coordinate point, the second moment is greater than the first moment. If yes, it is determined whether the first coordinate point and the second coordinate point coincide for the first time. If so, the coordinate points obtained between the first time and the second time are selected; the coordinate points obtained between the first time and the second time are selected. The formed track is a closed track. The first coordinate point is any coordinate point in the set of coordinate points sorted by time.
需要说明的是,第一时刻、第二时刻仅用于表示按时间排序的坐标点集合中的坐标点中的任意两个时刻,并不代表在触控动作开始的第一时刻和第二时刻。It should be noted that the first moment and the second moment are only used to represent any two moments in the coordinate points in the coordinate point set sorted by time, and do not represent the first moment and the second moment at the start of the touch action .
在一个具体示例中,如图3所示,触控轨迹包括从坐标点A0到坐标点A1(记为第一部分201)、从坐标点A1到坐标点A2(记为第二部分202)、以及从坐标点A2到坐标点An(记为第三部分203)共三部分。In a specific example, as shown in FIG. 3, the touch track includes from coordinate point A0 to coordinate point A1 (denoted as the first part 201), from coordinate point A1 to coordinate point A2 (denoted as the second part 202), and There are three parts from coordinate point A2 to coordinate point An (denoted as the third part 203).
其中,坐标点A1为第一坐标点,坐标点A2为第二坐标点,由图3中可以看出,第一坐标点A1与第二坐标点A2为相同的坐标点,因此,第一坐标点A1到第二坐标点A2之间的坐标点(包括第一坐标点A1和第二坐标点A2)所形成的轨迹(第二部分202)即为所需要获取的闭合轨迹,所获得的闭合轨迹(第二部分202)如图4所示。Among them, the coordinate point A1 is the first coordinate point, and the coordinate point A2 is the second coordinate point. As can be seen from FIG. 3, the first coordinate point A1 and the second coordinate point A2 are the same coordinate point. Therefore, the first coordinate The trajectory (second part 202) formed by the coordinate points between the point A1 and the second coordinate point A2 (including the first coordinate point A1 and the second coordinate point A2) is the closed trajectory to be acquired, and the obtained closure The trajectory (second part 202) is shown in Figure 4.
图4中仅示出了闭合轨迹的一种具体示例,在图4中,闭合轨迹为不规则图形,当然,可以理解地,本发明实施例的闭合轨迹还可以为规则图形。可选的,本发明实施例的闭合轨迹为闭合线条。其中,当闭合轨迹为规则图形时,该规则图形包括但不限于圆形、椭圆形、正方形、长方形、菱形、梯形等,可以为其中的一项或多项。Only a specific example of the closed trajectory is shown in FIG. 4. In FIG. 4, the closed trajectory is an irregular graph. Of course, it can be understood that the closed trajectory in this embodiment of the present invention may also be a regular graph. Optionally, the closed track in the embodiment of the present invention is a closed line. When the closed trajectory is a regular figure, the regular figure includes but is not limited to a circle, an ellipse, a square, a rectangle, a diamond, a trapezoid, etc., and may be one or more of them.
选取单元704,用于遍历笔记中的所有像素点,选取所有被闭合轨迹包围的像素点集合,像素点集合为选取的笔记局部。The selecting unit 704 is used to traverse all the pixels in the note, and select all sets of pixels surrounded by the closed track, and the set of pixels is the selected part of the note.
如图4所示,作为示例,图4中的202即为所获取的闭合轨迹,第一段101和第二段102所形成的线条即为显示在显示终端100上的笔记,图4中闭合轨迹202所包围的第二段102即为所选取的笔记局部。As shown in FIG. 4, as an example, 202 in FIG. 4 is the acquired closed trajectory, and the line formed by the first segment 101 and the second segment 102 is the note displayed on the display terminal 100, which is closed in FIG. 4 The second section 102 surrounded by the track 202 is the selected part of the note.
可选的选取单元704包括:第二判断模块和选取模块。The optional selection unit 704 includes: a second judgment module and a selection module.
第二判断模块,用于判断所有像素点中的任一像素点是否位于闭合轨迹所在的最小矩形区域内。The second judgment module is used to judge whether any one of all pixels is located in the smallest rectangular area where the closed track is located.
其中,判断笔记中的所有像素点的任一像素点是否位于闭合轨迹所在的最小矩形区域内可以由第二判断模块通过以下方式进行判断。Wherein, determining whether any pixel of all pixels in the note is located in the smallest rectangular area where the closed track is located can be determined by the second determining module in the following manner.
具体的,获取闭合轨迹的坐标点数据;坐标点数据包括闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值。然后,判断所有像素点中的任一像素点的横坐标是否大于闭合轨迹的横坐标的最小值、且小于闭合轨迹的横坐标的最大值,以及任一像素点的纵坐标是否大于闭合轨迹的纵坐标的最小值、且小于闭合轨迹的纵坐标的最大值。本发明实施例中,笔记的所有像素点的坐标数据与闭合轨迹的坐标点数据是基于同一坐标系的。Specifically, the coordinate point data of the closed track is obtained; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate. Then, determine whether the abscissa of any pixel in all pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and whether the vertical coordinate of any pixel is greater than that of the closed track The minimum value of the ordinate is smaller than the maximum value of the ordinate of the closed track. In the embodiment of the present invention, the coordinate data of all pixel points of the note and the coordinate point data of the closed track are based on the same coordinate system.
具体示例参考图5,图5中M(x 0,y 0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x 0为该像素点M的横坐标,y 0为该像素点M的纵坐标;闭合轨迹202的横坐标的最小值为x min,闭合轨迹202的横坐标的最大值为x max,闭合轨迹202的纵坐标的最小值为y min,闭合轨迹202的纵坐标的最大值为y max。如图4所示,当该像素点M(x 0,y 0)满足: For a specific example, refer to FIG. 5. In FIG. 5, M (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the The ordinate of the pixel M; the minimum value of the abscissa of the closed trajectory 202 is x min , the maximum value of the abscissa of the closed trajectory 202 is x max , the minimum value of the ordinate of the closed trajectory 202 is y min , the value of the closed trajectory 202 The maximum value of the ordinate is y max . As shown in Figure 4, when the pixel M(x 0 , y 0 ) satisfies:
x min<x 0<x max,且y min<y 0<y max时,则可以确定,该像素点M(x 0,y 0)在闭合轨迹202的最小矩形区域内。 When x min <x 0 <x max and y min <y 0 <y max , it can be determined that the pixel M(x 0 , y 0 ) is within the smallest rectangular area of the closed trajectory 202.
可以理解地,笔记中的所有像素点中的其他像素点均可以按照上述的方来判断是否在闭合轨迹202所在的最小矩形区域内。Understandably, the other pixels in all the pixels in the note can be judged whether they are within the smallest rectangular area where the closed track 202 is located according to the above method.
进一步地,第二判断模块还用于在像素点位于闭合轨迹所在的最小矩形区域内时,进一步判断该像素点是否在闭合轨迹内。在一具体实例中,该闭合轨迹为矩形,则该以闭合轨迹所在的最小矩形区域即为其本身,因此,不需再执行步骤“判断该像素点是否在闭合轨迹内”。这里的“最小矩形区域”表示经过该闭合轨迹中具有最大纵坐标的坐标点的平行于横坐标的第一直线、经过该闭合轨迹中具有最小纵坐标的坐标点的平行于横坐标的第一直线、经过该闭合轨迹中具有最大横坐标的坐标点的平行于纵坐标的第三直线、经过该闭合轨迹中具有最小横坐标的坐标点的平行于纵坐标的第四直线交叉构成的闭合区域。Further, the second determination module is further used to further determine whether the pixel point is within the closed track when the pixel point is within the smallest rectangular area where the closed track is located. In a specific example, the closed trajectory is rectangular, and the smallest rectangular area where the closed trajectory is located is itself. Therefore, there is no need to perform the step of "determining whether the pixel is within the closed trajectory". The "minimum rectangular area" here means the first straight line parallel to the abscissa passing through the coordinate point with the largest ordinate in the closed trajectory, and the first line parallel to the abscissa passing through the coordinate point with the smallest ordinate in the closed trajectory A straight line, a third straight line parallel to the ordinate passing the coordinate point with the largest abscissa in the closed track, and a fourth straight line parallel to the ordinate passing the coordinate point with the smallest abscissa in the closed track Closed area.
选取模块,用于在该像素点位于闭合轨迹所在的最小矩形区域内时,以该像素点为原点形成射线,并获取射线与闭合轨迹交叉点的数量,以及判断射线与闭合交叉点的数量是否为奇数;若是,则选取该像素点。The selection module is used to form a ray with the pixel as the origin when the pixel is located in the smallest rectangular area where the closed trajectory is located, and obtain the number of intersections of the ray and the closed trajectory, and determine whether the number of rays and the closed intersection is It is an odd number; if it is, the pixel is selected.
如图5所示,M(x 0,y 0)为笔记中的所有像素点的中的任意一个像素点,其中x 0为该像素点M的横坐标,y 0为该像素点M的纵坐标。以像素点M(x 0,y 0)为原点所形成的射线为MN,由图5中可以看出,仅当MN与闭合轨迹203的交叉点为奇数时,该像素点M(x 0,y 0)在闭合轨迹203内。因此,当该像素点M(x 0,y 0)满足以其为原点所形成的射线与闭合轨迹203的交叉点的数量为奇数时,可以判定该像素点 M(x 0,y 0),可以选取该像素点M(x 0,y 0)。 As shown in FIG. 5, M(x 0 , y 0 ) is any one of all pixels in the note, where x 0 is the abscissa of the pixel M, and y 0 is the longitudinal of the pixel M coordinate. The ray formed with the pixel point M(x 0 , y 0 ) as the origin is MN, as can be seen from FIG. 5, only when the intersection point of MN and the closed track 203 is an odd number, the pixel point M(x 0 , y 0 ) within the closed trajectory 203. Therefore, when the pixel point M(x 0 , y 0 ) satisfies the number of intersections of rays and the closed trajectory 203 formed with the origin as an odd number, the pixel point M(x 0 , y 0 ) can be determined, The pixel M (x 0 , y 0 ) can be selected.
当然,可以理解地,笔记中的所有像素点均可以通过以上方式确定是否在闭合轨迹内,从而根据判定结果选取在闭合轨迹内的像素点集合,以得到所需要选取的笔记局部。Of course, it can be understood that all the pixels in the note can be determined whether they are in the closed trajectory in the above manner, so as to select the pixel set in the closed trajectory according to the determination result, so as to obtain the selected note part.
参考图8,为本发明一实施例提供的笔记局部选取装置的原理框图。该实施例在前述实施例的笔记局部选取装置的基础上,进一步还包括:编辑单元705。Referring to FIG. 8, it is a schematic block diagram of a device for partial selection of notes provided by an embodiment of the present invention. This embodiment further includes an editing unit 705 on the basis of the note partial selection device of the foregoing embodiment.
具体的,编辑单元705,用于对笔记局部进行编辑,编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。Specifically, the editing unit 705 is used to partially edit the notes, and the editing includes changing the color, merging, splitting, deleting, increasing, modifying the width, modifying the length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or Zoom out.
可选的,本发明实施例中,编辑包括但不限于改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小、或移动。即可以实现对所选取的笔记局部进行改变颜色的操作,对笔记局部进行合并,对笔记局部进行拆分,对笔记局部进行删除,对笔记局部进行增加,修改笔记局部的宽度,修改笔记局部的长度,纵向扩大笔记局部,纵向缩小笔记局部,横向扩大笔记局部,横向缩小笔记局部,或者纵横等比例扩大笔记局部,或者纵横等比例缩小笔记局部,或者移动笔记局部等。Optionally, in the embodiment of the present invention, editing includes, but is not limited to, changing colors, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing, Or move. That is, it can realize the operation of changing the color of the selected note part, merging the note part, splitting the note part, deleting the note part, adding the note part, modifying the width of the note part, and modifying the note part Length, expand the note part vertically, shrink the note part vertically, expand the note part horizontally, shrink the note part horizontally, or enlarge the note part vertically or horizontally, or shrink the note part vertically, or move the note part, etc.
进一步地,编辑单元705包括:接收执行模块。Further, the editing unit 705 includes: a receiving execution module.
具体的,接收执行模块,用于接收并执行针对笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令、移动指令中的至少一项。通过接收上述指令,并根据上述指令进行对应编辑操作,实现了对笔记局部的灵活调节编辑,使对笔记局部的二次编辑更加个性化、多样化。Specifically, the receiving and executing module is used to receive and execute a color setting instruction, a note information merging instruction, a note information splitting instruction, a note information deleting instruction, a note adding instruction, a modify note width instruction, and a note length instruction, At least one of zoom instruction and move instruction. By receiving the above-mentioned instructions and performing corresponding editing operations according to the above-mentioned instructions, the flexible adjustment and editing of the note part is realized, and the secondary editing of the note part is more personalized and diversified.
本发明实施例中,笔记获取单元701、触控显示单元702、轨迹获取单元703、选取单元704以及编辑单元705均设置在显示终端内。In the embodiment of the present invention, the note acquisition unit 701, the touch display unit 702, the track acquisition unit 703, the selection unit 704, and the editing unit 705 are all provided in the display terminal.
参考图9,为本发明一实施例提供的一种电子终端的结构示意图,该电子终端为显示终端100,笔记可显示于该显示终端100上。图9示出的电子终端仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。9 is a schematic structural diagram of an electronic terminal according to an embodiment of the present invention. The electronic terminal is a display terminal 100, and notes can be displayed on the display terminal 100. The electronic terminal shown in FIG. 9 is only an example, and should not bring any limitation to the functions and use scope of the embodiments of the present invention.
如图9所示,该电子终端包括处理器901和存储装置908,处理器901用于执行存储装置908中存储的计算机程序时实现如前述的笔记局部选取方法的步骤。As shown in FIG. 9, the electronic terminal includes a processor 901 and a storage device 908. When the processor 901 is used to execute the computer program stored in the storage device 908, the steps of the aforementioned partial note selection method are implemented.
进一步地,如图9所示,该电子终端还可以包括只读存储器(ROM)902和/或随机访问存储器(RAM)903,处理器901可以根据存储在只读存储器(ROM)902中的程序或者从存储装置908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子终端操作所需的各种程序和数据。处理器901、ROM 902以及RAM903通过总线904彼此相连。Further, as shown in FIG. 9, the electronic terminal may further include a read-only memory (ROM) 902 and/or a random access memory (RAM) 903, and the processor 901 may be based on a program stored in the read-only memory (ROM) 902 Or a program loaded into random access memory (RAM) 903 from storage device 908 to perform various appropriate actions and processes. In the RAM 903, various programs and data necessary for the operation of the electronic terminal are also stored. The processor 901, ROM 902, and RAM 903 are connected to each other through a bus 904.
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子终端与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的电子终端,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 905: including input devices 906 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speaker, vibration An output device 907 such as a storage device; a storage device 908 including a magnetic tape, a hard disk, etc.; The communication device 909 may allow the electronic terminal to perform wireless or wired communication with other devices to exchange data. Although FIG. 9 shows an electronic terminal having various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or provided instead.
特别地,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理器901执行时,执行本发明实施例的方法中限定的上述功能。In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart may be implemented as a computer software program. For example, embodiments of the present invention include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or from the ROM 902 was installed. When the computer program is executed by the processor 901, the above-mentioned functions defined in the method of the embodiments of the present invention are executed.
需要说明的是,上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the aforementioned computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device. The computer-readable signal medium may include a data signal that is transmitted in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device . The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: electric wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
上述计算机可读介质可以是上述电子终端中所包含的;也可以是单独存在,而未装配入该电子终端中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic terminal; or it may exist alone without being assembled into the electronic terminal.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子终端执行时,使得该电子终端:获取至少两个网际协议地址;向节点评价设备发送包括所述至少两个网际协议地址的节点评价请求,其中,所述节点评价设备从所述至少两个网际协议地址中,选取网际协议地址并返回;接收所述节点评价设备返回的网际协议地址;其中,所获取的网际协议地址指示内容分发网络中的边缘节点。The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic terminal, the electronic terminal is caused to: acquire at least two Internet protocol addresses; send the node evaluation device including the at least two A node evaluation request for an Internet protocol address, wherein the node evaluation device selects and returns an Internet protocol address from the at least two Internet protocol addresses; receives the Internet protocol address returned by the node evaluation device; wherein, the obtained The Internet Protocol address indicates the edge node in the content distribution network.
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子终端执行时,使得该电子终端:接收包括至少两个网际协议地址的节点评价请求;从所述至少两个网际协议地址中,选取网际协议地址;返回选取出的网际协议地址;其中,接收到的网际协议地址指示内容分发网络中的边缘节点。Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic terminal, the electronic terminal is caused to: receive a node evaluation request including at least two Internet protocol addresses; Among the at least two Internet protocol addresses, select the Internet protocol address; return the selected Internet protocol address; wherein, the received Internet protocol address indicates an edge node in the content distribution network.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code for performing the operations of the embodiments of the present invention may be written in one or more programming languages or a combination thereof. The above programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include Conventional procedural programming language-such as "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In situations involving remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, through an Internet service provider Internet connection).
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the drawings illustrate the possible implementation architecture, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions. It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
描述于本发明实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units described in the embodiments of the present invention may be implemented in software or hardware. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
本发明实施例还提供了一种可读存储介质,其上存储有计算机程序,所存储的计算机程序被处理器901执行时实现上述的笔记局部选取方法的操作方法。An embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the stored computer program is executed by the processor 901, an operation method of the above-mentioned partial note selection method is realized.
本发明实施例提供的可读存储介质包括但不限于磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述器件的任意组合。The readable storage media provided by the embodiments of the present invention include but are not limited to magnetic disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, and portable compact Disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any combination of the above devices.
可以理解地,可读存储介质可以是上述电子终端中所包含的可读存储介质,也可以是独立存在而未安装在电子终端中的可读存储介质。Understandably, the readable storage medium may be the readable storage medium included in the above electronic terminal, or may be a readable storage medium that exists independently but is not installed in the electronic terminal.
进一步地,可读存储介质所存储的计算机程序可以为一个或者多个程序。Further, the computer program stored in the readable storage medium may be one or more programs.
以上实施例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本发明的内容并据此实施,并不能限制本发明的保护范围。凡跟本发明权利要求范围所做的均等变化与修饰,均应属于本发明权利要求的涵盖范围。The above embodiments are only for explaining the technical concept and features of the present invention, and the purpose thereof is to enable those familiar with the technology to understand the contents of the present invention and implement them accordingly, and cannot limit the protection scope of the present invention. Any changes and modifications made within the scope of the claims of the present invention shall fall within the scope of the claims of the present invention.
应当理解的是,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,而所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that those of ordinary skill in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the protection scope of the appended claims of the present invention.

Claims (18)

  1. 一种笔记局部选取方法,应用于显示终端,所述笔记显示于所述显示终端,其特征在于,所述方法包括:A partial note selection method is applied to a display terminal, and the note is displayed on the display terminal, characterized in that the method includes:
    获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;Acquiring note information, the note information includes coordinate data of all pixels in the note;
    检测触控动作并根据所述触控动作显示所述触控动作的触控轨迹;Detecting a touch action and displaying the touch track of the touch action according to the touch action;
    获取所述触控轨迹的闭合轨迹;Acquiring the closed track of the touch track;
    遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合,所述像素点集合为选取的笔记局部。Traverse all the pixels in the note, and select all the sets of pixels surrounded by the closed track, and the set of pixels is the selected part of the note.
  2. 根据权利要求1所述的笔记局部选取方法,其特征在于,所述获取所述触控轨迹的闭合轨迹包括:The partial note selection method according to claim 1, wherein the acquiring the closed track of the touch track comprises:
    根据所述触控动作获取所述触控轨迹按时间排序的坐标点集合;Acquiring a set of coordinate points of the touch trajectory ordered by time according to the touch action;
    判断所述坐标点集合中是否具有相同的第一坐标点和第二坐标点;所述第一坐标点为第一时刻获取的坐标点,所述第二坐标点为第二时刻获取的坐标点,所述第二时刻大于所述第一时刻;Determine whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the coordinate point obtained at the second moment , The second moment is greater than the first moment;
    若是,则判断所述第一坐标点与所述第二坐标点是否第一次重合,若是,选取所述第一时刻到第二时刻之间获取的坐标点;所述第一时刻到第二时刻之间获取的坐标点所形成的轨迹为所述闭合轨迹。If yes, determine whether the first coordinate point and the second coordinate point coincide for the first time. If yes, select the coordinate point obtained from the first time to the second time; from the first time to the second The trajectory formed by the coordinate points acquired between moments is the closed trajectory.
  3. 根据权利要求1所述的笔记局部选取方法,其特征在于,所述遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合包括:The partial note selection method according to claim 1, wherein the traversing all pixels in the note and selecting all pixel sets surrounded by the closed trajectory include:
    判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内;Determine whether any one of all pixels is located in the smallest rectangular area where the closed track is located;
    若该像素点位于所述闭合轨迹所在的最小矩形区域内,以该像素点为原点形成射线,并获取所述射线与所述闭合轨迹交叉点的数量;If the pixel is located in the smallest rectangular area where the closed trajectory is located, form a ray using the pixel as the origin, and obtain the number of intersections of the ray and the closed trajectory;
    判断所述射线与所述闭合轨迹交叉点的数量是否为奇数;Determine whether the number of intersections of the ray and the closed track is an odd number;
    若是,则选取该像素点。If yes, then select the pixel.
  4. 根据权利要求3所述的笔记局部选取方法,其特征在于,所述判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内包括:The partial note selection method according to claim 3, wherein the determining whether any one of all pixels is located in the smallest rectangular area where the closed trajectory is located includes:
    获取所述闭合轨迹的坐标点数据;所述坐标点数据包括所述闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;Obtain the coordinate point data of the closed track; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
    判断所述所有像素点中的任一像素点的横坐标是否大于所述闭合轨迹的横坐标的最小值、且小于所述闭合轨迹的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述闭合轨迹的纵坐标的最小值、且小于所述闭合轨迹的纵坐标的最大值。Judging whether the abscissa of any pixel in all the pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and the longitudinal of the any pixel Whether the coordinates are greater than the minimum value of the longitudinal coordinate of the closed track and less than the maximum value of the longitudinal coordinate of the closed track.
  5. 根据权利要求1所述的笔记局部选取方法,其特征在于,所述闭合轨迹为闭合线条。The partial note selection method according to claim 1, wherein the closed track is a closed line.
  6. 根据权利要求5所述的笔记局部选取方法,其特征在于,所述闭合轨迹为规则图形和/或不规则图形。The partial note selection method according to claim 5, wherein the closed trajectory is a regular figure and/or an irregular figure.
  7. 根据权利要求5所述的笔记局部选取方法,其特征在于,所述闭合轨迹为规则图形和/或不规则图形。The partial note selection method according to claim 5, wherein the closed trajectory is a regular figure and/or an irregular figure.
  8. 根据权利要求1所述的笔记局部选取方法,其特征在于,所述笔记包括图画,所述笔记局部包括所述图画的一部分。The partial note selection method according to claim 1, wherein the note includes a picture, and the note partially includes a part of the picture.
  9. 根据权利要求1所述的笔记局部选取方法,其特征在于,所述选取所有被所述闭合轨迹包围的像素点集合之后,所述方法还包括:The partial note selection method according to claim 1, wherein after selecting all the pixel points surrounded by the closed trajectory, the method further comprises:
    对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。Partially edit the note, the editing includes changing color, merging, splitting, deleting, adding, modifying width, modifying length, vertically expanding or reducing, horizontally expanding or reducing, or vertically and horizontally proportionally expanding or reducing.
  10. 根据权利要求9所述的笔记局部选取方法,其特征在于,所述对所述笔记局部进行编辑包括:The partial note selection method according to claim 9, wherein the partial editing of the note includes:
    接收并执行针对所述笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令中的至少一项。Receive and execute at least one of the local color setting instruction, the note information merging instruction, the note information splitting instruction, the note information deleting instruction, the add note instruction, the modify note width instruction, the modify note length instruction, and the zoom instruction .
  11. 一种笔记局部选取装置,应用于显示终端,所述笔记显示于所述显示终端,其特征在于,所述装置包括: A local note selection device is applied to a display terminal, and the note is displayed on the display terminal, wherein the device includes:
    笔记获取单元,用于获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;A note acquiring unit, configured to acquire note information, the note information including coordinate data of all pixels in the note;
    触控显示单元,用于检测触控动作并根据所述触控动作显示所述触控动作的触控轨迹;A touch display unit, configured to detect the touch action and display the touch track of the touch action according to the touch action;
    轨迹获取单元,用于获取所述触控轨迹的闭合轨迹;A trajectory acquiring unit, configured to acquire a closed trajectory of the touch trajectory;
    选取单元,用于遍历所述笔记中的所有像素点,选取所有被所述闭合轨迹包围的像素点集合,所述像素点集合为选取的笔记局部。The selecting unit is used to traverse all pixels in the note, and select all sets of pixels surrounded by the closed trajectory. The set of pixels is the selected part of the note.
  12. 根据权利要求11所述的笔记局部选取装置,其特征在于,所述轨迹获取单元包括:The local note selection device according to claim 11, wherein the trajectory acquisition unit comprises:
    坐标点获取模块,用于根据所述触控动作获取所述触控轨迹按时间排序的坐标点集合;A coordinate point obtaining module, configured to obtain a set of coordinate points sorted in time according to the touch action according to the touch action;
    第一判断模块,用于:The first judgment module is used to:
    判断所述坐标点集合中是否具有相同的第一坐标点和第二坐标点;所述第一坐标点为第一时刻获取的坐标点,所述第二坐标点为第二时刻获取的坐标点,所述第二时刻大于所述第一时刻;Determine whether the coordinate point set has the same first coordinate point and second coordinate point; the first coordinate point is the coordinate point obtained at the first moment, and the second coordinate point is the coordinate point obtained at the second moment , The second moment is greater than the first moment;
    若是,则判断所述第一坐标点与所述第二坐标点是否第一次重合,若是,选取所述第一时刻到第二时刻之间获取的坐标点;所述第一时刻到第二时刻之间获取的坐标点所形成的轨迹为所述闭合轨迹。If yes, determine whether the first coordinate point and the second coordinate point coincide for the first time. If yes, select the coordinate point obtained from the first time to the second time; from the first time to the second The trajectory formed by the coordinate points acquired between moments is the closed trajectory.
  13. 根据权利要求11所述的笔记局部选取装置,其特征在于,所述选取单元包括:The partial note selection device according to claim 11, wherein the selection unit comprises:
    第二判断模块,用于判断所有像素点中的任一像素点是否位于所述闭合轨迹所在的最小矩形区域内;The second judgment module is used for judging whether any one of all pixels is located in the smallest rectangular area where the closed track is located;
    选取模块,用于在该像素点位于所述闭合轨迹所在的最小矩形区域内时,以该像素点为原点形成射线,并获取所述射线与所述闭合轨迹交叉点的数量,以及判断所述射线与所述闭合交叉点的数量是否为奇数;若是,则选取该像素点。A selection module for forming a ray with the pixel point as the origin when the pixel point is within the smallest rectangular area where the closed trajectory is located, and obtaining the number of intersection points of the ray and the closed trajectory, and determining the Whether the number of rays and the closed intersection is an odd number; if so, select the pixel.
  14. 根据权利要求13所述的笔记局部选取装置,其特征在于,所述第二判断模块具体用于:The partial note selection device according to claim 13, wherein the second judgment module is specifically configured to:
    获取所述闭合轨迹的坐标点数据;所述坐标点数据包括所述闭合轨迹的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;Obtain the coordinate point data of the closed track; the coordinate point data includes the maximum and minimum values of the abscissa of the closed track, and the maximum and minimum values of the ordinate;
    判断所述所有像素点中的任一像素点的横坐标是否大于所述闭合轨迹的横坐标的最小值、且小于所述闭合轨迹的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述闭合轨迹的纵坐标的最小值、且小于所述闭合轨迹的纵坐标的最大值。Judging whether the abscissa of any pixel in all the pixels is greater than the minimum value of the abscissa of the closed track and less than the maximum value of the abscissa of the closed track, and the longitudinal of the any pixel Whether the coordinates are greater than the minimum value of the longitudinal coordinate of the closed track and less than the maximum value of the longitudinal coordinate of the closed track.
  15. 根据权利要求11所述的笔记局部选取装置,其特征在于,还包括:The partial note selection device according to claim 11, further comprising:
    编辑单元,用于对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。The editing unit is used for partially editing the note, and the editing includes changing the color, merging, splitting, deleting, adding, modifying the width, modifying the length, vertically expanding or reducing, horizontally expanding or reducing, or vertically or horizontally proportionally expanding or Zoom out.
  16. 根据权利要求15所述的笔记局部选取装置,其特征在于,所述编辑单元包括:The partial note selection device according to claim 15, wherein the editing unit comprises:
    接收执行模块,用于接收并执行针对所述笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令中的至少一项。The receiving and executing module is used to receive and execute the color setting instruction, the note information merging instruction, the note information splitting instruction, the note information deleting instruction, the add note instruction, the modify note width instruction, the modify note length instruction, and the zoom for the note partial At least one of the instructions.
  17. 一种电子终端,其特征在于,所述电子终端包括处理器、所述处理器用于执行存储器中存储的计算机程序时实现如权利要求1-10任一项所述的笔记局部选取方法。An electronic terminal, characterized in that the electronic terminal includes a processor, and when the processor is used to execute a computer program stored in a memory, the local note selection method according to any one of claims 1-10 is implemented.
  18. 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-10中任意一项所述笔记局部选取方法的步骤。A readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method for partially selecting notes according to any one of claims 1-10 are realized.
PCT/CN2018/125454 2018-12-29 2018-12-29 Note partial selection method, apparatus, electronic terminal and readable storage medium WO2020133386A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/125454 WO2020133386A1 (en) 2018-12-29 2018-12-29 Note partial selection method, apparatus, electronic terminal and readable storage medium
CN201880095887.3A CN112639713A (en) 2018-12-29 2018-12-29 Local note selection method and device, electronic terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/125454 WO2020133386A1 (en) 2018-12-29 2018-12-29 Note partial selection method, apparatus, electronic terminal and readable storage medium

Publications (1)

Publication Number Publication Date
WO2020133386A1 true WO2020133386A1 (en) 2020-07-02

Family

ID=71128503

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125454 WO2020133386A1 (en) 2018-12-29 2018-12-29 Note partial selection method, apparatus, electronic terminal and readable storage medium

Country Status (2)

Country Link
CN (1) CN112639713A (en)
WO (1) WO2020133386A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116431256A (en) * 2022-01-04 2023-07-14 荣耀终端有限公司 Display control method, electronic device, and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103135932A (en) * 2013-02-17 2013-06-05 东莞宇龙通信科技有限公司 Method for amplification processing of touch object and communication terminal
CN103500066A (en) * 2013-09-30 2014-01-08 北京奇虎科技有限公司 Screenshot device and method suitable for touch screen devices
CN103777882A (en) * 2012-10-24 2014-05-07 腾讯科技(深圳)有限公司 Multiterm selection method and device based on touch screen
US20160349983A1 (en) * 2014-01-24 2016-12-01 Gionee Communication Equipment Co.,Ltd. Shenzhen Terminal screen shot method and terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3895492B2 (en) * 1998-03-13 2007-03-22 株式会社リコー Image processing apparatus, image processing method, and computer-readable recording medium storing program for causing computer to execute the method
JP4692364B2 (en) * 2006-04-11 2011-06-01 富士ゼロックス株式会社 Electronic conference support program, electronic conference support method, and information terminal device in electronic conference system
JP5107453B1 (en) * 2011-08-11 2012-12-26 シャープ株式会社 Information processing apparatus, operation screen display method, control program, and recording medium
JP5318924B2 (en) * 2011-08-22 2013-10-16 楽天株式会社 Image display device, image display method, image display program, and computer-readable recording medium for recording the program
JP2013089198A (en) * 2011-10-21 2013-05-13 Fujifilm Corp Electronic comic editing device, method and program
CN105759984B (en) * 2016-02-06 2019-07-02 上海触乐信息科技有限公司 The method and apparatus of secondary input text
JP6353893B2 (en) * 2016-12-13 2018-07-04 株式会社アイエスピー Method, program, and apparatus for scraping articles from paper image taken by camera of portable terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777882A (en) * 2012-10-24 2014-05-07 腾讯科技(深圳)有限公司 Multiterm selection method and device based on touch screen
CN103135932A (en) * 2013-02-17 2013-06-05 东莞宇龙通信科技有限公司 Method for amplification processing of touch object and communication terminal
CN103500066A (en) * 2013-09-30 2014-01-08 北京奇虎科技有限公司 Screenshot device and method suitable for touch screen devices
US20160349983A1 (en) * 2014-01-24 2016-12-01 Gionee Communication Equipment Co.,Ltd. Shenzhen Terminal screen shot method and terminal

Also Published As

Publication number Publication date
CN112639713A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2020147666A1 (en) User interface display method and apparatus, terminal and storage medium
US11875437B2 (en) Image drawing method based on target template image, apparatus, readable medium and electronic device
JP5854442B2 (en) Handwriting input method to write multiple characters continuously
CN107463302B (en) A kind of icon layout method of adjustment and its device
WO2020156058A1 (en) Method and device for realizing dragging-based image warping on terminal
WO2021027485A1 (en) Information processing method and apparatus, storage medium, and electronic device
US20140325418A1 (en) Automatically manipulating visualized data based on interactivity
CN113377366B (en) Control editing method, device, equipment, readable storage medium and product
CN109800041B (en) Method and device for realizing small program background blurring, electronic equipment and storage medium
WO2022242379A1 (en) Stroke-based rendering method and device, storage medium and terminal
US20210327427A1 (en) Method and apparatus for testing response speed of on-board equipment, device and storage medium
US20240119082A1 (en) Method, apparatus, device, readable storage medium and product for media content processing
CN108492349B (en) Processing method, device and equipment for writing strokes and storage medium
JP2023533108A (en) Method, apparatus, device and storage medium for generating road labels
US20130152009A1 (en) Browsing Between Mobile and Non-Mobile Web Sites
WO2024067145A1 (en) Image inpainting method and apparatus, and device, computer-readable storage medium and product
WO2020133386A1 (en) Note partial selection method, apparatus, electronic terminal and readable storage medium
CN107562346A (en) Terminal control method, device, terminal and computer-readable recording medium
US11789604B2 (en) Handwriting processing method, handwriting processing device and non-transitory storage medium
WO2020133385A1 (en) Note local selection method and apparatus, terminal, and readable storage medium
CN107765858A (en) Determine the method, apparatus, terminal and storage medium of facial angle
WO2022161199A1 (en) Image editing method and device
WO2022217888A1 (en) Method and apparatus for displaying map application icon, and storage medium and terminal
CN110929571B (en) Handwriting fitting method, handwriting fitting device, handwriting fitting medium and electronic equipment
WO2021018176A1 (en) Text special effect processing method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18944463

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18944463

Country of ref document: EP

Kind code of ref document: A1