WO2020133385A1 - 一种笔记局部选取方法、装置、终端及可读存储介质 - Google Patents
一种笔记局部选取方法、装置、终端及可读存储介质 Download PDFInfo
- Publication number
- WO2020133385A1 WO2020133385A1 PCT/CN2018/125453 CN2018125453W WO2020133385A1 WO 2020133385 A1 WO2020133385 A1 WO 2020133385A1 CN 2018125453 W CN2018125453 W CN 2018125453W WO 2020133385 A1 WO2020133385 A1 WO 2020133385A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- note
- predetermined shape
- pixel
- graphic
- instruction
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/80—Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
Definitions
- the present invention relates to the field of note editing in electronic devices, and more specifically, to a method, device, 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, terminal and readable storage medium for local note selection 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 traversing all the pixels in the note, and selecting all the pixels surrounded by the predetermined shape includes:
- the pixel is located in the smallest rectangular area where the predetermined shape figure is located, it is determined whether the number of graphic pixel points in the predetermined shape figure that are the same as the horizontal coordinate of the pixel point is 2, and the same as the horizontal coordinate of the pixel point 2 graphics pixels on both sides of the pixel; or, determine whether the number of graphics pixels in the predetermined shape graphic that are the same as the ordinate of the pixel is 2, and the same as the ordinate of the pixel 2 graphic pixels are on both sides of the pixel;
- the judging whether any one of the pixels is located in the smallest rectangular area where the predetermined shape figure is located includes:
- the graphic coordinate data including a maximum value and a minimum value of the horizontal coordinate of the predetermined shape graphic, and a maximum value and a minimum value of the vertical coordinate;
- 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 first receiving and executing unit configured to receive and execute an instruction for instructing to display a graphic of a predetermined shape on the display terminal
- the selecting unit is used to traverse all the pixels in the note, and select all sets of pixels surrounded by the predetermined shape figure, and the set of pixels is the selected part of the note.
- the selection unit includes:
- the first judgment module is used to judge whether any one of the pixels is located in the smallest rectangular area where the predetermined shape figure is located;
- the second judgment module is used for judging whether the number of graphic pixels with the same horizontal coordinate as the pixel in the predetermined shape graphic is 2 when the pixel is located in the smallest rectangular area where the predetermined shape graphic is located, and 2 graphic pixels with the same horizontal coordinate of the pixel are on both sides of the pixel; or, determine whether the number of graphic pixels with the same vertical coordinate as the pixel in the predetermined shape graphic is 2 2 graphic pixels with the same vertical coordinate of the pixel are on both sides of the pixel;
- a selection module used to determine whether the number of pixel points of the graphic in the predetermined shape figure that is the same as the abscissa of the pixel point in the predetermined shape figure is 2 and the pixel point Are the two graphics pixels with the same abscissa on both sides of the pixel or the number of graphics pixels with the same ordinate as the pixel in the predetermined shape graphic is 2 and 2 with the same ordinate as the pixel When a graphic pixel is on both sides of the pixel, the pixel is selected.
- the judgment module includes:
- a sub-acquisition module configured to acquire graphic coordinate data of the predetermined shape figure, the graphic coordinate data including a maximum value and a minimum value of the horizontal coordinate of the predetermined shape figure, and a maximum and minimum value of the vertical coordinate;
- a sub-judgment module for judging whether the abscissa of any one of the pixels is greater than the minimum value of the horizontal coordinate of the predetermined shape figure and less than the maximum value of the horizontal coordinate of the predetermined shape figure, and Whether the ordinate of the any pixel point is greater than the minimum value of the ordinate of the predetermined shape figure and less than the maximum value of the ordinate of the predetermined shape figure.
- the device further includes:
- 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.
- a terminal which includes a processor and a memory, and 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 note selection method can realize arbitrary selection of local notes, and can also perform secondary editing of local notes, which solves the problem that existing terminal notes cannot select local areas and cannot perform secondary editing on local areas, and local notes are selected
- the method requires less calculation, effectively reduces complexity, and improves the user experience while reducing 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 partial schematic diagram of a note in a partial note selection method provided by an embodiment of the present invention.
- 4 and 5 are schematic diagrams of coordinate points of notes in the screen coordinates of a terminal 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. Receive and execute an instruction for instructing a predetermined shape to be displayed on the display terminal.
- the predetermined shape graphic is pre-stored in the storage device of the display terminal.
- the instruction for instructing to display a graphic of a predetermined shape on the display terminal may be generated by a selection instruction input by the user.
- the selection instruction input by the user 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 instruction includes the size of the predetermined shape figure and its specific location on the display terminal. Further, a graphic of a predetermined shape is selected by clicking, and the graphic of the predetermined shape is dragged to the specific position.
- the display terminal After receiving the user input selection instruction, the display terminal reads a predetermined shape figure corresponding to the selection instruction from the storage device according to the selection instruction input by the user, and displays the read predetermined shape figure in the display area of the display terminal .
- the method for partially selecting notes in the embodiment of the present invention further includes:
- the display terminal After displaying the selected predetermined shape graphic on the display terminal according to an instruction for displaying the predetermined shape graphic on the display terminal, when the user needs to modify the size and size of the selected predetermined shape graphic, By inputting the corresponding modification instruction (such as the instruction to enlarge or reduce the shape of the predetermined shape vertically, to enlarge or shrink horizontally, or to enlarge the aspect ratio, or to reduce the aspect ratio, or to move the instruction), the display terminal receives and inputs Modify the instruction to execute the corresponding editing action.
- the corresponding modification instruction such as the instruction to enlarge or reduce the shape of the predetermined shape vertically, to enlarge or shrink horizontally, or to enlarge the aspect ratio, or to reduce the aspect ratio, or to move the instruction
- the display terminal performs an action of vertically expanding the predetermined shape graphic according to the received user input instruction to expand the predetermined shape graphic longitudinally, so as to expand the predetermined shape graphic longitudinally; or, the display terminal according to the received user input
- An instruction to shrink the predetermined shape figure in the longitudinal direction executes an action of reducing the predetermined shape figure in the longitudinal direction, so that the predetermined shape figure is reduced in the longitudinal direction.
- the predetermined shape graphic in this embodiment of the present invention may be a closed line.
- the closed line may be at least one of a circle, an ellipse, a triangle, a square, a rectangle, a diamond, and a trapezoid.
- the display terminal may read a predetermined shape figure corresponding to the selection instruction from the predetermined shape figure pre-stored in the storage device according to the selection instruction input by the user, and store the read predetermined The shape graph is displayed on the display terminal.
- the read shape of the predetermined shape takes a circle as an example. If an instruction to expand the circle in the longitudinal direction is received, the circle is expanded in the longitudinal direction according to the instruction to obtain the shape required by the user.
- Step S3 traverse all the pixels in the note, and select all the sets of pixels surrounded by the graphics of the predetermined shape, and the set of pixels is the selected part of the note.
- a circle 101 in FIG. 3 is a predetermined shape figure displayed on the display terminal 100, a curve 102 in the figure is a note on the display terminal 100, and the circle 101 is enclosed in the figure
- the internal curve 103 is the selected note part.
- determining whether any pixel of all pixels in the note is located in the smallest rectangular area where the predetermined shape figure is located can be determined by the following manner:
- the graphic coordinate data of a predetermined shape figure includes the maximum and minimum values of the horizontal coordinate of the predetermined shape figure, and the maximum and minimum values of the vertical coordinate; then, determine the horizontal of any pixel point of all the pixel points Whether the coordinates are greater than the minimum value of the horizontal coordinate of the predetermined shape graphic and less than the maximum value of the horizontal coordinate of the predetermined shape graphic, and whether the vertical coordinate of any pixel is greater than the minimum value of the vertical coordinate of the predetermined shape graphic and less than the predetermined shape graphic The maximum value of the ordinate.
- the coordinate data of all pixel points of the note and the graphic coordinate data of the predetermined shape graphic are based on the same coordinate system.
- a (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the The ordinate of the pixel A;
- the minimum value of the abscissa of the predetermined shape figure (circle 101 is taken as an example in FIG. 4) is x min
- the maximum value of the abscissa of the predetermined shape figure is x max
- the ordinate of the predetermined shape figure The minimum value is y min
- the maximum value of the ordinate of the predetermined shape figure is y max .
- the pixel point is located in the smallest rectangular area where the predetermined shape figure is located, it is further determined whether the pixel point is within the predetermined shape figure.
- the predetermined shape figure is a rectangle, the smallest rectangular area where the predetermined shape figure is is itself. Therefore, there is no need to perform the step "judgment whether the pixel is within the predetermined shape figure".
- the "minimum rectangular area” here means a first straight line parallel to the abscissa passing through the coordinate point with the largest ordinate in the predetermined shape figure, and parallel to the abscissa passing through the coordinate point with the smallest ordinate in the figure of the predetermined shape.
- the first straight line, the third straight line passing through the coordinate point with the largest abscissa in the predetermined shape figure and parallel to the ordinate, the fourth straight line passing through the coordinate point with the smallest abscissa in the predetermined shape figure, and the fourth parallel to the ordinate A closed area formed by straight lines crossing.
- determining whether the pixel is within a predetermined shape can be achieved in the following ways:
- the first method determine whether the number of graphics pixels in the predetermined shape graphic that are the same as the horizontal coordinate of the pixel is 2, and two graphic pixels that are the same as the horizontal coordinate of the pixel are on both sides of the pixel.
- A(x 0 , y 0 ) is any pixel of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the vertical coordinate of the pixel A.
- the two graphic pixels with the same horizontal coordinate as the pixel A (x 0 , y 0 ) in the predetermined shape graphic (circle 101) are: graphic pixel B (x 0 , y b ) and graphic pixel C ( x 0 , y c ).
- the horizontal coordinate of the graphic pixel B (x 0 , y b ) and the graphic pixel C (x 0 , y c ) are the same as the horizontal coordinate of the pixel A (x 0 , y 0 ), and the graphic pixel B (x 0, y b) and a pixel pattern C (x 0, y c) on both sides of the pixel a, i.e. y b ordinate and the image pixel pattern C B pixel ordinate y c Satisfy:
- FIG. 5 is only exemplary: the graphics pixel ordinate of the point B and the image pixel y b C satisfies the ordinate y c y b ⁇ y 0 ⁇ y c of conditions.
- the second method determine whether the number of graphic pixels in the predetermined shape graphic that is the same as the vertical coordinate of the pixel is 2, and two graphic pixels that are the same as the vertical coordinate of the pixel are on both sides of the pixel.
- A(x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the pixel A The ordinate.
- the two graphic pixels with the same horizontal coordinate as the pixel A (x 0 , y 0 ) in the predetermined shape graphic (circle 101) are: graphic pixel E (x e , y 0 ) and graphic pixel F ( x f , y 0 ).
- the horizontal coordinate of the graphic pixel B (x e , y 0 ) and the graphic pixel F (x f , y 0 ) are the same as the horizontal coordinate of the pixel A (x 0 , y 0 ), and the graphic
- the pixel point E (x e , y 0 ) and the graphic pixel point F (x f , y 0 ) are on both sides of the pixel point A, that is, the horizontal coordinate x e of the graphic pixel point E and the horizontal coordinate x f of the image pixel point F Satisfy:
- FIG. 5 exemplifies only that the abscissa x e of the graphic pixel point E and the abscissa x f c of the image pixel point C satisfy the condition of x e ⁇ x 0 ⁇ x f .
- the embodiment of the present invention traverses all the pixels in the note to select all the pixel points surrounded by the shape of the predetermined shape to obtain the selected part of the note, 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 S4 Edit the local notes.
- step S4 is executed after the completion of step S3, that is, the editing operation of the note part is performed after the note part is determined.
- 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, vertically expand the note part, vertically reduce the note part, horizontally expand the note part, horizontally reduce the note part, or vertically and horizontally expand the note part, or vertically and horizontally reduce the note part, 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.
- the predetermined shape figure is a circle 101
- the user can input an instruction to modify the width of the part of the note enclosed in the circle 101 as needed, such as an instruction to increase the width of the part of the note
- the display terminal 100 executes an increase operation according to the received instruction to increase the width of the local portion of the note, so that the width of the curve 103 enclosed in the circle becomes thicker; or, the user may 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 circle 101, and the color of the curve 103 enclosed in the circle 101 is modified to the set color .
- the length, transparency, etc. of the curve 103 enclosed in the circle 101 can also be modified according to the modification needs.
- 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 obtaining unit 701 is used to 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.
- the first receiving and executing unit 702 is configured to receive and execute an instruction for instructing to display a predetermined shape graphic on the display terminal.
- the predetermined shape graphic is pre-stored in the storage device of the display terminal.
- the instruction for instructing to display a graphic of a predetermined shape on the display terminal may be generated by a selection instruction input by the user.
- the selection instruction input by the user 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 display terminal After receiving the user input selection instruction, the display terminal reads a predetermined shape figure corresponding to the selection instruction from the storage device according to the selection instruction input by the user, and displays the read predetermined shape figure in the display area of the display terminal .
- the first receiving execution unit 702 is further configured to receive and execute the vertical expansion or reduction, the horizontal expansion or reduction, or the aspect ratio of the predetermined shape graphic Commands to expand or contract or move.
- the first receiving and executing unit 702 receives and inputs corresponding modification commands (such as an instruction to expand or shrink the predetermined shape vertically, horizontally to increase or decrease, or to enlarge the ratio of aspect ratio, or to reduce the ratio of aspect ratio, or move instructions).
- modification commands such as an instruction to expand or shrink the predetermined shape vertically, horizontally to increase or decrease, or to enlarge the ratio of aspect ratio, or to reduce the ratio of aspect ratio, or move instructions.
- the corresponding editing action is executed according to the modification instruction input by the user.
- the first reception execution unit 702 executes an action of expanding the predetermined shape figure in the longitudinal direction according to the received instruction of the user input to expand the predetermined shape figure in the longitudinal direction, so that the predetermined shape figure is expanded in the longitudinal direction; or, the first reception execution unit 702 According to the received user input instruction to shrink the predetermined shape figure in the longitudinal direction, an action of reducing the predetermined shape figure in the longitudinal direction is performed, so that the predetermined shape figure is reduced in the longitudinal direction.
- the predetermined shape graphics to the required size, size, etc. according to the user input, the user's editing needs are met, the partial selection method of notes is further modified and personalized, and the user experience is further improved.
- the predetermined shape graphic in this embodiment of the present invention may be a closed line.
- the closed line may be at least one of a circle, an ellipse, a triangle, a square, a rectangle, a diamond, and a trapezoid.
- the first receiving execution unit 702 may read a predetermined shape figure corresponding to the selection instruction from the predetermined shape figure pre-stored in the storage device according to the selection instruction input by the user, and The read graph of the predetermined shape is displayed on the display terminal.
- the read shape of the predetermined shape takes a circle as an example. If an instruction to expand the circle in the longitudinal direction is received, the circle is expanded in the longitudinal direction according to the instruction to obtain the shape required by the user.
- the selecting unit 703 is used to traverse all pixels in the note, and select all sets of pixels surrounded by graphics of a predetermined shape, and the set of pixels is the selected part of the note.
- the selection unit 703 includes: a first judgment module, a second judgment module, and a selection module.
- the first judgment module is used to judge whether any one of all pixels is located in the smallest rectangular area where the predetermined shape figure is located.
- the first judgment module includes:
- the sub-acquisition module is used to acquire graphic coordinate data of a predetermined shape figure.
- the graphic coordinate data includes a maximum value and a minimum value of the horizontal coordinate of the predetermined shape figure, and a maximum and minimum value of the vertical coordinate.
- the sub-judgment module is used to further determine whether the pixel point is within the predetermined shape figure after determining that the pixel point is within the smallest rectangular area where the predetermined shape figure is located.
- the sub-judgment module can specifically judge in the following two ways: determine whether the abscissa of any one of all pixels is greater than the minimum value of the predetermined shape figure and less than the maximum value of the predetermined shape figure Value, and whether the ordinate of any pixel is greater than the minimum value of the ordinate of the predetermined shape figure and less than the maximum value of the ordinate of the predetermined shape figure.
- a (x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the The ordinate of the pixel A;
- the minimum value of the abscissa of the predetermined shape figure (circle 101 is taken as an example in FIG. 4) is x min
- the maximum value of the abscissa of the predetermined shape figure is x max
- the ordinate of the predetermined shape figure The minimum value is y min
- the maximum value of the ordinate of the predetermined shape figure is y max .
- the second determining module is used to determine whether the pixel is within the predetermined shape figure when the pixel point is within the smallest rectangular area where the predetermined shape figure is located.
- the predetermined shape figure is a rectangle
- the smallest rectangular area where the predetermined shape figure is is itself. Therefore, there is no need to perform the step "judgment whether the pixel is within the predetermined shape figure".
- the "minimum rectangular area” here means the first straight line passing through the coordinate point with the largest ordinate in the predetermined shape figure and parallel to the abscissa, and the parallel line passing through the coordinate point with the smallest ordinate in the predetermined shape figure and parallel to the horizontal
- the first straight line of coordinates, the third straight line passing through the coordinate point with the largest abscissa in the predetermined shape figure and the third straight line passing through the coordinate point with the smallest abscissa in the predetermined shape figure, A closed area composed of four straight lines.
- the second judgment module judges whether the pixel point is within the predetermined shape figure by the following way:
- the first method determine whether the number of graphics pixels in the predetermined shape graphic that are the same as the horizontal coordinate of the pixel is 2, and two graphic pixels that are the same as the horizontal coordinate of the pixel are on both sides of the pixel.
- A(x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the pixel A The ordinate.
- the two graphic pixels with the same horizontal coordinate as the pixel A (x 0 , y 0 ) in the predetermined shape graphic (circle 101) are: graphic pixel B (x 0 , y b ) and graphic pixel C ( x 0 , y c ).
- the horizontal coordinate of the graphic pixel B (x 0 , y b ) and the graphic pixel C (x 0 , y c ) are the same as the horizontal coordinate of the pixel A (x 0 , y 0 ), and the graphic pixel B (x 0, y b) and a pixel pattern C (x 0, y c) on both sides of the pixel a, i.e. y b ordinate and the image pixel pattern C B pixel ordinate y c Satisfy:
- FIG. 5 is only exemplary: the graphics pixel ordinate of the point B and the image pixel y b C satisfies the ordinate y c y b ⁇ y 0 ⁇ y c of conditions.
- the second method determine whether the number of graphic pixels in the predetermined shape graphic that is the same as the vertical coordinate of the pixel is 2, and two graphic pixels that are the same as the vertical coordinate of the pixel are on both sides of the pixel.
- A(x 0 , y 0 ) is any pixel in the coordinate data of all pixels in the note, where x 0 is the horizontal coordinate of the pixel A, and y 0 is the pixel A The ordinate.
- the two graphic pixels with the same horizontal coordinate as the pixel A (x 0 , y 0 ) in the predetermined shape graphic (circle 101) are: graphic pixel E (x e , y 0 ) and graphic pixel F ( x f , y 0 ).
- the horizontal coordinate of the graphic pixel B (x e , y 0 ) and the graphic pixel F (x f , y 0 ) are the same as the horizontal coordinate of the pixel A (x 0 , y 0 ), and the graphic
- the pixel point E (x e , y 0 ) and the graphic pixel point F (x f , y 0 ) are on both sides of the pixel point A, that is, the horizontal coordinate x e of the graphic pixel point E and the horizontal coordinate x f of the image pixel point F Satisfy:
- FIG. 5 exemplifies only that the abscissa x e of the graphic pixel point E and the abscissa x f c of the image pixel point C satisfy the condition of x e ⁇ x 0 ⁇ x f .
- the selection module is used to determine whether the number of pixels in the predetermined shape graphic is the same as the horizontal coordinate of the pixel point in the minimum rectangular area where the predetermined shape graphic is located, and the same as the horizontal coordinate of the pixel point 2 graphics pixels on both sides of the pixel or whether the number of graphics pixels with the same vertical coordinate of the pixel in the predetermined shape graphic is 2 and 2 graphics pixels with the same vertical coordinate of the pixel are on the pixel When on both sides, select the pixel.
- 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 704 on the basis of the note partial selection device of the foregoing embodiment.
- the editing unit 704 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, or move.
- 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, vertically expand the note part, vertically reduce the note part, horizontally expand the note part, horizontally reduce the note part, or vertically and horizontally expand the note part, or vertically and horizontally reduce the note part, or move the note part, etc.
- the editing unit 704 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 acquiring unit 701, the first receiving execution unit 702, the selecting unit 703, and the editing unit 704 are all set in the display terminal.
- FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- the terminal is a display terminal 100, and notes can be displayed on the display terminal 100.
- the 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 terminal includes a processor 901 and a storage device 908, and the processor 901 is used to implement the steps of the aforementioned partial note selection method when executing the computer program stored in the storage device 908.
- the 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 The program loaded in the random access memory (RAM) 903 from the storage device 908 performs various appropriate actions and processes.
- ROM read only memory
- RAM random access memory
- various programs and data necessary for terminal operation 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
- 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 terminal to perform wireless or wired communication with other devices to exchange data.
- FIG. 9 shows a terminal with various devices, it should be understood that it is not required to implement or have all of 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 computer readable medium may be included in the above terminal; or it may exist alone without being assembled into the terminal.
- the computer-readable medium carries one or more programs.
- the terminal When the one or more programs are executed by the terminal, the terminal is caused to: acquire at least two internet protocol addresses; send the node evaluation device to include the at least two internets A node evaluation request for a 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 Internet The 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 terminal, the terminal is caused to: receive a node evaluation request including at least two Internet protocol addresses; from the at least two Among the 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 a readable storage medium included in the above-mentioned terminal, or a readable storage medium that exists independently but is not installed in the terminal.
- the computer program stored in the readable storage medium may be one or more programs.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种笔记局部选取方法、装置、终端和可读存储介质,应用于显示终端,笔记显示于显示终端,该方法包括:获取笔记信息,笔记信息包括笔记中的所有像素点的坐标数据;接收并执行用于指示将预定形状图形显示在显示终端的指令;遍历笔记中的所有像素点,选取所有被预定形状图形包围的像素点集合,像素点集合为选取的笔记局部。因此,可以实现对笔记局部进行任意选取,还可以对笔记局部进行二次编辑,解决了现有终端笔记无法选取局部区域,不能对局部区域进行二次编辑的问题,且笔记局部选取方法计算量少,有效降低复杂度,在提升用户使用体验的同时,降低终端的性能消耗。
Description
本发明涉及电子设备笔记编辑领域,更具体地说,涉及一种笔记局部选取方法、装置、终端及可读存储介质。
现有的手机APP中,当用户进行笔记操作时,若需要对笔记进行二次操作,只能实现全部区域的二次编辑操作,无法对特定区域进行二次编辑操作,这给用户的使用带来极大的不便。
例如,用户在APP中画了一幅画,当用户想对该幅画的某个特定区域进行特性化修改时,如对该特定区域的颜色实现渐变色操作等,而由于现有的方式只能进行全部区域的二次编辑操作。因此,由于现有方式无法实现对特定区域的笔记进行局部编辑,大大降低了用户的使用体验。
要解决的技术问题在于,针对现有技术的上述缺陷,提供一种笔记局部选取方法、装置、终端及可读存储介质。
解决其技术问题所采用的技术方案是:提供一种笔记局部选取方法,应用于显示终端,所述笔记显示于所述显示终端,所述方法包括:
获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;
接收并执行用于指示将预定形状图形显示在所述显示终端的指令;
遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合,所述像素点集合为选取的笔记局部。
进一步地,所述遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合包括:
判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内;
若该像素点位于所述预定形状图形所在的最小矩形区域内,则判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧;或者,判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧;
若是,则选取该像素点。
进一步地,所述判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内包括:
获取所述预定形状图形的图形坐标数据,所述图形坐标数据包括所述预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;
判断所述所有像素点中的任一像素点的横坐标是否大于所述预定形状图形的横坐标的最小值、且小于所述预定形状图形的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述预定形状图形的纵坐标的最小值、且小于所述预定形状图形的纵坐标的最大值。
进一步地,所述选取所有被所述预定形状图形包围的像素点集合之后,所述方法还包括:
对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。
另一方面,还提供一种笔记局部选取装置,应用于显示终端,所述笔记显示于所述显示终端,所述装置包括:
获取单元,用于获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;
第一接收执行单元,用于接收并执行用于指示将预定形状图形显示在所述显示终端的指令;
选取单元,用于遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合,所述像素点集合为选取的笔记局部。
进一步地,所述选取单元包括:
第一判断模块,用于判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内;
第二判断模块,用于在该像素点位于所述预定形状图形所在的最小矩形区域内时,判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧;或者,判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧;
选取模块,用于在该像素点位于所述预定形状图形所在的最小矩形区域内,并且该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2及与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧或者该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2及与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧时,选取该像素点。
进一步地,所述判断模块包括:
子获取模块,用于获取所述预定形状图形的图形坐标数据,所述图形坐标数据包括所述预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;
子判断模块,用于判断所述所有像素点中的任一像素点的横坐标是否大于所述预定形状图形的横坐标的最小值、且小于所述预定形状图形的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述预定形状图形的纵坐标的最小值、且小于所述预定形状图形的纵坐标的最大值。
进一步地,所述装置还包括:
编辑单元,用于对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。
另一方面,还提供一种终端,包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机程序时实现如上所述的笔记局部选取方法的步骤。
另一方面,还提供可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的笔记局部选取方法的步骤。
笔记局部选取方法可以实现对笔记局部进行任意选取,还可以对笔记局部进行二次编辑,解决了现有终端笔记无法选取局部区域,不能对局部区域进行二次编辑的问题,且,笔记局部选取方法计算量少,有效降低复杂度,在提升用户使用体验的同时,降低终端的性能消耗。
下面将结合附图及实施例对本发明作进一步说明,附图中:
图1是本发明一实施例提供的一种笔记局部选取方法的流程示意图;
图2是本发明一实施例提供的一种笔记局部选取方法的流程示意图;
图3是本发明一实施例提供的一种笔记局部选取方法中笔记局部示意图;
图4和图5是本发明一实施例提供的笔记在终端屏幕坐标中的坐标点示意图;
图6是本发明一实施例提供的一种笔记局部选取方法对笔记局部进行二次编辑示意图;
图7是本发明一实施例提供的一种笔记局部选取装置的原理框图;
图8是本发明一实施例提供的一种笔记局部选取装置的原理框图;
图9是本发明实施例提供的一种终端的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了解决现有终端不能对笔记进行局部二次编辑的问题,本发明实施例提供了一种笔记局部选取方法,该方法可以实现对终端屏幕上的笔记进行局部选取以及对所选取的笔记局部进行二次编辑操作,简化了二次编辑的操作方法,并提升了二次编辑的操作效率及准确率,可以有效避免局部区域外的误操作,提升用户使用体验。
参考图1,为本发明一实施例提供的一种笔记局部选取方法的流程示意图。该笔记局部选取方法可以应用于显示终端,其中,该显示终端的显示区域可以用于显示笔记。可选的,该显示终端包括但不限于智能手机、智能手表、平板电脑等。进一步地,该显示终端的操作***包括但不限于Android操作***、iOS操作***、Windows操作***、Linux操作***等。
具体的,如图1所示,本发明实施例提供的笔记局部选取方法可以包括以下步骤:
步骤S1、获取笔记信息。
本发明实施例中,笔记可以通过读取存储在存储装置中的笔记得到,或者通过用户编辑产生,也可以通过网络接收笔记,或者还可以通过近距离无线传输的方式接收笔记,或者可以通过有线传输的方式接收笔记等。本发明实施例可以通过多种方式获取笔记。
可选的,本发明实施例的笔记包括汉字,其中,笔记局部可以为汉字的一个或多个笔划,或者一个或多个笔划的局部。
当然,可以理解地,在其他一些实施例中,本发明实施例的笔记还包括图画,其中,笔记局部包括图画的一部分。可选的,图画可以为任意图片。
进一步地,本发明实施例的笔记还可以为英文字母、线条等,笔记局部为英文字母的一部分或者多个部分,或者笔记局部为线条的一部分等。本发明实施例为用户提供多种形式,并不限于本文所描述的方式。
可选的,本发明实施例的笔记局部选取方法可以通过显示终端接收用户输入的启动笔记局部选取操作指令。其中,用户输入的启动笔记局部选取操作指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。
启动笔记局部选取操作后,即获取笔记信息。其中,笔记信息包括笔记中的所有像素点的坐标数据。
步骤S2、接收并执行用于指示将预定形状图形显示在显示终端的指令。
可选的,本发明实施例中,预定形状图形预存储在显示终端的存储装置。
本发明实施例中,用于指示将预定形状图形显示在显示终端的指令可以通过用户输入的选择指令产生。具体的,用户输入的选择指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。在一非限制性实施例中,该指令包括所述预定形状图形的尺寸,以及其位于显示终端的具***置。进一步地,通过点击选中一预定形状图形,并拖动对该预定形状图形至该具***置。
显示终端在接收到用户输入选择指令后,根据用户所输入的选择指令从存储装置中读取出与选择指令对应的预定形状图形,并将所读取的预定形状图形显示在显示终端的显示区域。
进一步地,在接收用于指示将预定形状图形显示在显示终端的指令之后,本发明实施例的笔记局部选取方法还包括:
接收并执行将预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大或缩小、移动的指令。
具体的,在根据用于指示将预定形状图形显示在显示终端的指令将所选择的预定形状图形显示在显示终端后,当用户需要对所选取的预定形状图形的大小、尺寸进行修改时,可以通过输入相应的修改指令(如将预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大,或者纵横等比例缩小的指令,或者移动的指令),由显示终端接收并根据用户输入的修改指令执行对应的编辑动作。例如,显示终端根据所接收的用户输入的将预定形状图形纵向扩大的指令,执行将预定形状图形沿纵向扩大的动作,使预定形状图形沿纵向扩大;或者,显示终端根据所接收的用户输入的将预定形状图形纵向缩小的指令,执行将预定形状图形沿纵向缩小的动作,使预定形状图形沿纵向缩小。通过根据用户输入的将预定形状图形修改为所需要的大小、尺寸等,满足了用户的编辑需求,使笔记局部选取方法更加个性化,进一步提升用户使用体验。
可选的,本发明实施例的预定形状图形可以为闭合线条。作为选择,该闭合线条可以为圆形、椭圆形、三角形、正方形、长方形、菱形、梯形中的至少一项。
作为示例,在一个具体实施例中,显示终端可以根据用户输入的选择指令,从预存在存储装置中的预定形状图形中读取一个与选择指令对应的预定形状图形,并将所读取的预定形状图形显示在显示终端上。其中,所读取的预定形状图形以圆形为例,若接收到将该圆形沿纵向扩大的指令,则根据该指令将圆形沿纵向扩大,以获得用户所需的图形。
步骤S3、遍历笔记中的所有像素点,选取所有被预定形状图形包围的像素点集合,像素点集合为选取的笔记局部。
如图3所示,作为示例,图3中的圆形101即为显示在显示终端100的预定形状图形,图中的曲线102即为在显示终端100上的笔记,图中包围在圆形101内部的曲线103即为所选取的笔记局部。
可选的,本发明实施例的笔记局部选取可以通过以下方式获得:
首先,先判断所获取的笔记中的所有像素点中的任一像素点是否位于预定形状图形所在的最小矩形区域内。
其中,判断笔记中的所有像素点的任一像素点是否位于预定形状图形所在的最小矩形区域内可以通过以下方式进行判断:
获取预定形状图形的图形坐标数据,图形坐标数据包括预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;然后,判断所有像素点中的任一像素点的横坐标是否大于预定形状图形的横坐标的最小值、且小于预定形状图形的横坐标的最大值,以及任一像素点的纵坐标是否大于预定形状图形的纵坐标的最小值、且小于预定形状图形的纵坐标的最大值。本发明实施例中,笔记的所有像素点的坐标数据与预定形状图形的图形坐标数据是基于同一坐标系的。
具体示例参考图4,图4中A(x
0,y
0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标;预定形状图形(图4以圆形101为例)的横坐标的最小值为x
min,预定形状图形的横坐标的最大值为x
max,预定形状图形的纵坐标的最小值为y
min,预定形状图形的纵坐标的最大值为y
max。如图4所示,当该像素点A(x
0,y
0)满足:
x
min<x
0<x
max,且y
min<y
0<y
max时,则可以确定,该像素点A(x
0,y
0)在预定形状图形的最小矩形区域内。
可以理解地,笔记中的所有像素点中的其他像素点均可以按照上述的方来判断是否在预定形状图形所在的最小矩形区域内。
其次,当确定该像素点位于预定形状图形所在的最小矩形区域内后,进一步地判断该像素点是否在预定形状图形内。在一具体实例中,该预定形状图形为矩形,则该以预定形状图形所在的最小矩形区域即为其本身,因此,不需再执行步骤“判断该像素点是否在预定形状图形内”。这里的“最小矩形区域”表示经过该预定形状图形中具有最大纵坐标的坐标点的平行于横坐标的第一直线、经过该预定形状图形中具有最小纵坐标的坐标点的平行于横坐标的第一直线、经过该预定形状图形中具有最大横坐标的坐标点的平行于纵坐标的第三直线、经过该预定形状图形中具有最小横坐标的坐标点的平行于纵坐标的第四直线交叉构成的闭合区域。
其中,判断该像素点是否在预定形状图形内可以通过以下方式实现:
第一种方式:判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与该像素点横坐标相同的2个图形像素点在该像素点的两侧。
如图5所示,A(x
0,y
0)为笔记中的所有像素点的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标。预定形状图形(圆形101)中与像素点A(x
0,y
0)的横坐标相同的2个图形像素点分别为:图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)。
如图5所示,图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)的横坐标与像素点A(x
0,y
0)的横坐标相同,且图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)在像素点A的两侧,即图形像素点B的纵坐标y
b和图像像素点C的纵坐标y
c满足:
y
b<y
0<y
c;或者,y
c<y
0<y
b。
其中,图5示例的仅是:图形像素点B的纵坐标y
b和图像像素点C的纵坐标y
c满足y
b<y
0<y
c的条件。
因此,当该像素点A(x
0,y
0)满足上述条件时,则可以判定像素点A(x
0,y
0)在圆形101内。
第二种方式:判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与该像素点纵坐标相同的2个图形像素点在像素点的两侧。
如图5所示,A(x
0,y
0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标。预定形状图形(圆形101)中与像素点A(x
0,y
0)的横坐标相同的2个图形像素点分别为:图形像素点E(x
e,y
0)和图形像素点F(x
f,y
0)。
如图5所示,图形像素点B(x
e,y
0)和图形像素点F(x
f,y
0)的横坐标与像素点A(x
0,y
0)的横坐标相同,且图形像素点E(x
e,y
0)和图形像素点F(x
f,y
0)在像素点A的两侧,即图形像素点E的横坐标x
e和图像像素点F的横坐标x
f满足:
x
e<x
0<x
f;或者,x
f<x
0<x
e。
其中,图5示例的仅是:图形像素点E的横坐标x
e和图像像素点C的横坐标x
f
c满足x
e<x
0<x
f的条件。
因此,当该像素点A(x
0,y
0)满足上述条件时,则可以判定像素点A(x
0,y
0)在圆形101内。
本发明实施例遍历笔记中的所有像素点,以选取所有被预定形状图形包围的像素点集合,以得到所需要选取的笔记局部,满足了用户对笔记进行局部选取的需求,提升了用户使用体验。
进一步地,本发明实施例的笔记局部选取方法简单、计算量少,在提升用户使用体验的同时,还可以降低显示终端的性能消耗。
参考图2,为本发明一实施例提供的笔记局部选取方法的流程示意图。该实施例的笔记局部选取方法在前述实施例的基础上,进一步包括以下步骤:
步骤S4、对笔记局部进行编辑。
其中,步骤S4是在步骤S3完成后执行的,即完成笔记局部确定后,再执行对笔记局部的编辑操作。
可选的,本发明实施例中,编辑包括但不限于改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小、或移动。即可以实现对所选取的笔记局部进行改变颜色的操作,对笔记局部进行合并,对笔记局部进行拆分,对笔记局部进行删除,对笔记局部进行增加,修改笔记局部的宽度,修改笔记局部的长度,纵向扩大笔记局部,纵向缩小笔记局部,横向扩大笔记局部,横向缩小笔记局部,或者纵横等比例扩大笔记局部,或者纵横等比例缩小笔记局部、或者移动笔记局部等。
进一步地,对笔记局部进行编辑包括:接收并执行针对笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令、移动指令中的至少一项。通过上述指令,灵活的对笔记局部进行调节编辑,使对笔记局部的二次编辑更加个性化、多样化。
在一个具体实施例中,如图6所示,预定形状图形为圆形101,用户根据需要可以输入修改包围在圆形101内的笔记局部的宽度的指令,如增大笔记局部的宽度的指令,显示终端100根据所接收的增大笔记局部的宽度的指令执行增大动作,使包围在圆形内的曲线103的宽度***;或者,用户根据需要可以输入改变包围在圆形101内的笔记局部的颜色的指令,显示终端100根据所接收的改变包围在圆形101内的笔记局部的颜色的指令执行修改动作,将包围在圆形101内的曲线103的颜色修改为所设置的颜色。或者,也可以根据修改需要修改包围在圆形101中的曲线103的长度、透明度等。
综上,解决了现有无法选取局部区域,对局部区域进行二次编辑的问题,并且笔记局部选取方法简单,大大减少了计算量,降低了查找复杂度,降低终端的性能消耗,同时还可以有效提升用户使用体验。
参考图7,本发明一实施例还提供了一种笔记局部选取装置,可以用于实现前述的笔记局部选取方法。该笔记局部选取装置可以应用于显示终端,且该笔记局部选取装置的笔记显示于显示终端。可选的,该显示终端包括但不限于智能手机、智能手表、平板电脑等。进一步地,该显示终端的操作***包括但不限于Android操作***、iOS操作***、Windows操作***、Linux操作***等。
如图7所示,本发明实施例提供的笔记局部选取装置可以包括:
获取单元701,用于获取笔记信息。
本发明实施例中,笔记可以通过读取存储在存储装置中的笔记得到,或者通过用户编辑产生,也可以通过网络接收笔记,或者还可以通过近距离无线传输的方式接收笔记,或者可以通过有线传输的方式接收笔记等。本发明实施例可以通过多种方式获取笔记。
可选的,本发明实施例的笔记包括汉字,其中,笔记局部可以为汉字的一个或多个笔划,或者一个或多个笔划的局部。
当然,可以理解地,在其他一些实施例中,本发明实施例的笔记还包括图画,其中,笔记局部包括图画的一部分。可选的,图画可以为任意图片。
进一步地,本发明实施例的笔记还可以为英文字母、线条等,笔记局部为英文字母的一部分或者多个部分,或者笔记局部为线条的一部分等。本发明实施例为用户提供多种形式,并不限于本文所描述的方式。
可选的,本发明实施例的笔记局部选取方法可以通过显示终端接收用户输入的启动笔记局部选取操作指令。其中,用户输入的启动笔记局部选取操作指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。
启动笔记局部选取操作后,即获取笔记信息。其中,笔记信息包括笔记中的所有像素点的坐标数据。
第一接收执行单元702,用于接收并执行用于指示将预定形状图形显示在显示终端的指令。
可选的,本发明实施例中,预定形状图形预存储在显示终端的存储装置。
本发明实施例中,用于指示将预定形状图形显示在显示终端的指令可以通过用户输入的选择指令产生。具体的,用户输入的选择指令可以包括但不限于用户输入的动作指令(如触摸操作产生的指令,或者按键操作产生的指令)或者语音指令。用户输入的动作指令可以为双击、单击、拖动、划动、长按等,或者几种的组合。
显示终端在接收到用户输入选择指令后,根据用户所输入的选择指令从存储装置中读取出与选择指令对应的预定形状图形,并将所读取的预定形状图形显示在显示终端的显示区域。
进一步地,在接收用于指示将预定形状图形显示在显示终端的指令之后,第一接收执行单元702还用于:接收并执行将预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大或缩小、移动的指令。
具体的,在根据用于指示将预定形状图形显示在显示终端的指令将所选择的预定形状图形显示在显示终端后,当用户需要对所选取的预定形状图形的大小、尺寸进行修改时,可以通过输入相应的修改指令(如将预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大,或者纵横等比例缩小的指令,或者移动的指令),由第一接收执行单元702接收并根据用户输入的修改指令执行对应的编辑动作。例如,第一接收执行单元702根据所接收的用户输入的将预定形状图形纵向扩大的指令,执行将预定形状图形沿纵向扩大的动作,使预定形状图形沿纵向扩大;或者,第一接收执行单元702根据所接收的用户输入的将预定形状图形纵向缩小的指令,执行将预定形状图形沿纵向缩小的动作,使预定形状图形沿纵向缩小。通过根据用户输入的将预定形状图形修改为所需要的大小、尺寸等,满足了用户的编辑需求,使笔记局部选取方法更加修改个性化,进一步提升用户使用体验。
可选的,本发明实施例的预定形状图形可以为闭合线条。作为选择,该闭合线条可以为圆形、椭圆形、三角形、正方形、长方形、菱形、梯形中的至少一项。
作为示例,在一个具体实施例中,第一接收执行单元702可以根据用户输入的选择指令,从预存在存储装置中的预定形状图形中读取一个与选择指令对应的预定形状图形,并将所读取的预定形状图形显示在显示终端上。其中,所读取的预定形状图形以圆形为例,若接收到将该圆形沿纵向扩大的指令,则根据该指令将圆形沿纵向扩大,以获得用户所需的图形。
选取单元703,用于遍历笔记中的所有像素点,选取所有被预定形状图形包围的像素点集合,像素点集合为选取的笔记局部。
具体的,选取单元703包括:第一判断模块、第二判断模块和选取模块。
本发明实施例中,第一判断模块,用于判断所有像素点中的任一像素点是否位于预定形状图形所在的最小矩形区域内。
进一步地,第一判断模块包括:
子获取模块,用于获取预定形状图形的图形坐标数据,图形坐标数据包括预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值。
子判断模块,用于在确定该像素点位于预定形状图形所在的最小矩形区域内后,进一步判断该像素点是否在预定形状图形内。其中,子判断模块具体可以通过以下两种方式进行判断:判断所有像素点中的任一像素点的横坐标是否大于预定形状图形的横坐标的最小值、且小于预定形状图形的横坐标的最大值,以及任一像素点的纵坐标是否大于预定形状图形的纵坐标的最小值、且小于预定形状图形的纵坐标的最大值。
具体示例参考图4,图4中A(x
0,y
0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标;预定形状图形(图4以圆形101为例)的横坐标的最小值为x
min,预定形状图形的横坐标的最大值为x
max,预定形状图形的纵坐标的最小值为y
min,预定形状图形的纵坐标的最大值为y
max。如图4所示,当该像素点A(x
0,y
0)满足:
x
min<x
0<x
max,且y
min<y
0<y
max时,则可以确定,该像素点A(x
0,y
0)在预定形状图形的最小矩形区域内。
可以理解地,笔记中的所有像素点中的其他像素点均可以按照上述的方来判断是否在预定形状图形所在的最小矩形区域内。
第二判断模块,用于在该像素点位于预定形状图形所在的最小矩形区域内时,判断该像素是否在预定形状图形内。在一具体实例中,该预定形状图形为矩形,则该以预定形状图形所在的最小矩形区域即为其本身,因此,不需再执行步骤“判断该像素点是否在预定形状图形内”。这里的“最小矩形区域”表示经过该预定形状图形中的具有最大纵坐标的坐标点的平行于横坐标的第一直线、经过该预定形状图形中具有最小纵坐标的坐标点的平行于横坐标的第一直线、经过该预定形状图形中具有最大横坐标的坐标点的平行于纵坐标的第三直线、经过该预定形状图形中具有最小横坐标的坐标点的平行于纵坐标的第四直线交叉构成的闭合区域。
其中,第二判断模块判断该像素点是否在预定形状图形内可以通过以下方式判断:
第一种方式:判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与该像素点横坐标相同的2个图形像素点在该像素点的两侧。
如图5所示,A(x
0,y
0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标。预定形状图形(圆形101)中与像素点A(x
0,y
0)的横坐标相同的2个图形像素点分别为:图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)。
如图5所示,图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)的横坐标与像素点A(x
0,y
0)的横坐标相同,且图形像素点B(x
0,y
b)和图形像素点C(x
0,y
c)在像素点A的两侧,即图形像素点B的纵坐标y
b和图像像素点C的纵坐标y
c满足:
y
b<y
0<y
c;或者,y
c<y
0<y
b。
其中,图5示例的仅是:图形像素点B的纵坐标y
b和图像像素点C的纵坐标y
c满足y
b<y
0<y
c的条件。
因此,当该像素点A(x
0,y
0)满足上述条件时,则可以判定像素点A(x
0,y
0)在圆形101内。
第二种方式:判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与该像素点纵坐标相同的2个图形像素点在像素点的两侧。
如图5所示,A(x
0,y
0)为笔记中的所有像素点的坐标数据中的任意一个像素点,其中x
0为该像素点A的横坐标,y
0为该像素点A的纵坐标。预定形状图形(圆形101)中与像素点A(x
0,y
0)的横坐标相同的2个图形像素点分别为:图形像素点E(x
e,y
0)和图形像素点F(x
f,y
0)。
如图5所示,图形像素点B(x
e,y
0)和图形像素点F(x
f,y
0)的横坐标与像素点A(x
0,y
0)的横坐标相同,且图形像素点E(x
e,y
0)和图形像素点F(x
f,y
0)在像素点A的两侧,即图形像素点E的横坐标x
e和图像像素点F的横坐标x
f满足:
x
e<x
0<x
f;或者,x
f<x
0<x
e。
其中,图5示例的仅是:图形像素点E的横坐标x
e和图像像素点C的横坐标x
f
c满足x
e<x
0<x
f的条件。
因此,当该像素点A(x
0,y
0)满足上述条件时,则可以判定像素点A(x
0,y
0)在圆形101内。
选取模块,用于在该像素点位于预定形状图形所在的最小矩形区域内,并且该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2及与像素点横坐标相同的2个图形像素点在像素点的两侧或者该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2及与像素点纵坐标相同的2个图形像素点在像素点的两侧时,选取该像素点。
参考图8,为本发明一实施例提供的笔记局部选取装置的原理框图。该实施例在前述实施例的笔记局部选取装置的基础上,进一步还包括:编辑单元704。
具体的,编辑单元704,用于对笔记局部进行编辑,编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小、或移动。
可选的,本发明实施例中,编辑包括但不限于改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小、或移动。即可以实现对所选取的笔记局部进行改变颜色的操作,对笔记局部进行合并,对笔记局部进行拆分,对笔记局部进行删除,对笔记局部进行增加,修改笔记局部的宽度,修改笔记局部的长度,纵向扩大笔记局部,纵向缩小笔记局部,横向扩大笔记局部,横向缩小笔记局部,或者纵横等比例扩大笔记局部,或者纵横等比例缩小笔记局部、或者移动笔记局部等。
进一步地,编辑单元704包括:接收执行模块。
具体的,接收执行模块,用于接收并执行针对笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令、移动指令中的至少一项。通过接收上述指令,并根据上述指令进行对应编辑操作,实现了对笔记局部的灵活调节编辑,使对笔记局部的二次编辑更加个性化、多样化。
本发明实施例中,获取单元701、第一接收执行单元702、选取单元703以及编辑单元704均设置在显示终端内。
参考图9,为本发明一实施例提供的一种终端的结构示意图,该终端为显示终端100,笔记可显示于该显示终端100上。图9示出的终端仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图9所示,该终端包括处理器901和存储装置908,处理器901用于执行存储装置908中存储的计算机程序时实现如前述的笔记局部选取方法的步骤。
进一步地,如图9所示,该终端还可以包括只读存储器(ROM)902和/或随机访问存储器(RAM)903,处理器901可以根据存储在只读存储器(ROM)902中的程序或者从存储装置908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有终端操作所需的各种程序和数据。处理器901、ROM 902以及RAM903通过总线904彼此相连。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许终端与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的终端,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM
902被安装。在该计算机程序被处理器901执行时,执行本发明实施例的方法中限定的上述功能。
需要说明的是,上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述终端中所包含的;也可以是单独存在,而未装配入该终端中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该终端执行时,使得该终端:获取至少两个网际协议地址;向节点评价设备发送包括所述至少两个网际协议地址的节点评价请求,其中,所述节点评价设备从所述至少两个网际协议地址中,选取网际协议地址并返回;接收所述节点评价设备返回的网际协议地址;其中,所获取的网际协议地址指示内容分发网络中的边缘节点。
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该终端执行时,使得该终端:接收包括至少两个网际协议地址的节点评价请求;从所述至少两个网际协议地址中,选取网际协议地址;返回选取出的网际协议地址;其中,接收到的网际协议地址指示内容分发网络中的边缘节点。
可以以一种或多种程序设计语言或其组合来编写用于执行本发明实施例的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本发明各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本发明实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本发明实施例还提供了一种可读存储介质,其上存储有计算机程序,所存储的计算机程序被处理器901执行时实现上述的笔记局部选取方法的操作方法。
本发明实施例提供的可读存储介质包括但不限于磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述器件的任意组合。
可以理解地,可读存储介质可以是上述终端中所包含的可读存储介质,也可以是独立存在而未安装在终端中的可读存储介质。
进一步地,可读存储介质所存储的计算机程序可以为一个或者多个程序。
以上实施例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本发明的内容并据此实施,并不能限制本发明的保护范围。凡跟本发明权利要求范围所做的均等变化与修饰,均应属于本发明权利要求的涵盖范围。
应当理解的是,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,而所有这些改进和变换都应属于本发明所附权利要求的保护范围。
Claims (18)
- 一种笔记局部选取方法,应用于显示终端,所述笔记显示于所述显示终端,其特征在于,所述方法包括:获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;接收并执行用于指示将预定形状图形显示在所述显示终端的指令;遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合,所述像素点集合为选取的笔记局部。
- 根据权利要求1所述的方法,其特征在于,所述遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合包括:判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内;若该像素点位于所述预定形状图形所在的最小矩形区域内,则判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧;或者,判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧;若是,则选取该像素点。
- 根据权利要求2所述的方法,其特征在于,所述判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内包括:获取所述预定形状图形的图形坐标数据,所述图形坐标数据包括所述预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;判断所述所有像素点中的任一像素点的横坐标是否大于所述预定形状图形的横坐标的最小值、且小于所述预定形状图形的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述预定形状图形的纵坐标的最小值、且小于所述预定形状图形的纵坐标的最大值。
- 根据权利要求1所述的方法,其特征在于,所述预定形状图形为闭合线条。
- 根据权利要求4所述的方法,其特征在于,所述闭合线条包括圆形、椭圆形、三角形、正方形、长方形、菱形、梯形中的至少一项。
- 根据权利要求1所述的方法,其特征在于,所述笔记包括汉字,所述笔记局部包括所述汉字的一个或多个笔划,或者一个或多个笔划的局部。
- 根据权利要求1所述的方法,其特征在于,所述笔记包括图画,所述笔记局部包括所述图画的一部分。
- 根据权利要求1所述的方法,其特征在于,所述接收用于指示将预定形状图形显示在所述显示终端的指令之后,所述方法还包括:接收并执行将所述预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大或缩小、移动的指令。
- 根据权利要求1所述的方法,其特征在于,所述选取所有被所述预定形状图形包围的像素点集合之后,所述方法还包括:对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。
- 根据权利要求9所述的方法,其特征在于,所述对所述笔记局部进行编辑包括:接收并执行针对所述笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令中的至少一项。
- 一种笔记局部选取装置,应用于显示终端,所述笔记显示于所述显示终端,其特征在于,所述装置包括:获取单元,用于获取笔记信息,所述笔记信息包括所述笔记中的所有像素点的坐标数据;第一接收执行单元,用于接收并执行用于指示将预定形状图形显示在所述显示终端的指令;选取单元,用于遍历所述笔记中的所有像素点,选取所有被所述预定形状图形包围的像素点集合,所述像素点集合为选取的笔记局部。
- 根据权利要求11所述的笔记局部选取装置,其特征在于,所述选取单元包括:第一判断模块,用于判断所述所有像素点中的任一像素点是否位于所述预定形状图形所在的最小矩形区域内;第二判断模块,用于在该像素点位于所述预定形状图形所在的最小矩形区域内时,判断该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2、且与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧;或者,判断该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2、且与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧;选取模块,用于在该像素点位于所述预定形状图形所在的最小矩形区域内,并且该预定形状图形中与该像素点横坐标相同的图形像素点的数量是否为2及与所述像素点横坐标相同的2个图形像素点在所述像素点的两侧或者该预定形状图形中与该像素点纵坐标相同的图形像素点的数量是否为2及与所述像素点纵坐标相同的2个图形像素点在所述像素点的两侧时,选取该像素点。
- 根据权利要求12所述的笔记局部选取装置,其特征在于,所述判断模块包括:子获取模块,用于获取所述预定形状图形的图形坐标数据,所述图形坐标数据包括所述预定形状图形的横坐标的最大值和最小值,以及纵坐标的最大值和最小值;子判断模块,用于判断所述所有像素点中的任一像素点的横坐标是否大于所述预定形状图形的横坐标的最小值、且小于所述预定形状图形的横坐标的最大值,以及所述任一像素点的纵坐标是否大于所述预定形状图形的纵坐标的最小值、且小于所述预定形状图形的纵坐标的最大值。
- 根据权利要求11所述的笔记局部选取装置,其特征在于,所述装置还包括:第二接收执行单元,用于接收并执行将所述预定形状图形纵向扩大或缩小、横向扩大或缩小或者纵横等比例扩大或缩小、移动的指令。
- 根据权利要求11所述的笔记局部选取装置,其特征在于,所述装置还包括:编辑单元,用于对所述笔记局部进行编辑,所述编辑包括改变颜色、合并、拆分、删除、增加、修改宽度、修改长度、纵向扩大或缩小、横向扩大或缩小或纵横等比例扩大或缩小。
- 根据权利要求15所述的笔记局部选取装置,其特征在于,所述编辑单元包括:接收执行模块,用于接收并执行针对所述笔记局部的颜色设置指令、笔记信息合并指令、笔记信息拆分指令、笔记信息删除指令、增加笔记指令、修改笔记宽度指令、修改笔记长度指令、缩放指令中的至少一项。
- 一种终端,其特征在于,包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机程序时实现如权利要求1-10中任意一项所述方法的步骤。
- 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-10中任意一项所述方法的步骤。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201880097584.5A CN113168276A (zh) | 2018-12-29 | 2018-12-29 | 一种笔记局部选取方法、装置、终端及可读存储介质 |
PCT/CN2018/125453 WO2020133385A1 (zh) | 2018-12-29 | 2018-12-29 | 一种笔记局部选取方法、装置、终端及可读存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/125453 WO2020133385A1 (zh) | 2018-12-29 | 2018-12-29 | 一种笔记局部选取方法、装置、终端及可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020133385A1 true WO2020133385A1 (zh) | 2020-07-02 |
Family
ID=71128921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/125453 WO2020133385A1 (zh) | 2018-12-29 | 2018-12-29 | 一种笔记局部选取方法、装置、终端及可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113168276A (zh) |
WO (1) | WO2020133385A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130278512A1 (en) * | 2012-04-19 | 2013-10-24 | Hon Hai Precision Industry Co., Ltd. | Touch sensitive electronic device with clipping function and clipping method |
CN106445344A (zh) * | 2016-09-27 | 2017-02-22 | 乐视控股(北京)有限公司 | 一种截图处理方法及装置 |
CN106910232A (zh) * | 2017-02-24 | 2017-06-30 | 青岛海信电器股份有限公司 | 画线擦除方法及装置 |
CN107506720A (zh) * | 2017-08-18 | 2017-12-22 | 广州视源电子科技股份有限公司 | 板书处理方法、装置、设备和计算机可读存储介质 |
CN108459800A (zh) * | 2018-02-11 | 2018-08-28 | 广州视源电子科技股份有限公司 | 书写白板的线条选择编辑方法、装置、设备及存储介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5107453B1 (ja) * | 2011-08-11 | 2012-12-26 | シャープ株式会社 | 情報処理装置、操作画面表示方法、制御プログラムおよび記録媒体 |
CN109062490B (zh) * | 2018-07-19 | 2019-09-06 | 掌阅科技股份有限公司 | 笔记删除方法、电子设备及计算机存储介质 |
-
2018
- 2018-12-29 WO PCT/CN2018/125453 patent/WO2020133385A1/zh active Application Filing
- 2018-12-29 CN CN201880097584.5A patent/CN113168276A/zh active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130278512A1 (en) * | 2012-04-19 | 2013-10-24 | Hon Hai Precision Industry Co., Ltd. | Touch sensitive electronic device with clipping function and clipping method |
CN106445344A (zh) * | 2016-09-27 | 2017-02-22 | 乐视控股(北京)有限公司 | 一种截图处理方法及装置 |
CN106910232A (zh) * | 2017-02-24 | 2017-06-30 | 青岛海信电器股份有限公司 | 画线擦除方法及装置 |
CN107506720A (zh) * | 2017-08-18 | 2017-12-22 | 广州视源电子科技股份有限公司 | 板书处理方法、装置、设备和计算机可读存储介质 |
CN108459800A (zh) * | 2018-02-11 | 2018-08-28 | 广州视源电子科技股份有限公司 | 书写白板的线条选择编辑方法、装置、设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN113168276A (zh) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7114633B2 (ja) | 画面ミラーリング方法、装置、端末及び記憶媒体 | |
US9430810B2 (en) | Drawing method, apparatus, and terminal | |
CN109460233B (zh) | 页面的原生界面显示更新方法、装置、终端设备及介质 | |
CN107273083B (zh) | 一种终端设备之间的交互方法、装置、设备和存储介质 | |
WO2021027485A1 (zh) | 信息处理方法、装置、存储介质及电子设备 | |
WO2020119804A1 (zh) | 页面视图的显示方法、装置、设备及存储介质 | |
CN111580924B (zh) | 页面展示方法、装置、电子设备及可读存储介质 | |
CN106598410B (zh) | 电子书的显示方法、装置和终端设备 | |
AU2014201249B2 (en) | Method for controlling display function and an electronic device thereof | |
WO2022242379A1 (zh) | 笔画渲染方法、装置、存储介质以及终端 | |
CN110069191B (zh) | 基于终端的图像拖拽变形实现方法和装置 | |
WO2018000372A1 (zh) | 画面显示的方法和终端 | |
WO2023061280A1 (zh) | 应用程序显示方法、装置及电子设备 | |
KR20220124797A (ko) | 자막 정보 표시 방법 및 장치, 전자 디바이스 및 컴퓨터 판독 가능 매체 | |
US9021383B2 (en) | Browsing between mobile and non-mobile web sites | |
WO2013136594A1 (ja) | 図面表示装置、及び図面表示プログラム | |
WO2024131582A1 (zh) | 特效生成方法、装置、设备、计算机可读存储介质及产品 | |
WO2020133386A1 (zh) | 一种笔记局部选取方法、装置、电子终端和可读存储介质 | |
WO2020133385A1 (zh) | 一种笔记局部选取方法、装置、终端及可读存储介质 | |
CN113641276A (zh) | 显示控制方法、装置、电子设备及存储介质 | |
WO2021018176A1 (zh) | 文字特效处理方法及装置 | |
JP5842804B2 (ja) | 表示端末装置及びプログラム | |
WO2020238276A1 (zh) | 一种视图控件的滑动控制方法、装置、设备和存储介质 | |
WO2022161199A1 (zh) | 图像编辑方法及设备 | |
JP2006106983A (ja) | 表示装置及び表示方法 |
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: 18945097 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: 18945097 Country of ref document: EP Kind code of ref document: A1 |