CN116719459A - Annotation frame display method, electronic device and readable storage medium - Google Patents

Annotation frame display method, electronic device and readable storage medium Download PDF

Info

Publication number
CN116719459A
CN116719459A CN202211173822.0A CN202211173822A CN116719459A CN 116719459 A CN116719459 A CN 116719459A CN 202211173822 A CN202211173822 A CN 202211173822A CN 116719459 A CN116719459 A CN 116719459A
Authority
CN
China
Prior art keywords
information
annotation
note
interface
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211173822.0A
Other languages
Chinese (zh)
Inventor
赵其博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211173822.0A priority Critical patent/CN116719459A/en
Publication of CN116719459A publication Critical patent/CN116719459A/en
Pending legal-status Critical Current

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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/169Annotation, e.g. comment data or footnotes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The application discloses a display method of annotation frames, electronic equipment and a readable storage medium, and belongs to the technical field of terminals. The method is applied to the electronic equipment, and comprises the following steps: displaying an annotation frame at a first location in the note interface in response to an annotation frame insertion operation for the target note information at the first location in the note interface with the note interface in the first display state; displaying annotation information input by the input operation in an annotation frame in response to the input operation to the annotation frame; responding to the switching operation of the display state of the note interface, switching the display state of the note interface into a second display state corresponding to the switching operation, and displaying the annotation frame with the annotation information at a second position, so that the relative position of the target note information and the annotation frame is not changed under the condition that the note interface is in the second display state. Therefore, the user can know which part of note information the annotation information in the annotation frame aims at, and the accuracy of annotating the note information is improved.

Description

Annotation frame display method, electronic device and readable storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method for displaying an annotation frame, an electronic device, and a readable storage medium.
Background
With the development of terminal technology, the electronic device has more and more abundant note functions, and a user can record various note information through the note functions, such as conference recording, reading notes, classroom notes and the like. And in the recording process, any note information in the note interface can be annotated according to the requirement, and in general, the annotation is displayed at a position nearby the corresponding note information in the form of an annotation frame.
Currently, the display state of the note interface may change, for example, the note interface may be switched from a full-screen display state to a split-screen display state, or the note interface may be switched from a vertical-screen display state to a horizontal-screen display state. Under the condition that the display state of the note interface is changed, the position of the annotation frame aiming at the handwritten note information or the picture note information is changed, so that dislocation occurs between the annotation frame and the annotated note information, and a user cannot clearly judge which part of the note information in the annotation frame is aimed at, thereby reducing the accuracy of annotating the note information.
Disclosure of Invention
The application provides a display method of annotation frames, electronic equipment and a readable storage medium, which can be used for solving the problem of low annotation accuracy of note information in related technologies. The technical scheme is as follows:
in a first aspect, a method for displaying an annotation frame is provided, and the method is applied to an electronic device, and includes:
when a note interface is in a first display state, responding to annotation frame insertion operation for target note information at a first position in the note interface, and displaying an annotation frame at the first position, wherein the target note information is any note information in handwritten note information or picture note information included in the note interface;
responding to the input operation of the annotating frame, and displaying annotating information input by the input operation in the annotating frame;
responding to a switching operation of the display state of the note interface, switching the display state of the note interface into a second display state corresponding to the switching operation, and displaying the annotation frame with the annotation information at a second position, so that the relative position of the target note information and the annotation frame is not changed when the note interface is in the second display state.
Therefore, after annotating any handwritten note information or picture note information, if the display state of the note interface changes, the relative position between the annotating frame carrying the annotating information and the aimed note information does not change, so that even if the display state of the note interface changes, the user can know which part of note information in the annotating frame is aimed at, and the annotating accuracy of the note information is improved.
As one example of the present application, in a case where a note interface is in a first display state, displaying an annotation frame at a first location in the note interface in response to an annotation frame insertion operation for target note information at the first location, includes:
when a note interface is in a first display state, responding to annotation frame drawing operation aiming at the target note information at a first position in the note interface, and displaying a corresponding quadrilateral at the first position according to an operation track of the annotation frame drawing operation;
determining the area of the quadrangle according to a first coordinate point set of a plurality of coordinate points forming the quadrangle;
Generating the annotation frame based on the position information of the quadrangle and the first coordinate point set under the condition that the area of the quadrangle is larger than or equal to an area threshold value;
deleting the quadrangle;
displaying the annotation frame at the first position.
Therefore, the annotation frame is generated in a quadrilateral drawing mode, and the convenience of displaying the annotation frame in the process of recording note information is improved.
As an example of the present application, the generating the annotation frame based on the position information of the quadrangle and the first coordinate point set in the case where the area of the quadrangle is greater than or equal to an area threshold value includes:
when the area of the quadrangle is larger than or equal to the area threshold value, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of a rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle;
and generating the annotation frame according to the position information of the rectangle and the second coordinate point set.
Therefore, the annotation frame is generated under the condition that the area is larger than or equal to the area threshold value, so that misoperation of generating the annotation frame based on each quadrangle is avoided, and accuracy of generating the annotation frame is improved.
As one example of the present application, the electronic device includes a note module and an algorithm module;
when the area of the quadrangle is greater than or equal to the area threshold, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of the rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle, wherein the fitting comprises the following steps:
when the area of the quadrangle is larger than or equal to the area threshold value, the note module sends a rectangle identification message to the algorithm module, wherein the rectangle identification message carries the position information of the quadrangle and the first coordinate point set;
the algorithm module performs contour recognition operation on the quadrangle according to the position information of the quadrangle;
the algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation to obtain the position information of the rectangle and the second coordinate point set;
the algorithm module sends the rectangular position information and the second coordinate point set to the note module.
Therefore, through the outline identification operation and the boundary fitting operation, the shape of the displayed annotation frame is a standard rectangle, the attractiveness of the displayed annotation frame is improved, and meanwhile, a user can know the size of the subsequently displayed annotation frame.
As an example of the application, the electronic device further comprises a graphic canvas module;
the deleting the quadrangle includes:
the note module sends a handwritten rectangle deleting message to the graphic canvas module;
and the graphic canvas module deletes the quadrangle.
Therefore, by deleting the quadrangle, other contents affecting annotation information display do not exist at the position of the rectangle, and the attractiveness of the note interface is improved.
As an example of the present application, the electronic device further includes an annotation frame drawing module;
the generating the annotation frame according to the position information of the rectangle and the second coordinate point set includes:
the note module sends a drawing message to the annotation frame drawing module, wherein the drawing message carries the position information of the rectangle, the second coordinate point set and the position information of the first position;
the annotation frame drawing module generates the annotation frame according to the position information of the rectangle and the second coordinate point set;
The displaying the annotation box at the first position comprises:
and the annotation frame drawing module displays the annotation frame at the first position according to the position information of the first position.
Therefore, the annotating frame is displayed at the first position according to the position information of the first position, so that the position of the annotating frame is more accurate.
As an example of the present application, the displaying, in response to an input operation to the annotation box, annotation information input by the input operation in the annotation box includes:
the note module responds to the input operation of the annotation frame and sends the annotation information input by the input operation to the annotation frame drawing module;
the annotation drawing module zooms the annotation information according to first size information of the annotation frame, and displays the zoomed annotation information in the annotation frame positioned in the annotation layer, wherein the first size information is the size information of the annotation frame when the note interface is in the first display state;
the note module responds to the exiting editing operation of the annotation frame and sends first size information of the annotation frame and the annotation information to the graphic canvas module;
And the graphic canvas module draws the annotation frame on the graphic layout layer according to the first size information and displays the annotation information in the annotation frame.
Therefore, the annotation information is scaled according to the first size information of the annotation frame, so that the annotation information is adapted to the size of the annotation frame, the annotation information can be completely displayed in the annotation frame, and the information display integrity is improved.
As an example of the present application, before the switching, in response to the switching operation of the display state of the note interface, the display state of the note interface is switched to the second display state corresponding to the switching operation, the method further includes:
and storing a first interface size when the note interface is in the first display state, position information of the first position, first size information of the annotation frame and annotation information displayed in the annotation frame.
Therefore, the position of the annotation frame in the note interface in the second display state can be determined through specific data under the condition that the display state of the subsequent note interface is changed by acquiring and storing the first interface size, the position information of the first position, the first size information and the annotation information.
As an example of the present application, the displaying the annotation box at the second position includes:
acquiring a second interface size when the note interface is in the second display state;
determining an interface scaling according to the first interface size and the second interface size;
determining second size information of the annotation frame and position information of the second position according to the interface scaling, the position information of the first position and the first size information;
and displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
Therefore, by determining the interface scaling, after the display state of the note interface is changed, the size and the position of the annotation frame can be accurately determined, so that the display accuracy of the annotation frame is improved.
As one example of the present application, the electronic device includes a note module and a graphic canvas module;
before the obtaining the second interface size when the note interface is in the second display state, the method further includes:
the note module monitors the display state of the note interface;
The obtaining a second interface size when the note interface is in the second display state includes:
the note module acquires a second interface size when the note interface is in the second display state under the condition that the note interface is in the second display state;
the displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position comprises the following steps:
the note module sends the second size information, the position information of the second position and the annotation information to the graphic canvas module;
and the graphic canvas module displays an annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
Therefore, the display state of the note interface is monitored through the note module, and in the case that the display state of the note interface is changed, the second size information and the position information of the second position can be rapidly and timely determined, so that the display reliability of the annotation frame when the display state of the note interface is changed is improved.
As an example of the present application, before the generating the annotation frame based on the location information of the quadrangle and the first coordinate point set, the method further includes:
displaying a prompt window in the note interface when the area of the quadrangle is larger than or equal to an area threshold, wherein the prompt window is used for indicating a user to confirm whether the quadrangle is used for drawing an annotation frame or not;
the generating the annotation frame based on the quadrilateral position information and the first coordinate point set includes:
and responding to the triggering operation of the confirmation option in the prompt window, and generating the annotation frame based on the position information of the quadrangle and the first coordinate point set.
Therefore, the prompt window prompts the user to confirm whether the quadrangle is used for drawing the annotation frame, and further the situation that the user does not need to display the annotation frame is avoided, and the annotation frame is drawn based on the quadrangle, so that the accuracy and the reliability of displaying the annotation frame are improved.
In a second aspect, an electronic device is provided, where the electronic device includes a processor and a memory, where the memory is configured to store a program for supporting the electronic device to execute the method for displaying an annotation frame provided in the first aspect, and store data related to implementing the method for displaying an annotation frame in the first aspect. The processor is configured to execute a program stored in the memory. In addition, the electronic device may further comprise a communication bus for establishing a connection between the processor and the memory.
Wherein the processor is configured to:
when a note interface is in a first display state, responding to annotation frame insertion operation for target note information at a first position in the note interface, and displaying an annotation frame at the first position, wherein the target note information is any note information in handwritten note information or picture note information included in the note interface;
responding to the input operation of the annotating frame, and displaying annotating information input by the input operation in the annotating frame;
responding to a switching operation of the display state of the note interface, switching the display state of the note interface into a second display state corresponding to the switching operation, and displaying the annotation frame with the annotation information at a second position, so that the relative position of the target note information and the annotation frame is not changed when the note interface is in the second display state.
As one example of the application, the processor is configured to:
when a note interface is in a first display state, responding to annotation frame drawing operation aiming at the target note information at a first position in the note interface, and displaying a corresponding quadrilateral at the first position according to an operation track of the annotation frame drawing operation;
Determining the area of the quadrangle according to a first coordinate point set of a plurality of coordinate points forming the quadrangle;
generating the annotation frame based on the position information of the quadrangle and the first coordinate point set under the condition that the area of the quadrangle is larger than or equal to an area threshold value;
deleting the quadrangle;
displaying the annotation frame at the first position.
As one example of the application, the processor is configured to:
when the area of the quadrangle is larger than or equal to the area threshold value, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of a rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle;
and generating the annotation frame according to the position information of the rectangle and the second coordinate point set.
As one example of the present application, the electronic device includes a note module and an algorithm module;
the processor is configured to:
when the area of the quadrangle is larger than or equal to the area threshold value, the note module sends a rectangle identification message to the algorithm module, wherein the rectangle identification message carries the position information of the quadrangle and the first coordinate point set;
The algorithm module performs contour recognition operation on the quadrangle according to the position information of the quadrangle;
the algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation to obtain the position information of the rectangle and the second coordinate point set;
the algorithm module sends the rectangular position information and the second coordinate point set to the note module.
As an example of the application, the electronic device further comprises a graphic canvas module;
the processor is configured to:
the note module sends a handwritten rectangle deleting message to the graphic canvas module;
and the graphic canvas module deletes the quadrangle.
As an example of the present application, the electronic device further includes an annotation frame drawing module;
the processor is configured to:
the note module sends a drawing message to the annotation frame drawing module, wherein the drawing message carries the position information of the rectangle, the second coordinate point set and the position information of the first position;
the annotation frame drawing module generates the annotation frame according to the position information of the rectangle and the second coordinate point set;
The processor is configured to:
and the annotation frame drawing module displays the annotation frame at the first position according to the position information of the first position.
As one example of the application, the processor is configured to:
the note module responds to the input operation of the annotation frame and sends the annotation information input by the input operation to the annotation frame drawing module;
the annotation drawing module zooms the annotation information according to first size information of the annotation frame, and displays the zoomed annotation information in the annotation frame positioned in the annotation layer, wherein the first size information is the size information of the annotation frame when the note interface is in the first display state;
the note module responds to the exiting editing operation of the annotation frame and sends first size information of the annotation frame and the annotation information to the graphic canvas module;
and the graphic canvas module draws the annotation frame on the graphic layout layer according to the first size information and displays the annotation information in the annotation frame.
As an example of the present application, the processor is further configured to:
And storing a first interface size when the note interface is in the first display state, position information of the first position, first size information of the annotation frame and annotation information displayed in the annotation frame.
As one example of the application, the processor is configured to:
acquiring a second interface size when the note interface is in the second display state;
determining an interface scaling according to the first interface size and the second interface size;
determining second size information of the annotation frame and position information of the second position according to the interface scaling, the position information of the first position and the first size information;
and displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
As one example of the present application, the electronic device includes a note module and a graphic canvas module;
the processor is further configured to:
the note module monitors the display state of the note interface;
the processor is configured to:
the note module acquires a second interface size when the note interface is in the second display state under the condition that the note interface is in the second display state;
The processor is configured to:
the note module sends the second size information, the position information of the second position and the annotation information to the graphic canvas module;
and the graphic canvas module displays an annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
As an example of the present application, the processor is further configured to:
displaying a prompt window in the note interface when the area of the quadrangle is larger than or equal to an area threshold, wherein the prompt window is used for indicating a user to confirm whether the quadrangle is used for drawing an annotation frame or not;
the generating the annotation frame based on the quadrilateral position information and the first coordinate point set includes:
and responding to the triggering operation of the confirmation option in the prompt window, and generating the annotation frame based on the position information of the quadrangle and the first coordinate point set.
In a third aspect, a computer readable storage medium is provided for storing one or more programs, where the one or more programs are configured to be executed by one or more processors, the one or more programs including instructions that, when executed on a computer, cause the computer to perform the method of displaying an annotation box of the first aspect.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of displaying annotation boxes of the first aspect described above.
The technical effects obtained by the second, third and fourth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
Drawings
FIG. 1 is a schematic diagram of an application scenario shown in accordance with an exemplary embodiment;
FIG. 2 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 3 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 4 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 5 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 6 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 7 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 8 is a schematic diagram of an application scenario illustrated in accordance with another exemplary embodiment;
FIG. 9 is a schematic diagram of a software architecture of an electronic device, according to an example embodiment;
FIG. 10 is a flow chart of a method for displaying annotation boxes, according to an example embodiment;
FIG. 11 is a schematic diagram illustrating the location of one layer according to an example embodiment;
FIG. 12 is a flow chart of a method for displaying annotation boxes, according to another exemplary embodiment;
FIG. 13 is a flow chart of a method for displaying annotation boxes, according to another exemplary embodiment;
fig. 14 is a schematic structural view of an electronic device according to another exemplary embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that references to "a plurality" in this disclosure refer to two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, A/B may represent A or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and function. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
With the development of terminal technology, paperless office work and paperless learning have gradually penetrated in people's life. The implementation manner of paperless office work or paperless learning can depend on the note function of the electronic device, and a user can record note information on a note interface in a mode of typing input, inserting pictures, handwriting characters, manual drawing and the like. For example, referring to fig. 1 (a), in a case where the electronic device is a tablet computer and the tablet computer is in a landscape display state, a user may record some information in a note interface displayed by the tablet computer, for example, input text and insert a first picture 1, and in the recording process, the user may annotate the first picture 1, at this time, the user may click a first position where an annotation frame needs to be displayed in the note interface, for example, click a position in the first picture, and then click an "edit" option 2, and in response to a click operation on the "edit" option 2, referring to fig. 1 (b), the tablet computer may display an edit interface 3; the user can click on the option of inserting endorsements in the editing interface; in response to the clicking operation on the "insert annotation" option, referring to fig. 1 (c), the tablet computer may display an annotation frame 4 at the first position, that is, may display the annotation frame 4 in the first picture 1, where the annotation frame 4 is an annotation frame for annotating the first picture; referring to fig. 1 (d), the user may input annotation information in the annotation box 4. Then, the user may switch the display state of the note interface, for example, referring to (e) in fig. 1, the user switches the tablet computer from the horizontal screen display state to the vertical screen display state; in the case that the display state of the tablet computer is changed to the vertical screen display state, the display state of the note interface is also changed from the horizontal screen display state to the vertical screen display state, and in addition to the handwritten note information and the note information of the picture types in the note interface which is changed to the vertical screen display state, the rest note content is rearranged, so that the position of the annotation frame 4 originally displayed in the first picture 1 is changed, and the annotation frame 4 is displayed in other positions, see (f) in fig. 1, so that the user cannot clearly make the annotation information in the annotation frame 4 about which part of note information in the note interface is, and the accuracy of annotating the note information is reduced.
In order to improve the annotation accuracy of the note information, the embodiment of the application provides a display method of an annotation frame, after annotating any one handwritten note information or picture note information, if the display state of a note interface changes, the relative position between the annotation frame carrying the annotation information and the aimed note information cannot change, so that even if the display state of the note interface changes, the user can know which part of note information is aimed by the annotation information in the annotation frame, and the annotation accuracy of the note information is improved.
For easy understanding, before describing the method provided by the embodiment of the present application in detail, an application scenario related to the embodiment of the present application is described next by taking an example that the electronic device is a tablet computer and the tablet computer has a note function.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an application scenario according to an exemplary embodiment. In a possible scenario, when the tablet pc is in the landscape display state and the user records the note information in the note interface, if the first picture 1 in the note information needs to be annotated, referring to the (a) diagram in fig. 2, the user may click on a position in the first picture 1 and then click on the "edit" option 2; in response to a click operation on "edit" option 2, referring to fig. 2 (b), the tablet may display an edit interface 3; the user can click on the "insert annotation" option in the editing interface 3; in response to a click operation on the "insert annotation" option, referring to fig. 2 (c), the tablet computer may display an annotation box 4 at a position in the first picture 1 that the user clicked before; referring to fig. 2 (d), the user may input annotation information in the annotation box 4. Then, the user may switch the state of the note interface, for example, referring to (e) in fig. 2, the user switches the tablet computer from the horizontal screen display state to the vertical screen display state; referring to fig. 2 (f), when the display state of the tablet pc is changed to the portrait display state, the display state of the note interface is also changed from the landscape display state to the portrait display state, and the relative position between the annotation frame 4 and the first picture 1 in the note interface that is changed to the portrait display state is not changed.
It should be noted that, the annotation frame displayed in the diagram (c) in fig. 2 may be in an editable state, and the tablet computer may display an input keyboard while displaying the annotation frame, or may display the input keyboard after displaying the annotation frame.
As an example of the present application, referring to fig. 3 (a), if a user needs to annotate the first picture 1 in the process of recording note information in the note interface when the tablet computer is in the landscape display state, the user may draw a quadrangle 5 at a position on the first picture 1; the tablet personal computer responds to the drawing operation of drawing the quadrangle by the user, can display the quadrangle drawn by the user on the first picture 1 according to the operation track of the drawing operation, and detects the area of the quadrangle. In the case where the area of the quadrangle is greater than or equal to the area threshold, referring to the (b) diagram in fig. 3, the tablet pc may delete the quadrangle and display the annotation frame 4 at the location of the quadrangle; referring to fig. 3 (c), the user may input annotation information in the annotation box 4; after the input is finished, the user can exit the editing operation of the annotation frame; referring to fig. 3 (d), in response to the user exiting the editing operation of the annotation frame 4, the tablet computer may place the annotation frame 4 in a non-editable state, and the annotation frame may display annotation information input by the user. Then, the user may switch the state of the note interface, for example, referring to (e) in fig. 3, the user switches the tablet computer from the horizontal screen display state to the vertical screen display state; referring to fig. 3 (f), when the display state of the tablet pc is changed to the portrait display state, the display state of the note interface is also changed from the landscape display state to the portrait display state, and the relative position between the annotation frame 4 and the first picture 1 in the note interface that is changed to the portrait display state is not changed.
The area threshold is a threshold preset according to the requirement, for example, the area threshold may be 2 times the area occupied by the small four fonts, 2 times the area occupied by the four fonts, or 3 times the area occupied by the four fonts.
As an example, the tablet computer may be switched from not only the landscape display state to the portrait display state, but also from the portrait display state to the landscape display state, in which case the relative position between the first picture and the annotation frame with the annotation information will not change.
As an example of the present application, in a case where the tablet pc is in a landscape display state, if the user needs to draw an annotation frame based on a quadrangle, referring to the (a) diagram in fig. 4, the user may draw a quadrangle 5 on the first picture 1, and the tablet pc may display the quadrangle 5 on the first picture 1 according to an operation track of the drawing operation in response to the drawing operation of the user, and detect an area of the quadrangle. In the case that the area of the quadrangle is greater than or equal to the area threshold, referring to the (b) diagram in fig. 4, the tablet computer may display a prompt window 6 in the note interface, where the prompt window 6 is used to instruct the user to confirm whether the quadrangle is used to draw the annotation frame, and prompt information of "whether to draw the annotation frame", "confirm" option and "cancel" option is displayed in the prompt window; if the user clicks the "confirm" option, the tablet computer may delete the quadrangle and display the annotation frame at the location of the quadrangle in response to the clicking operation of the "confirm" option, see (c) diagram in fig. 4. And then, the user can input annotation information in the displayed annotation frame so as to realize annotation of the first picture.
As one example, if the user clicks the "cancel" option, it is explained that the quadrilateral drawn by the user is part of the note information, and the user is not to draw the annotation box based on the quadrilateral, so the tablet computer continues to display the quadrilateral in response to clicking the "cancel" option.
As an example of the present application, in a case where the tablet pc is in a landscape display state, referring to fig. 5 (a), after the tablet pc displays the annotation frame 4 on the first picture 1 under the operation of the user, if the user wants to perform the split-screen operation on the note interface, the user may slide inward from the left or right of the screen for a certain distance and then pause (in the illustration, the sliding inward from the left of the screen is illustrated); responding to a split screen operation triggered by a user, referring to the (b) diagram in fig. 5, the tablet computer displays a note interface and a desktop of the tablet computer in a split screen mode, the note interface is displayed on the right side of the screen, and the desktop is displayed on the left side of the screen; after the split screen display of the note interface, the relative position between the first picture 1 and the corresponding annotation frame 4 in the note interface is not changed, i.e. the annotation frame 4 is still displayed in the first picture 1.
When the note interface is switched from the split screen display state to the full screen display state, the relative position between the first picture 1 and the annotation frame 4 with the annotation information is not changed.
As an example, the split screen display of the note interface may include an up-down split screen display and a left-right split screen display, and the drawing of the embodiment of the present application only uses the tablet computer as the horizontal screen display state, and the note interface is displayed by way of the left-right split screen display for illustration, which is not limited to the embodiment of the present application.
As an example of the present application, in a case where the tablet pc is in a landscape display state, referring to fig. 6 (a), after the tablet pc displays the annotation frame 4 in the first picture 1 under the operation of the user, if a hover window button is displayed in the note interface, in a case where the user wants to display the note interface in the hover window, the user may click on the hover window button 7; in response to a click operation of the floating window button 7 by the user, referring to (b) of fig. 6, the tablet computer may display a note interface in a floating window displayed on the desktop of the tablet computer; after the note interface is displayed in the floating window, the relative position between the first picture 1 and the annotation frame 4 in the note interface is not changed, i.e. the annotation frame 4 is still displayed in the first picture 1.
It should be noted that, after the note interface is switched from the floating window to the full-screen display state, the relative position between the first picture 1 and the annotation frame 4 will not change.
As an example of the present application, the note function of the electronic device may be implemented by an installed note application, so that, for more convenient management of note information, a user may open the note application through different devices and log in the same account in the note application, thereby implementing note information sharing between different devices. For example, in the case where the tablet pc is in the landscape display state, referring to fig. 7 (a), the user may record the note information in the note interface of the note application program, where the note information includes the first picture 1, and the annotation frame 4 is displayed on the first picture 1, where the user may log in the background server 8 of the note application program through the first login information, and after the user triggers the storage operation of the note information, the tablet pc may upload the note information and the note title "future week weather forecast" of the note information to the background server 8, so that the background server 8 stores the note title and the note information in correspondence. Then, if the user has a need of displaying the note information through the mobile phone, the user can open the note application program through the mobile phone and log in to the background server 8 of the note application program through the first login information, so that the mobile phone can acquire at least one note corresponding to the first login information from the background server, and display a note title of at least one note corresponding to the first login information in an application interface of the note application, and the user can click a note title of 'future week weather forecast'; the mobile phone responds to clicking operation of a user on a note title of 'future week weather forecast', a note interface shown in a graph (b) in fig. 7 is displayed, note information is displayed in the note interface, the note information comprises a first picture 1 and an annotation frame 4, and the relative position between the first picture 1 and the annotation frame 4 is unchanged.
As an example of the present application, in the case where the tablet pc is in the landscape display state, referring to fig. 8 (a), after the tablet pc displays the annotation frame 4 in the first picture 1 under the operation of the user, the user may adjust the size of the window where the note interface is located, and illustratively, the user may adjust the width of the window; in response to an adjustment operation of a user on the width of the window where the note interface is located, the width of the note interface is reduced according to the moving direction of the adjustment operation of the user, and the note interface shown in the (b) diagram in fig. 8 is displayed, wherein the relative position between the first picture 1 and the annotation frame 4 in the note interface is unchanged.
It should be noted that, the embodiment of the present application is only described by taking the application scenario shown in fig. 2-8 as an example, and the embodiment of the present application is not limited to the above description.
The software system of the electronic device 100 will be described next.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, an Android (Android) system with a layered architecture is taken as an example, and a software system of the electronic device 100 is illustrated.
Fig. 9 is a block diagram of a software system of the electronic device 100 according to an embodiment of the present application. Referring to fig. 9, the hierarchical architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run time) and system layer, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 9, the application package may include a note application or the like, and the note application is an application having a note function, and the note application may be a memo or the like, for example.
In some embodiments, the application layer may further include a note module and an algorithm module, where the note module and the algorithm module are each configured to implement a note function of the note application.
As an example, the note module is configured to receive note information and annotation information recorded by a user, and may monitor a display state of a note interface.
As one example, the algorithm module is configured to perform a contour recognition operation and a boundary fitting operation on a quadrilateral drawn by a user.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 9, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like. The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data, which may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc., and make such data accessible to the application. The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to construct a display interface for an application, which may be comprised of one or more views, such as a view that includes displaying a text notification icon, a view that includes displaying text, and a view that includes displaying a picture. The telephony manager is used to provide communication functions of the electronic device 100, such as management of call status (including on, off, etc.). The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like. The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. For example, a notification manager is used to inform that the download is complete, a message alert, etc. The notification manager may also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as a notification of a background running application. The notification manager may also be a notification that appears on the screen in the form of a dialog window, such as a text message being prompted in a status bar, a notification sound being emitted, the electronic device vibrating, a flashing indicator light, etc.
In some embodiments, the application framework layer may also include a teletext canvas module and an annotation frame rendering module.
As one example, the teletext canvas module is used to display the note information and annotation information recorded by the user. The annotation frame drawing module is used for drawing the annotation frame.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system. The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules, such as: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc. The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the original input event. Taking the touch operation as a click operation, the control corresponding to the click operation is a control of a camera application icon as an example, the camera application calls an interface of an application program framework layer, starts the camera application, calls a kernel layer to start a camera driver, and captures a still image or video through a camera 193.
Based on the execution subject and the application scenario provided by the above embodiment, the method for displaying the annotation frame provided by the embodiment of the present application is described next. Referring to fig. 10, fig. 10 is a flowchart illustrating a method for displaying an annotation box according to an exemplary embodiment. By way of example, and not limitation, the method is applied to an electronic device with a note application, and the electronic device is illustrated by using a plurality of module interaction implementations shown in fig. 9, where the method may include some or all of the following:
Step 1001: the note taking application receives a start operation.
Under the condition that the electronic equipment is provided with the note application program, if the user needs to record note information, the user can open the note application program at any time, and accordingly, the note application program detects a starting operation.
Step 1002: the note application program displays an application interface and starts a note module and an algorithm module.
When the notebook application program receives the starting operation, an application interface can be displayed, and as can be seen from the above, the notebook module and the algorithm module are modules for realizing the notebook function of the notebook application program, and the notebook module can be used for receiving the notebook information and the annotation information recorded by the user, so that the notebook application program starts the notebook module. In addition, because the user is likely to annotate the recorded note information by drawing the quadrangle at any time in the process of recording the note, and the algorithm module can perform contour recognition operation and boundary fitting operation on the quadrangle drawn by the user, the note application program can also start the algorithm module for drawing the annotation frame based on the quadrangle.
It should be noted that at least one history note title may be displayed in the application interface, where the at least one history note title is a title corresponding to at least one note information recorded by the note application program before the current time.
Step 1003: the note application program displays a note interface under the condition that a note display operation in the application interface is received.
It should be noted that, the triggering of the note display operation by the user may include various manners, for example, the user may click on a "create" option in the application interface, so that the note application may receive the note display operation. Wherein, the note interface displayed in response to the "create" option is a blank note interface created and displayed for the note application. Or, the user has created a note in the note application program, for some notes, the user may need to edit, at this time, the user may click on a note title to be edited, and the electronic device may display a note interface carrying note information corresponding to the note title in response to the click operation of the user on the selected note title.
The embodiment of the present application is described by taking the above two modes of displaying the note interface as examples only, and the embodiment of the present application is not limited to the configuration.
Step 1004: the note module receives note information recorded by the recording operation.
The user can record the note information to be recorded in the note interface, and in the recording process, the note module can receive the note information recorded by the user through the recording operation.
As an example, in the case where there is the note information in the note interface, if the user does not re-record the note information but annotates the target note information on the basis of the existing note information, the following operation of step 1007 may be directly performed. If the user needs to edit the note information, or the electronic device displays a blank note interface, the user records the note information in the blank note interface, so that the note module can receive the note information recorded by the recording operation of the user, and execute the following operations of 1005 and 1006 after receiving the note information.
The target note information is any note information of the handwritten note information or the picture-like note information included in the note interface.
Step 1005: in the case that the note information includes handwritten note information and picture-type note information, the note module transmits the handwritten note information and the picture-type note information to the graphic canvas module.
Step 1006: the graphic canvas module displays the handwritten note information and the note information of the picture class on the graphic layout layer.
Because the graphic canvas module is used for displaying the note information and the annotation information recorded by the user, the graphic canvas module can display the note information on the graphic layout layer under the condition of receiving the note information sent by the note module.
The picture and text picture layout layer is a picture layer drawn by the picture and text canvas module for realizing the information display function. For example, referring to fig. 11 (a), the graphic canvas module includes a graphic layout layer and a handwriting layer, and the handwriting layer is located above the graphic layout layer, and the graphic canvas module may display the input text information, the note information of the picture, the drawn image and the like through the graphic layout layer, and the handwriting layer is used for displaying the text information handwritten by the user. In addition, the image-text-picture layout layer and the handwriting layer are respectively the same as the size of the note interface, and the image-text-picture layout layer and the handwriting layer are invisible on the note interface. In order to distinguish the handwriting layer from the graphic-text picture layer, the background pattern is added to the graphic-text canvas in the drawings of the embodiment of the application for illustration.
Step 1007: the note module receives an annotation box drawing operation for the target note information at a first location in the note interface with the note interface in a first display state.
It should be noted that, the first display state may be a state where the note interface is located in the process of recording the note information in the steps 1103-1106, and the first display state may be a horizontal screen display state, a full screen display state, or a split screen display state.
In this case, the user may perform annotation drawing operation on the target note information at the first position in the note interface, so that the note module may receive annotation frame drawing operation on the target note information at the first position in the note interface. For example, the process may refer to the application scenario shown in fig. 2 or fig. 3 described above.
The first position is a position capable of indicating that the annotation frame is an annotation made for the target note information.
Step 1008: the note module sends a display message to the graphic canvas module, wherein the display message carries an operation track of annotation frame drawing operation.
Step 1009: and the graphic canvas module displays the corresponding quadrangle at the first position according to the operation track of the annotation frame drawing operation.
As an example, referring to fig. 11 (a), the graphic canvas module may display a quadrilateral on the graphic layout layer.
For example, the scene in which the graphic canvas module displays a quadrangle may refer to the application scene shown in the above-mentioned (a) diagram of fig. 3.
Step 1010: the graphic canvas module sends a first coordinate point set of a plurality of coordinate points forming a quadrilateral to the note module.
It should be noted that the quadrangle is displayed at the first position of the graphic and painting layout layer.
As an example, the graphic canvas module may construct a coordinate system on the note interface such that in the case where a quadrilateral is displayed on the graphic layout layer, the graphic layout layer may obtain a first set of coordinate points of a plurality of coordinate points that make up the quadrilateral.
For example, the graphic canvas module may establish a direct coordinate system with a lower left end point of the note interface as a coordinate center, a straight line where a lower boundary of the note interface is located as an abscissa, and a straight line where a left boundary of the note interface is located as an ordinate. Of course, in the embodiment of the present application, only the direct coordinate system is constructed as an example, and the graphic canvas module may also construct other coordinate systems, and the manner of constructing the rectangular coordinate system by the graphic canvas module is described as an example, which does not limit the embodiment of the present application.
It should be noted that, in the case that the coordinate system constructed by the graphic canvas module is a rectangular coordinate system, the coordinates of each coordinate point in the first coordinate point set may be represented by (x, y).
Step 1011: the note module determines the area of the quadrangle according to the first coordinate point set.
Since the user may draw a quadrangle for annotating during the process of recording the note information, or may write a character having a shape similar to that of the quadrangle, such as writing a "mouth" character, during the process of handwriting the note information, in this case, the quadrangle is not used for generating the annotating frame, and since the size of the written character of the user is limited, the note module may determine the area of the quadrangle according to the first coordinate point set.
As one example, the note module may determine respective side lengths of the quadrangle according to the first coordinate point set, and then determine an area of the quadrangle through the respective side lengths of the quadrangle. Or, the note module may determine the number of pixels occupied by the quadrangle according to the first coordinate set, and then multiply the area size corresponding to each pixel by the number of pixels occupied by the quadrangle to obtain the area of the quadrangle.
It should be noted that, the size of the area corresponding to each pixel may be preset, which is not limited in the embodiment of the present application.
Step 1012: and under the condition that the area of the quadrangle is larger than or equal to the area threshold value, the note module sends a rectangle identification message to the algorithm module.
The rectangular identification message carries quadrilateral position information and a first coordinate point set. And because the user draws the quadrangle at the first position, the position information of the quadrangle can be the position information of the first position, of course, the position information of the quadrangle can be determined according to the first coordinate point set, and the position information of the quadrangle can be the coordinates of any one endpoint of the quadrangle, or the coordinates of the center point of the quadrangle, and the like.
Since it is highly likely that the user would like to draw the annotation box by the quadrangle in the case where the area of the quadrangle is greater than or equal to the area threshold, the note module can send a rectangle recognition message to the algorithm module.
In some embodiments, in the case that the area of the quadrangle is smaller than the area threshold, the quadrangle is described as a part of the handwriting of the user, and is not used for drawing the annotation frame, and in this case, the image-text drawing module may transfer the quadrangle to the handwriting layer for display.
Step 1013: and the algorithm module performs contour recognition operation on the quadrangle according to the position information of the quadrangle.
Because the rectangle identification information carries the position information of the quadrangle and the quadrangle has a clearer outline under normal conditions, the algorithm module can determine the position of the quadrangle from the graphic and text picture layout layer according to the position information of the quadrangle, and then perform outline identification operation on the quadrangle at the position of the quadrangle.
In some embodiments, the algorithm module may perform image binarization processing on the image layer of the image drawing as an image under the condition that the rectangular recognition message is received, then determine the position of the quadrangle from the binarized image according to the position information of the quadrangle, and perform contour recognition operation on the quadrangle at the position of the quadrangle.
Step 1014: and the algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation to obtain the position information of the rectangle and the second coordinate point set.
The algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation, so that the obtained boundary fitting result is 4 line segments, the 4 line segments can form a rectangle, and meanwhile, the algorithm module can determine a fitting formula corresponding to the four line segments in coordinates established by the graphic canvas module according to the first coordinate point set, and the position information and the second coordinate point set of the rectangle can be determined through the fitting formula.
Step 1015: the algorithm module sends the rectangular position information and the second coordinate point set to the note module.
Step 1016: the note module receives the position information of the rectangle and the second coordinate point set.
Step 1017: the note module sends a delete handwritten rectangle message to the teletext canvas module.
Since the annotation frame needs to be displayed at the first position later, the note module needs to send a handwritten rectangle deleting message to the graphic canvas module under the condition that the position information of the rectangle and the second coordinate point set are received.
Step 1018: the graphic canvas module receives and deletes the handwritten rectangular message.
Step 1019: the graphic canvas module deletes the quadrangle.
Because the quadrangle is displayed on the graphic and painting layout layer drawn by the graphic and painting canvas module, the graphic and painting canvas module can delete the quadrangle displayed on the graphic and painting layout layer under the condition of receiving the deleted handwritten rectangular message.
Step 1020: and the note module sends a drawing message to the annotation frame drawing module under the condition that the quadrangle is detected to be deleted.
In one possible case, the drawing message carries position information of the rectangle, the second coordinate point set, and position information of the first position.
Although the quadrangle is drawn at the first position, the position of the rectangle obtained after the boundary fitting operation may be shifted, that is, the position of the rectangle may not be at the first position, so that the drawing message needs to carry the position information of the first position.
In another possible case, since the rectangle is used for generating the annotation frame, the size of the rectangle is the same as that of the annotation frame, the position of the rectangle is the same as that of the annotation frame, and the annotation frame can be drawn through the positions of the four endpoints of the rectangle, the note module can obtain the coordinate information of the four endpoints of the rectangle from the second coordinate point set, and then send a drawing message to the graphic canvas module, wherein the drawing message carries the position information of the rectangle, the coordinate information of the four endpoints of the rectangle and the position information of the first position.
In yet another possible case, the note module may obtain coordinates of at least 2 endpoints from the second coordinate set, and then send a drawing message to the graphic canvas module, where the drawing message carries location information of the rectangle, coordinate information of at least 2 endpoints, location information of the first location, and area information of the rectangle. The embodiment of the present application is not particularly limited thereto.
Step 1021: the annotation box rendering module receives the rendering message.
Step 1022: and the annotation frame drawing module generates an annotation frame according to the position information of the rectangle carried in the drawing message and the second coordinate point set.
If the drawing message carries the position information of the rectangle, the second coordinate point set and the position information of the first position, then the annotation frame drawing module may generate the annotation frame according to the operation of step 1022 according to the position information of the rectangle and the second coordinate point set when receiving the drawing message.
In some embodiments, the annotation frame drawing module may cover the annotation block layer on the handwriting layer under the condition that the drawing message is received, and then generate the annotation frame according to the position information of the rectangle and the second coordinate point set.
Illustratively, as shown in the (b) diagram of fig. 11, the size of the annotation block layer may be the size of a rectangle or slightly larger than the size of a rectangle, and the position information of the annotation block layer is the same as the position information of the rectangle. Alternatively, the size of the annotation block layer may be the same as the size of the graphic and text layer, which is not particularly limited in the embodiment of the present application. In addition, in order to distinguish the annotation block layer from other layers, black-painted annotation block layers are taken as examples in the drawings of the embodiment of the application.
In some embodiments, since the information carried by the drawing message further includes other possibilities, the manner in which the annotation frame drawing module generates the annotation frame further includes other possibilities, for example, in a case where the drawing message carries the position information of the rectangle, the coordinate information of the four endpoints of the rectangle, and the position information of the first position, the annotation frame drawing module generates the annotation information according to the position information of the rectangle and the coordinate information of the four endpoints of the rectangle. Under the condition that the drawing information carries the position information of the rectangle, the coordinate information of at least 2 endpoints, the position information of the first position and the area information of the rectangle, the annotation frame drawing module generates an annotation frame according to the position information of the rectangle, the coordinate information of at least 2 endpoints and the area information of the rectangle.
Step 1023: and the annotation frame drawing module displays the annotation frame at the first position according to the position information of the first position.
Note that, since the annotation frame for the target note information needs to be displayed at the first position, the annotation frame drawing module needs to display the annotation frame at the first position.
In some examples, the annotation box rendering module displays the annotation box at the first location in an editable state. For example, the scene in which the annotation box is displayed at the first position may refer to the application scene shown in the (b) diagram in fig. 3 described above.
Step 1024: the note module receives an input operation to the annotation box.
Because the annotation frame displayed by the annotation frame drawing module is in an editable state, a user can input annotation information in the annotation frame, and the note module can receive input operation of the user on the annotation frame. For example, the process may refer to the application scenario shown in the (c) diagram in fig. 3 described above.
Step 1025: and the note module sends the annotation information input by the input operation to the annotation frame drawing module.
Since the annotation frame is displayed on the annotation frame layer, the annotation information input to the annotation frame needs to be displayed on the annotation frame layer, and therefore the note module needs to send the annotation information input by the input operation to the annotation frame drawing module.
Step 1026: the annotation drawing module receives annotation information.
Step 1027: and the annotation frame drawing module zooms the annotation information according to the first size information of the annotation frame, and displays the zoomed annotation information in the annotation frame positioned in the annotation layer.
Because the size of the annotation frame is limited, in order to ensure that the annotation information can be completely displayed in the annotation frame, the annotation drawing module scales the annotation information according to the first size information of the annotation frame when the annotation information is required, and displays the scaled annotation information in the annotation frame positioned in the annotation layer. For example, the process may refer to the application scenario shown in the (d) diagram in fig. 3 described above.
In some embodiments, since the input operation is a dynamic operation, the operation of scaling the annotation information according to the first size information of the annotation frame by the annotation drawing module is also a dynamic operation, and the larger the text amount in the annotation information, the smaller the font of the annotation information displayed in the annotation frame.
Step 1028: the note module receives an exit edit operation for the annotation box.
As an example, the exit editing operation may be an operation triggered when the user clicks a position other than the annotation box, or may be other operations, for example, an exit editing option is displayed in the note interface, and the user may click the exit editing option, so as to trigger the exit editing operation. The embodiment of the present application is not particularly limited thereto.
Step 1029: the note module sends the first size information and the annotation information of the annotation frame to the graphic canvas module.
Because the annotation frame is in an editing state under the condition that the annotation frame is displayed in the annotation layer, after the annotation frame exits the editing state, the annotation frame and the annotation information in the annotation frame need to be displayed on the graphic layout layer for convenience of management, and therefore the note module needs to send the first size information and the annotation information of the annotation frame to the graphic canvas module.
Step 1030: the graphic canvas module receives first size information and annotation information of the annotation frame.
Step 1031: the graphic canvas module draws the annotation frame on the graphic layout layer according to the first size information and displays the annotation information in the annotation frame.
For example, referring to fig. 11 (b), annotation information and annotation boxes may be displayed on the graphic layout layer.
Step 1032: the note module stores first interface size, position information of a first position, first size information of the annotation frame and annotation information displayed in the annotation frame when the note interface is in a first display state.
In order to avoid the dislocation of the relative position between the annotation frame and the corresponding target note information in the note interface after the display state of the note interface is switched, the note module can store the first interface size, the position information of the first position, the first size information and the annotation information.
Step 1033: the note module monitors the display state of a note interface.
As an example of the present application, the note module may monitor the display state of the note interface in real time. Or monitor the display state of the note interface according to a specified time interval, where the specified time interval may be preset according to requirements, for example, the specified time interval may be 10 seconds, 30 seconds, 60 seconds, or the like. Or, in the case that the user pauses the recording operation of the note information in the note interface, the display state of the note interface is monitored, which is not particularly limited in the embodiment of the present application.
Because the display state of the note interface may change at any time, in order to avoid missing the change of the display state of the note interface, in general, the note module may monitor the display state of the note interface in real time.
Step 1034: and under the condition that the display state of the note interface is monitored to be switched to the second display state, the note module acquires the second interface size when the note interface is in the second display state.
In the process of recording the note information by using the note interface, the user may switch the note interface from the horizontal screen display state to the vertical screen display state, or switch the note interface from the vertical screen display state to the horizontal screen display state, or switch the note interface from the full screen display state to the split screen display state, or switch the note interface from the split screen display state to the full screen display state, or switch the note interface from the full screen display state to the state displayed in the floating window, and so on, so that the second display state has multiple possibilities. And the second display state is different from the first display state, wherein switching the note interface from the first display state to the second display state may mean that the size of the note interface is changed, that is, the size of the note interface in the first display state is different from the size of the note interface in the second display state.
Since the interface size of the note interface will also change when the display state of the note interface changes, and the size of the note interface will affect the typesetting of the note information in the note interface. Therefore, when the note module monitors that the display state of the note interface is switched to the second display state, the second interface size when the note interface is in the second display state needs to be acquired.
Step 1035: the note module determines an interface scaling based on the first interface size and the second interface size.
The first interface size includes a first long side and a first wide side of the note interface in a first display state, and the second interface size includes a second long side and a second wide side of the note interface in a second display state. And in the case of a note interface scaling, the broadside scaling and the long-side scaling may be different, and thus, the interface scaling includes the broadside scaling and the long-side scaling.
As one example, in the case where the display state of the note interface is changed, at least one of the long side and the wide side of the note interface is changed. Under the condition that the long side of the note interface is unchanged and the wide side of the note interface is changed, the wide side scaling ratio between the first wide side and the second wide side of the note interface can be determined, and the long scaling ratio is determined to be 1:1. when the wide edge of the note interface is unchanged and the long edge of the note interface is changed, the long-edge scaling between the first long edge and the second long edge of the note interface can be determined, and the wide-edge scaling is determined to be 1:1. In the case where both the wide and long sides of the note interface change, a long side scaling between the first long side and the second long side of the note interface and a width ratio scaling between the first wide side and the second wide side of the note interface may be determined.
In the embodiment of the present application, the operation of determining the interface scaling is described as an example, and the embodiment of the present application is not limited thereto.
For example, when the first long side is 2000 device independent pixels (device independent pixels, dp) and the first wide side is 1000dp, if the note interface is switched from the full-screen display state to the split-screen display state displayed in a left-right manner, as in the application scenario shown in fig. 5 (b), the wide side of the note interface is unchanged but the long side is changed, and therefore, the second long side of the note interface in the split-screen display state is 1000dp and the second wide side is 1000dp. Then the broadside scaling is 2:1 and the long side scaling is 1:1.
For example, when the first long side is 2000dp and the first wide side is 1000dp, if the note interface is switched from the horizontal screen display state to the vertical screen display state, as in the application scenario shown in (e) and (f) of fig. 3, both the wide side and the long side of the note interface are changed, and the second long side of the note interface in the vertical screen display state is 1000dp and the second wide side is 2000dp. Then the broadside scaling is 1:2 and the long side scaling is 2:1.
Step 1036: the note module determines second size information of the annotation frame and position information of the second position according to the interface scaling, the position information of the first position and the first size information.
As can be seen from the above description, the interface scaling includes a wide-side scaling and a long-side scaling, and therefore, the note module may determine the second size information and the position information of the second position of the annotation frame according to the wide-side scaling and the long-side scaling.
In one case, when the long-side scaling is 1:1 and the wide-side scaling is not 1:1, the note module may divide the wide-side information in the first size information by the wide-side scaling to obtain the wide-side information in the second size information, and determine the long-side information of the first size information as the long-side information in the second size information.
Illustratively, in the case where the long side scaling is 1:1 and the wide side scaling is 2:1, if the long side information in the first size information is 200dp and the wide side information is 100dp, the long side information in the second size information is 200dp and the wide side information is 50dp.
In another case, in the case that the long-side scaling is not 1:1 and the wide-side scaling is 1:1, the note module may divide the long-side information in the first size information by the long-side scaling to obtain the long-side information in the second size information, and determine the wide-side information of the first size information as the wide-side information in the second size information.
Illustratively, in the case where the long side scaling is 2:1 and the wide side scaling is 1:1, if the long side information in the first size information is 200dp and the wide side information is 100dp, the long side information in the second size information is 100dp and the wide side information is 100dp.
In still another case, in the case that the long-side scaling is not 1:1 and the wide-side scaling is not 1:1, the note module may divide the long-side information in the first size information by the long-side scaling to obtain long-side information in the second size information, and place the wide-side information in the first size information in the wide-side scaling to obtain the wide-side information in the second size information.
Illustratively, in the case where the long side scaling is 1:2 and the wide side scaling is 2:1, if the long side information in the first size information is 200dp and the wide side information is 100dp, the long side information in the second size information is 400dp and the wide side information is 50dp.
In some embodiments, the location information of the first location may be represented by coordinates, and thus, the note module may determine the location information of the second location based on the coordinates of the first location and the interface scale.
In one case, in the case where the long-side scaling is not 1:1 and the wide-side scaling is 1:1, the note module may divide the abscissa of the first location by the long-side scaling to obtain the abscissa of the second location, and determine the ordinate of the first location as the ordinate of the second location.
Illustratively, where the first location has coordinates (1500,500) and the long side scaling is 2:1 and the wide side scaling is 1:1, the second location has coordinates (750, 500).
In another case, in the case where the long-side scaling is 1:1 and the wide-side scaling is not 1:1, the note module may divide the ordinate of the first position by the wide-side scaling to obtain the ordinate of the second position, and determine the abscissa of the first position as the abscissa of the second position.
Illustratively, where the first location has coordinates (1500,500) and the long side scaling is 1:1 and the wide side scaling is 2:1, the second location has coordinates (1500, 250).
In yet another case, in a case where the long-side scaling is not 1:1 and the wide-side scaling is not 1:1, the note module may divide the ordinate of the first location by the wide-side scaling to obtain the ordinate of the second location, and divide the abscissa of the first location by the long-side scaling to obtain the abscissa of the second location.
Illustratively, where the first location has coordinates (1500,500) and the long side scaling is 1:2 and the wide side scaling is 2:1, the second location has coordinates (750, 250).
Step 1037: and the note module sends the second size information, the position information of the second position and the annotation information to the graphic canvas module.
Because the annotation frame needs to be displayed on the graphic layout layer, the note module needs to send the second size information, the position information of the second position and the annotation information to the graphic canvas module.
Step 1038: the graphic canvas module receives the second size information, the position information of the second position and the annotation information.
Step 1039: and the graphic canvas module displays an annotation frame with annotation information at the second position according to the second size information and the position information of the second position.
The graphic canvas module may display the annotation frame at the second location of the graphic layout layer according to the second size information and the location information of the second location, and then display the annotation information in the annotation frame, or the graphic canvas module may display the annotation frame and the annotation information at the second location of the graphic layout layer at the same time, which is not particularly limited in the embodiment of the present application.
In the embodiment of the application, after annotating any handwritten note information or picture note information, if the display state of the note interface changes, the relative position between the annotating frame carrying the annotating information and the aimed note information does not change, so that even if the display state of the note interface changes, the user can know which part of note information in the annotating frame is aimed at, and the annotating accuracy of the note information is improved.
Based on the execution subject and the application scenario provided by the above embodiment, the method for displaying the annotation frame provided by the embodiment of the present application is described next. Referring to fig. 12, fig. 12 is a flowchart of another method for displaying an annotation box according to an exemplary embodiment. By way of example, and not limitation, the method is applied to an electronic device with a note application, and the electronic device is illustrated by using a plurality of module interaction implementations shown in fig. 9, where the method may include some or all of the following:
steps 1201-1211 may refer to steps 1001-1011 described above, and the embodiments of the present application will not be described in detail.
Step 1212: and displaying a prompt window in the note interface by the note module under the condition that the area of the quadrangle is larger than or equal to the area threshold value.
Note that, the prompt window is used to instruct the user to confirm whether the quadrangle is used to draw the annotation box. For example, the scene of displaying the prompt window may refer to the application scene shown in fig. 4.
Since the area of the quadrangle is larger than or equal to the area threshold, the quadrangle can be used for drawing the annotation frame, but the user may simply need to record one quadrangle in the note information and does not need to annotate, so that in order to avoid misoperation, the note module can display the prompt window in the note interface when the area of the quadrangle is larger than or equal to the area threshold.
In some examples, in the case that the area of the quadrangle is greater than or equal to the area threshold, the note module may also send the rectangle identification message directly to the law module according to the operation of step 1012, and in the case that the note module described in step 1217 below receives the location information of the rectangle and the second coordinate point set, the prompt window is displayed, that is, in the embodiment of the present application, the prompt window may be displayed when the area of the quadrangle is greater than or equal to the area threshold, or may be displayed after the rectangle identification operation is performed, which is not limited in this embodiment of the present application.
Step 1213: and the note module responds to the triggering operation of the confirmation option in the prompt window and sends a rectangle identification message to the algorithm module.
Because the note module indicates that the user wishes to draw a quadrangle for generating the annotation frame when receiving the triggering operation of the user to the confirmation option in the prompt window, the note module can send a rectangle identification message to the algorithm module.
The steps 1214-1240 may refer to the operations of steps 1013-1239 described above, which are not particularly limited by embodiments of the present application.
In the embodiment of the application, after annotating any handwritten note information or picture note information, if the display state of the note interface changes, the relative position between the annotating frame carrying the annotating information and the aimed note information does not change, so that even if the display state of the note interface changes, the user can know which part of note information in the annotating frame is aimed at, and the annotating accuracy of the note information is improved.
It should be noted that, the foregoing is described taking an example of a method for displaying an annotation frame by the electronic device through interaction of a plurality of modules shown in fig. 9, and next, for further understanding of the embodiments of the present application, the method is described taking an example of execution of the method by the electronic device with a note function, please refer to fig. 13, and fig. 13 is a flowchart illustrating another method for displaying an annotation frame according to an exemplary embodiment. By way of example and not limitation, the method may include some or all of the following:
step 1301: in response to an annotation frame insertion operation for the target note information at a first location in the note interface with the note interface in a first display state, the annotation frame is displayed at the first location.
The target note information is any note information of the handwritten note information or the picture-like note information included in the note interface. The first position is a position adjacent to the target note information, or is any one of positions where the target note information is located.
In the process of recording the note information on the note interface, in order to perfect the note information, the user is likely to annotate the target note information, at this time, the user may perform an annotation frame insertion operation for the target note information at a first position in the note interface, so the electronic device wants to use the annotation frame insertion operation for the target note information at the first position in the note interface, and the annotation frame is displayed at the first position.
As an example, the comment box inserting operation may include a plurality of triggering modes, and the electronic device displays the comment box at the first position in different manners according to the different triggering modes of the comment box operation.
In one possible implementation, in a case where the note interface is in the first display state, the electronic device is responsive to an annotation frame insertion operation for the target note information at a first location in the note interface, the operation of displaying the annotation frame at the first location includes: when the note interface is in a first display state, responding to annotation frame drawing operation aiming at target note information at a first position in the note interface, and displaying a corresponding quadrangle at the first position according to an operation track of the annotation frame drawing operation; determining the area of the quadrangle according to a first coordinate point set of a plurality of coordinate points forming the quadrangle; generating an annotation frame based on the position information of the quadrangle and the first coordinate point set under the condition that the area of the quadrangle is larger than or equal to an area threshold value; deleting the quadrangle; an annotation box is displayed at a first location.
Since the user draws the quadrangle for annotating in the process of recording the note information, the user is likely to write the note information, and writing characters with shapes similar to those of the quadrangle cannot be written in the process of writing the note information, in this case, the quadrangle is not used for generating the annotating frame, and since the size of the written characters by the user is limited, the electronic device determines the area of the quadrangle according to the first coordinate point set of a plurality of coordinate points forming the quadrangle, and generates the annotating frame based on the position information and the first coordinate point set of the quadrangle when the area of the quadrangle is greater than or equal to the area threshold value.
As one example, the electronic device may determine respective side lengths of the quadrangle according to the first coordinate point set, and then determine an area of the quadrangle through the respective side lengths of the quadrangle. Or, the electronic device may determine the number of pixels occupied by the quadrangle according to the first coordinate point set, and then multiply the area size corresponding to each pixel by the number of pixels occupied by the quadrangle to obtain the area of the quadrangle.
It should be noted that, the size of the area corresponding to each pixel may be preset, which is not limited in the embodiment of the present application. The area threshold may also be set in advance according to the requirements, for example, the area threshold may be 2 times smaller than the area of the font No. four, 2 times larger than the area of the font No. four, 3 times larger than the area of the font No. four, or the like.
It is worth to say that the annotation frame is generated by drawing the quadrangle, so that the convenience of displaying the annotation frame in the process of recording the note information is improved.
As can be seen from the foregoing, the electronic device includes a note module, and the electronic device determines the area of the quadrilateral according to the first coordinate set of the plurality of coordinate points forming the quadrilateral, and the process may refer to the operation of step 1011.
In some embodiments, in the case that the area of the quadrangle is smaller than the area threshold, it is sufficient that the quadrangle is described as a part of the handwritten text of the user, and is not used for annotating, and the electronic device displays the quadrangle.
In some embodiments, in a case where the area of the quadrangle is greater than or equal to the area threshold, the electronic device generates the annotation frame based on the location information of the quadrangle and the first coordinate point set, the operation including: under the condition that the area of the quadrangle is larger than or equal to an area threshold value, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of a rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle; and generating an annotation frame according to the rectangular position information and the second coordinate point set.
It is worth to say that, by generating the annotation frame under the condition that the area is larger than or equal to the area threshold value, misoperation of generating the annotation frame based on each quadrangle is avoided, and accuracy of generating the annotation frame is improved.
As can be seen from the above, the electronic device includes not only the note module but also the algorithm module, so that, when the area of the quadrangle is greater than or equal to the area threshold, the note module may send a rectangular identification message to the algorithm module, where the rectangular identification message carries the location information of the quadrangle and the first coordinate set; the algorithm module performs contour recognition operation on the quadrangle according to the position information of the quadrangle; the algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation to obtain rectangular position information and a second coordinate point set; the algorithm module sends the rectangular position information and the second coordinate point set to the note module.
It should be noted that, the operations of the electronic device for performing fitting processing on the quadrangle according to the position information and the first coordinate point set of the quadrangle by the note module and the algorithm module to obtain the position information of the rectangle related to the quadrangle and the second coordinate point set of the plurality of coordinate points forming the rectangle may refer to the operations of the steps 1012-1015, which are not described in detail in the embodiment of the present application.
It is worth to say that, through the contour recognition operation and the boundary fitting operation, the shape of the displayed annotation frame is a standard rectangle, the aesthetic property of the displayed annotation frame is improved, and meanwhile, the user can know the size of the subsequently displayed annotation frame.
In some embodiments, since the annotation frame needs to be displayed at the first location later, the electronic device needs to delete the quadrangle first, and then generate the annotation frame according to the position information of the rectangle and the second coordinate point set.
As an example, the electronic device may further include a graphic canvas module, so that the electronic device deleting the quadrangle includes: the note module sends a handwritten rectangle deleting message to the graphic canvas module; the graphic canvas module deletes the quadrangle.
Because the quadrangle is displayed on the graphic and painting layout layer drawn by the graphic and painting canvas module, the graphic and painting canvas module can delete the quadrangle displayed on the graphic and painting layout layer under the condition of receiving the deleted handwritten rectangular message.
It is worth to say that by deleting the quadrangle, other contents affecting annotation information display do not exist at the position of the rectangle, and the attractiveness of the note interface is improved.
As an example, the electronic device further includes an annotation frame drawing module, so that the note module may send a drawing message to the annotation frame drawing module, where the drawing message carries location information of the rectangle, the second coordinate point set, and location information of the first location; the annotation frame drawing module generates an annotation frame according to the position information of the rectangle and the second coordinate point set; and the annotation frame drawing module displays the annotation frame at the first position according to the position information of the first position.
It should be noted that, the operation of displaying the annotation frame at the first position by the electronic device through the annotation drawing module and the note taking module may refer to the operations of the step 1020-step 1023, which are not described in detail in the embodiment of the present application.
It is worth to say that, by displaying the annotation frame at the first position according to the position information of the first position, the position of the annotation frame is more accurate.
In another possible implementation, the electronic device displays an annotation box at the first location in response to a trigger operation to insert an annotation option in the note interface.
In one embodiment, before the electronic device generates the annotation frame based on the position information of the quadrangle and the first coordinate point set, the electronic device may further display a prompt window in the note interface, where the area of the quadrangle is greater than or equal to the area threshold, and the prompt window is used to instruct a user to confirm whether the quadrangle is used to draw the annotation frame. In this way, the electronic device generates the annotation frame based on the quadrilateral position information and the first coordinate point set, and the operations include: and responding to the triggering operation of the confirmation option in the prompt window, and generating an annotation frame based on the quadrilateral position information and the first coordinate point set.
Since the area of the quadrangle is larger than or equal to the area threshold value, the quadrangle can be used as a drawing annotation frame, but the user may simply need to record one quadrangle in the note information and does not need to annotate, so that in order to avoid misoperation, the note module can display the prompt window in the note interface when the area of the quadrangle is larger than or equal to the area threshold value.
As one example, the user may also trigger a cancel option in the prompt, and the electronic device may not process the quadrilateral in response to the prompt for the cancel option in the prompt.
It is worth to say that the prompt window prompts the user to confirm whether the quadrangle is used for drawing the annotation frame or not, and further the situation that the user does not need to display the annotation frame is avoided, the annotation frame is drawn based on the quadrangle, and therefore accuracy and reliability of displaying the annotation frame are improved.
Step 1302: in response to an input operation to the annotation box, annotation information input by the input operation is displayed in the annotation box.
In general, the state of the annotation frame after display is to-be-edited, namely, a text frame without characters input, and sometimes, the annotation frame may not be displayed after exiting from the editing state under the condition that the annotation information does not exist in the annotation frame.
In some embodiments, the electronic device, in response to an input operation to the annotation box, displays annotation information entered by the input operation in the annotation box, including: the note module responds to the input operation of the annotation frame and sends annotation information input by the input operation to the annotation frame drawing module; the annotation drawing module zooms the annotation information according to the first size information of the annotation frame, and displays the zoomed annotation information in the annotation frame positioned in the annotation layer; the note module responds to the exiting editing operation of the annotation frame and sends first size information and annotation information of the annotation frame to the graphic canvas module; the graphic canvas module draws the annotation frame on the graphic layout layer according to the first size information and displays the annotation information in the annotation frame.
It is worth to say that the annotation information is scaled according to the first size information of the annotation frame, so that the annotation information is adapted to the size of the annotation frame, the annotation information can be completely displayed in the annotation frame, and the information display integrity is improved.
Step 1303: and storing the first interface size, the position information of the first position, the first size information of the annotation frame and the annotation information displayed in the annotation frame when the note interface is in the first display state.
In order to avoid the dislocation of the position between the annotation frame and the corresponding target note information in the note interface after the display state of the note interface is switched, the electronic device may store the first interface size, the position information of the first position, the first size information and the annotation information when the note interface is in the first display state.
It is worth to be noted that, by acquiring and storing the first interface size, the position information of the first position, the first size information and the annotation information, when the display state of the subsequent note interface changes, the position of the annotation frame in the note interface in the second display state can be determined through specific data.
Step 1304: responding to the switching operation of the display state of the note interface, switching the display state of the note interface into a second display state corresponding to the switching operation, and displaying the annotation frame with the annotation information at a second position, so that the relative position of the target note information and the annotation frame is not changed under the condition that the note interface is in the second display state.
The second display state is different from the first display state, and the second display state may be any one of a full-screen display state, an up-down split-screen display state, a left-right split-screen display state, a state displayed in a floating window, and the like.
In some embodiments, the operation of the electronic device displaying the annotation box at the second location comprises: acquiring a second interface size when the note interface is in a second display state; determining an interface scaling according to the first interface size and the second interface size; determining second size information of the annotation frame and position information of the second position according to the interface scaling, the position information of the first position and the first size information; and displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
It is worth to say that, through confirming the interface scale, after the display state of note interface changes, can confirm the size and position of annotating the frame accurately to improve the accuracy that annotates the frame and show.
In some embodiments, an electronic device may include a note module and a teletext canvas module; the note module can monitor the display state of the note interface; and under the condition that the note interface is in the second display state, the note module can acquire the second interface size when the note interface is in the second display state. In this way, the operation of the electronic device displaying the annotation frame with the annotation information at the second location according to the second size information and the location information of the second location includes: the note module sends the second size information, the position information of the second position and the annotation information to the graphic canvas module; and the graphic canvas module displays an annotation frame with annotation information at the second position according to the second size information and the position information of the second position.
It is worth to say that the display state of the note interface is monitored through the note module, so that the second size information and the position information of the second position can be rapidly and timely determined under the condition that the display state of the note interface is changed, and the display reliability of the annotation frame when the display state of the note interface is changed is improved.
In the embodiment of the application, after annotating any handwritten note information or picture note information, if the display state of the note interface changes, the relative position between the annotating frame carrying the annotating information and the aimed note information does not change, so that even if the display state of the note interface changes, the user can know which part of note information in the annotating frame is aimed at, and the annotating accuracy of the note information is improved.
Next, an electronic device according to an embodiment of the present application will be described.
The method provided by the embodiment of the application can be executed by the electronic equipment, and the electronic equipment can have a note taking function. Further, an application program capable of realizing a note function such as a memo, a cloud recording, or the like may be installed in the electronic device. By way of example and not limitation, the electronic device may be, but is not limited to, a tablet, desktop, laptop, handheld, notebook, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, cellular telephone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) \virtual reality (VR) device, cell phone, smart appliance, and the like, to which embodiments of the present application are not limited.
Fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 14, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a sensor module 180, a display 194, and the like. The sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180E, a touch sensor 180K, and the like, among others.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces, such as may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being an integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. Such as storing files of music, video, etc. in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created by the electronic device 100 during use, and so forth. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. Such as: when a touch operation with the touch operation intensity smaller than the pressure threshold is applied to the short message application icon, executing an instruction for checking the short message. And executing the instruction of newly creating the short message when the touch operation with the touch operation intensity being larger than or equal to the pressure threshold acts on the short message application icon.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The acceleration sensor 180E may also be used to identify the gesture of the electronic device 100, and may be used in applications such as landscape switching, pedometers, and the like.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor 180K may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, data subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium such as a floppy Disk, a hard Disk, a magnetic tape, an optical medium such as a digital versatile Disk (Digital Versatile Disc, DVD), or a semiconductor medium such as a Solid State Disk (SSD), etc.
The above embodiments are not intended to limit the present application, and any modifications, equivalent substitutions, improvements, etc. within the technical scope of the present application should be included in the scope of the present application.

Claims (13)

1. The display method of the annotation frame is characterized by being applied to the electronic equipment, and comprises the following steps:
when a note interface is in a first display state, responding to annotation frame insertion operation for target note information at a first position in the note interface, and displaying an annotation frame at the first position, wherein the target note information is any note information in handwritten note information or picture note information included in the note interface;
responding to the input operation of the annotating frame, and displaying annotating information input by the input operation in the annotating frame;
responding to a switching operation of the display state of the note interface, switching the display state of the note interface into a second display state corresponding to the switching operation, and displaying the annotation frame with the annotation information at a second position, so that the relative position of the target note information and the annotation frame is not changed when the note interface is in the second display state.
2. The method of claim 1, wherein the displaying the annotation box at a first location in the notes interface in response to an annotation box insertion operation for target notes information at the first location in the notes interface with the notes interface in the first display state comprises:
when a note interface is in a first display state, responding to annotation frame drawing operation aiming at the target note information at a first position in the note interface, and displaying a corresponding quadrilateral at the first position according to an operation track of the annotation frame drawing operation;
determining the area of the quadrangle according to a first coordinate point set of a plurality of coordinate points forming the quadrangle;
generating the annotation frame based on the position information of the quadrangle and the first coordinate point set under the condition that the area of the quadrangle is larger than or equal to an area threshold value;
deleting the quadrangle;
displaying the annotation frame at the first position.
3. The method of claim 2, wherein the generating the annotation box based on the location information of the quadrilateral and the first set of coordinate points, if the area of the quadrilateral is greater than or equal to an area threshold, comprises:
When the area of the quadrangle is larger than or equal to the area threshold value, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of a rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle;
and generating the annotation frame according to the position information of the rectangle and the second coordinate point set.
4. The method of claim 3, wherein the electronic device comprises a note module and an algorithm module;
when the area of the quadrangle is greater than or equal to the area threshold, fitting the quadrangle according to the position information of the quadrangle and the first coordinate point set to obtain the position information of the rectangle related to the quadrangle and a second coordinate point set of a plurality of coordinate points forming the rectangle, wherein the fitting comprises the following steps:
when the area of the quadrangle is larger than or equal to the area threshold value, the note module sends a rectangle identification message to the algorithm module, wherein the rectangle identification message carries the position information of the quadrangle and the first coordinate point set;
The algorithm module performs contour recognition operation on the quadrangle according to the position information of the quadrangle;
the algorithm module carries out boundary fitting operation on the quadrangle according to the first coordinate point set and the identification result of the contour identification operation to obtain the position information of the rectangle and the second coordinate point set;
the algorithm module sends the rectangular position information and the second coordinate point set to the note module.
5. The method of claim 4, further comprising a teletext canvas module in the electronic device;
the deleting the quadrangle includes:
the note module sends a handwritten rectangle deleting message to the graphic canvas module;
and the graphic canvas module deletes the quadrangle.
6. The method according to claim 4 or 5, further comprising an annotation frame drawing module in the electronic device;
the generating the annotation frame according to the position information of the rectangle and the second coordinate point set includes:
the note module sends a drawing message to the annotation frame drawing module, wherein the drawing message carries the position information of the rectangle, the second coordinate point set and the position information of the first position;
The annotation frame drawing module generates the annotation frame according to the position information of the rectangle and the second coordinate point set;
the displaying the annotation box at the first position comprises:
and the annotation frame drawing module displays the annotation frame at the first position according to the position information of the first position.
7. The method of claim 6, wherein the displaying, in the annotation box, annotation information entered by the input operation in response to the input operation to the annotation box comprises:
the note module responds to the input operation of the annotation frame and sends the annotation information input by the input operation to the annotation frame drawing module;
the annotation drawing module zooms the annotation information according to first size information of the annotation frame, and displays the zoomed annotation information in the annotation frame positioned in the annotation layer, wherein the first size information is the size information of the annotation frame when the note interface is in the first display state;
the note module responds to the exiting editing operation of the annotation frame and sends first size information of the annotation frame and the annotation information to the graphic canvas module;
And the graphic canvas module draws the annotation frame on the graphic layout layer according to the first size information and displays the annotation information in the annotation frame.
8. The method of any one of claims 1-7, wherein before the switching the display state of the note interface to the second display state corresponding to the switching operation in response to the switching operation of the display state of the note interface, further comprising:
and storing a first interface size when the note interface is in the first display state, position information of the first position, first size information of the annotation frame and annotation information displayed in the annotation frame.
9. The method of claim 8, wherein displaying the annotation box at a second location comprises:
acquiring a second interface size when the note interface is in the second display state;
determining an interface scaling according to the first interface size and the second interface size;
determining second size information of the annotation frame and position information of the second position according to the interface scaling, the position information of the first position and the first size information;
And displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
10. The method of claim 9, wherein the electronic device comprises a notes module and a graphic canvas module;
before the obtaining the second interface size when the note interface is in the second display state, the method further includes:
the note module monitors the display state of the note interface;
the obtaining a second interface size when the note interface is in the second display state includes:
the note module acquires a second interface size when the note interface is in the second display state under the condition that the note interface is in the second display state;
the displaying the annotation frame with the annotation information at the second position according to the second size information and the position information of the second position comprises the following steps:
the note module sends the second size information, the position information of the second position and the annotation information to the graphic canvas module;
and the graphic canvas module displays an annotation frame with the annotation information at the second position according to the second size information and the position information of the second position.
11. The method of any of claims 2-10, wherein the generating the annotation frame based on the quadrilateral location information and the first set of coordinate points further comprises, prior to:
displaying a prompt window in the note interface when the area of the quadrangle is larger than or equal to an area threshold, wherein the prompt window is used for indicating a user to confirm whether the quadrangle is used for drawing an annotation frame or not;
the generating the annotation frame based on the quadrilateral position information and the first coordinate point set includes:
and responding to the triggering operation of the confirmation option in the prompt window, and generating the annotation frame based on the position information of the quadrangle and the first coordinate point set.
12. An electronic device, the electronic device comprising: a processor and a memory for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, the electronic device is for performing the method of displaying annotation boxes as claimed in any of claims 1-11.
13. A computer readable storage medium storing one or more programs, wherein the one or more programs are configured to be executed by one or more processors, the one or more programs comprising instructions that cause an electronic device to perform the method of displaying annotation boxes according to any of claims 1-11.
CN202211173822.0A 2022-09-26 2022-09-26 Annotation frame display method, electronic device and readable storage medium Pending CN116719459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211173822.0A CN116719459A (en) 2022-09-26 2022-09-26 Annotation frame display method, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211173822.0A CN116719459A (en) 2022-09-26 2022-09-26 Annotation frame display method, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN116719459A true CN116719459A (en) 2023-09-08

Family

ID=87870307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211173822.0A Pending CN116719459A (en) 2022-09-26 2022-09-26 Annotation frame display method, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN116719459A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8345017B1 (en) * 2012-03-04 2013-01-01 Lg Electronics Inc. Touch input gesture based command
US20130318465A1 (en) * 2012-05-23 2013-11-28 Wistron Corp. Method for sharing notes of an electronic book and electronic reader thereof, computer readable storage medium
US20160154579A1 (en) * 2014-11-28 2016-06-02 Samsung Electronics Co., Ltd. Handwriting input apparatus and control method thereof
KR20160064925A (en) * 2014-11-28 2016-06-08 삼성전자주식회사 Handwriting input apparatus and control method thereof
US9430141B1 (en) * 2014-07-01 2016-08-30 Amazon Technologies, Inc. Adaptive annotations
US20170109578A1 (en) * 2015-10-19 2017-04-20 Myscript System and method of handwriting recognition in diagrams
CN108304132A (en) * 2018-01-19 2018-07-20 广州视源电子科技股份有限公司 graphic display method, device, equipment and storage medium
CN109032495A (en) * 2018-08-15 2018-12-18 掌阅科技股份有限公司 Content input method, electronic equipment and computer storage medium
US20190026019A1 (en) * 2016-01-07 2019-01-24 Myscript System and method for mixed content digital ink interactivity
CN109669751A (en) * 2018-12-14 2019-04-23 Oppo广东移动通信有限公司 A kind of method for drafting of input frame, device, terminal and computer storage medium
CN109726367A (en) * 2017-10-27 2019-05-07 腾讯科技(北京)有限公司 A kind of method and relevant apparatus of annotation displaying
CN110035329A (en) * 2018-01-11 2019-07-19 腾讯科技(北京)有限公司 Image processing method, device and storage medium
US20200348900A1 (en) * 2018-01-19 2020-11-05 Guangzhou Shiyuan Electronics Co., Ltd. Method of providing annotation track on the content displayed on an interactive whiteboard, computing device and non-transitory readable storage medium
CN112668289A (en) * 2020-12-25 2021-04-16 苏州开心盒子软件有限公司 Extraction method and device of nested table and storage medium
WO2021098832A1 (en) * 2019-11-21 2021-05-27 广州视源电子科技股份有限公司 Element control method, device, apparatus, and storage medium
CN114385284A (en) * 2020-10-22 2022-04-22 华为技术有限公司 Display method of annotations and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8345017B1 (en) * 2012-03-04 2013-01-01 Lg Electronics Inc. Touch input gesture based command
US20130318465A1 (en) * 2012-05-23 2013-11-28 Wistron Corp. Method for sharing notes of an electronic book and electronic reader thereof, computer readable storage medium
US9430141B1 (en) * 2014-07-01 2016-08-30 Amazon Technologies, Inc. Adaptive annotations
US20160154579A1 (en) * 2014-11-28 2016-06-02 Samsung Electronics Co., Ltd. Handwriting input apparatus and control method thereof
KR20160064925A (en) * 2014-11-28 2016-06-08 삼성전자주식회사 Handwriting input apparatus and control method thereof
US20170109578A1 (en) * 2015-10-19 2017-04-20 Myscript System and method of handwriting recognition in diagrams
US20190026019A1 (en) * 2016-01-07 2019-01-24 Myscript System and method for mixed content digital ink interactivity
CN109726367A (en) * 2017-10-27 2019-05-07 腾讯科技(北京)有限公司 A kind of method and relevant apparatus of annotation displaying
CN110035329A (en) * 2018-01-11 2019-07-19 腾讯科技(北京)有限公司 Image processing method, device and storage medium
CN108304132A (en) * 2018-01-19 2018-07-20 广州视源电子科技股份有限公司 graphic display method, device, equipment and storage medium
US20200348900A1 (en) * 2018-01-19 2020-11-05 Guangzhou Shiyuan Electronics Co., Ltd. Method of providing annotation track on the content displayed on an interactive whiteboard, computing device and non-transitory readable storage medium
CN109032495A (en) * 2018-08-15 2018-12-18 掌阅科技股份有限公司 Content input method, electronic equipment and computer storage medium
CN109669751A (en) * 2018-12-14 2019-04-23 Oppo广东移动通信有限公司 A kind of method for drafting of input frame, device, terminal and computer storage medium
WO2021098832A1 (en) * 2019-11-21 2021-05-27 广州视源电子科技股份有限公司 Element control method, device, apparatus, and storage medium
CN114385284A (en) * 2020-10-22 2022-04-22 华为技术有限公司 Display method of annotations and electronic equipment
CN112668289A (en) * 2020-12-25 2021-04-16 苏州开心盒子软件有限公司 Extraction method and device of nested table and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
方晨: ""CorelDRAW 12中文版入门与提高"", 上海科学普及出版社, pages: 8 *

Similar Documents

Publication Publication Date Title
US9430093B2 (en) Monitoring interactions between two or more objects within an environment
US8341558B2 (en) Gesture recognition on computing device correlating input to a template
CA2128984C (en) Interactive method and system for producing address-correlated information using user-specified address zones
US9324305B2 (en) Method of synthesizing images photographed by portable terminal, machine-readable storage medium, and portable terminal
US20120096345A1 (en) Resizing of gesture-created markings for different display sizes
US20150199320A1 (en) Creating, displaying and interacting with comments on computing devices
US9158450B2 (en) Handwriting input device and handwriting input control program
CN109446832B (en) Screen capturing method and device
CN104036476A (en) Method for providing augmented reality, and portable terminal
EP3282350B1 (en) Feedback via an input device and scribble recognition
US20230306192A1 (en) Comment adding method, electronic device, and related apparatus
US11533434B2 (en) Generating and rendering motion graphics effects based on recognized content in camera view finder
US9372622B2 (en) Method for recording a track and electronic device using the same
CN108369486B (en) Universal inking support
JP2015095066A (en) Information processing apparatus and information processing program
CN105988703A (en) Business object display method and apparatus
JP6409429B2 (en) Direct video correction system and program for text, strokes and images
TW201432556A (en) Method for recording trajectory and electronic apparatus
CN114879860B (en) Method, device and storage medium for preventing false touch of foldable screen
CN116225274A (en) Identification method and device for touch operation, electronic equipment and storage medium
CN116719459A (en) Annotation frame display method, electronic device and readable storage medium
CN115437736A (en) Method and device for recording notes
CN114461312B (en) Display method, electronic device and storage medium
CN113849106A (en) Page-turning handwriting processing method and device, electronic device and storage medium
CN116700554A (en) Information display method, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination