Disclosure of Invention
The embodiment of the application provides a content erasing method, equipment and a storage medium, which are used for solving the technical problems of relatively fixed text erasing operation and relatively poor flexibility of text erasing operation by taking complete text content as a text object in the related technology and effectively improving the flexibility of the text erasing operation.
In a first aspect, an embodiment of the present application provides a content erasing method, including:
receiving a content erasing function triggering operation, determining text objects according to text content displayed in a writing application interface, and creating one or more text positioning boxes on the writing application interface according to each text object, wherein the writing application interface displays writing and text content, and the text content is in a standard font format;
receiving a first erasing operation on the writing application interface, and erasing writing marks on the writing application interface according to the first erasing operation;
receiving a second erasing operation on the writing application interface, and determining a text positioning box hit by the second erasing operation;
Performing erasure processing on the hit text positioning box according to the second erasure operation;
And determining the residual text content from the text content according to the text positioning box after the erasing processing, and displaying the residual text content continuously.
According to the embodiment of the application, the text objects are determined according to the text content displayed in the writing application interface, one or more text positioning boxes are created on the writing application interface according to each text object, the writing handwriting on the writing application interface is erased according to the first erasing operation on the writing application interface, the erasing processing is carried out on the text positioning boxes hit by the second erasing operation on the writing application interface, the residual text content is determined from the text content according to the text positioning boxes after the erasing processing, and the residual text content is continuously displayed, so that the dynamic erasing processing of the text content corresponding to the second erasing operation is realized, the self-adaptive adjustment of the text content after the erasing processing is realized through the continuous display of the residual text content, the flexibility of the text erasing operation is effectively improved, and the user experience is improved.
In one embodiment, the creating one or more text positioning boxes on the writing application interface according to each text object includes:
And creating a text positioning box on the writing application interface according to the size information and the position information of each line of text content in each text object.
By accurately creating the text positioning box according to the size information and the position information of each line of text content in the text object, the accuracy of erasing the text content is improved.
In one embodiment, the creating one or more text positioning boxes on the writing application interface according to each text object includes:
a text positioning box of a first transparency is created on the writing application interface according to each text object.
By creating the text positioning box with the first transparency on the writing application interface, the display effect of the text positioning box is optimized, and the user experience is optimized.
In one embodiment, the determining the text positioning box hit by the second erase operation includes:
and determining an erasure range corresponding to an erasure point of the second erasure operation on the writing application interface, and determining a text positioning box intersected with the erasure range as a text positioning box hit by the second erasure operation.
By determining the hit text positioning frame according to the intersection condition of the erasing range and the text positioning frame according to the erasing point of the second erasing operation, the hit efficiency and accuracy of the text positioning frame are effectively improved.
In one embodiment, the determining the text bounding box that intersects the erasure range as the text bounding box hit by the second erasure operation includes:
in a case where there are a plurality of text positioning boxes intersecting the erasure range, the uppermost text positioning box among the plurality of text positioning boxes intersecting the erasure range is determined as the text positioning box hit by the second erasure operation.
By determining the text locating box at the uppermost layer of the plurality of text locating boxes which are intersected with the erasing range at the same time as the text locating box hit by the second erasing operation, the hit efficiency and the hit accuracy of the text locating box are effectively improved, and the content erasing accuracy is improved.
In one embodiment, the erasing the hit text positioning box according to the second erasing operation includes:
determining intersection information of an erasure range corresponding to an erasure point of the second erasure operation on the writing application interface and the hit text positioning frame;
And determining the rest text positioning boxes in the text positioning boxes hit by the second erasing operation according to the intersection information.
According to the method, the device and the system, the text locating boxes which are hit are accurately determined according to the intersection information of the erasure range and the text locating boxes which are hit, and the remaining text locating boxes after erasure processing are improved, so that the accuracy of determining the content of the remaining text is improved, and the content erasure effect is ensured.
In one embodiment, the text bounding box is stored in a bounding box list, and the determining, according to the intersection information, remaining text bounding boxes in the text bounding boxes hit by the second erasing operation includes:
determining the rest text positioning boxes in the text positioning boxes hit by the second erasing operation according to the intersection information;
And adding the rest text positioning boxes to a positioning box list, and deleting the hit text positioning boxes from the positioning box list.
According to the method, the text positioning boxes are recorded through the positioning box list, and then when the residual text content is determined from the text content according to the erased text positioning boxes, the residual text positioning boxes can be rapidly determined from the positioning box list, the residual text content is rapidly determined according to the residual text positioning boxes, and the content erasing accuracy and efficiency are improved.
In one embodiment, the positioning frame start position and the positioning frame end position of the text positioning frame are recorded in a positioning list, and after determining the rest of the text positioning frames hit by the second erasing operation according to the intersection information, the method further includes:
and adding the starting point position and the ending point position of the positioning frame of the rest text positioning frame into a positioning list, and deleting the hit starting point position and the hit ending point position of the positioning frame of the text positioning frame from the positioning list.
The above-mentioned, record the locating frame starting point position and locating frame end point position of the text locating frame through the locating list, subsequently when confirming the text content needing erasing and surplus text content from the text content according to the text locating frame after erasing processing, can confirm the erased text locating frame and surplus text locating frame from the locating list fast, and confirm the text content needing erasing and surplus text content fast according to erased text locating frame and surplus text locating frame, improve content and erase the accuracy and efficiency.
In one embodiment, the determining the remaining text content from the text content according to the text positioning box after the erasing process includes:
And determining the residual text content covered by the text positioning frame after the erasing processing from the text content according to the starting point position and the ending point position of the positioning frame of each text positioning frame in the positioning list.
According to the above, the residual text content covered by the residual text positioning boxes after the erasing processing is accurately determined according to the starting point positions and the ending point positions of the positioning boxes of the text positioning boxes in the positioning list, the text content to be reserved is rapidly determined, and the content erasing accuracy and efficiency are improved.
In one embodiment, the coherently displaying the remaining text content includes:
And according to the coordinate sequence of the starting point position and the ending point position of the positioning frame of each text positioning frame in the positioning list, splicing the rest text contents in sequence.
And the splicing processing is carried out on the residual text content according to the coordinate sequence of the starting point position and the ending point position of the positioning frame in the positioning list, so that the accurate and orderly splicing of the residual text content is ensured, and the content erasing effect is ensured.
In one embodiment, the received content erasure function triggers an operation including at least one of:
Receiving a content erasure function triggering operation triggered by a content erasure function button;
receiving a content erasing function triggering operation triggered by a setting gesture;
receiving a content erasing function triggering operation triggered by setting a touch action;
and receiving a content erasing function triggering operation triggered by a touch control display screen of the touch control object with the set medium type.
By detecting the triggering operation of the content erasing function, the time for creating the text positioning box is accurately determined, and the content is accurately erased.
In one embodiment, the content scrubbing method further comprises determining text objects from the remaining text content displayed in the writing application interface and creating one or more text positioning boxes on the writing application interface from each of the text objects upon completion of a coherent display of the remaining text content in the writing application interface.
According to the method, when the continuous display of the residual text content in the writing application interface is completed, the text positioning box is re-created on the writing application interface according to the residual text content displayed in the writing application interface, and then the erasing operation of the text content can be executed based on the newly created text positioning box, so that the situation that the erasing operation of the subsequent text content is abnormal due to the fact that the text positioning box is not corresponding to the residual text content after the text content is erased once is reduced, and the subsequent text content can be correctly erased is ensured.
In one embodiment, the content erasing method further comprises receiving a third erasing operation on the writing application interface, and erasing the graphic elements on the writing application interface according to the third erasing operation.
By responding to the third erasing operation on the writing application interface, the method and the device effectively improve the flexibility of the text erasing operation and improve the user experience.
In one embodiment, after the erasing processing is performed on the hit text positioning box according to the second erasing operation, the method further includes:
Determining the text content to be erased from the text content according to the text positioning box after the erasing processing, and redrawing the text content to be erased according to a set display effect.
By redrawing the text content to be erased according to the set display effect, the user can observe the text content to be erased in real time conveniently, the dynamic erasing effect of the text content is realized, the editing capability of the text content is enriched, the text content in the interactive tablet is enabled to have more operation possibility, and the user experience is improved.
In one embodiment, redrawing the text content to be erased according to the set display effect includes:
And redrawing the text content to be erased according to the second transparency.
By redrawing the text content to be erased according to the second transparency, the user can intuitively know the condition that the text content is erased, and user experience is improved.
In a second aspect, embodiments of the present application provide a content erasure apparatus comprising a memory and one or more processors;
the memory is used for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the content erasure method as described in the first aspect.
In a third aspect, embodiments of the present application provide a storage medium storing computer executable instructions which, when executed by a computer processor, are for performing the content erasure method as described in the first aspect.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of specific embodiments of the present application is given with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present application are shown in the accompanying drawings. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The above-described process may be terminated when its operations are completed, but may have additional steps not included in the drawings. The processes described above may correspond to methods, functions, procedures, subroutines, and the like.
The interactive flat board applied by the scheme can be integrated equipment for controlling the content displayed on the display screen and realizing man-machine interaction operation through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, sound equipment, a television, a video conference terminal and the like. Of course, the interactive tablet does not include a definition of the surface features of the display surface, e.g., the surface features of the interactive tablet may be planar, curved, or a splice of multiple planes, etc.
Typically, the interactive tablet is equipped with at least one operating system, wherein the operating system includes, but is not limited to, an android system, a Linux system, a Windows system, and a wintersweet system, which are used to control and coordinate the interactive tablet and the peripheral devices, so that various independent hardware in the interactive tablet can work as a stable whole. The interactive tablet comprises at least one display screen, e.g. the interactive tablet is configured with a display screen having touch functionality, i.e. a touch sensitive display screen. The touch sensitive display may be an infrared display, a capacitive display, a resistive display, an electromagnetic display, or a pressure sensitive display, among others. On a display screen with a touch function, a user can realize touch operation in a mode of touching the display screen by a finger or a writing pen, and correspondingly, the interactive flat plate detects a touch position and responds according to the touch position so as to realize the touch function. The interactive tablet can process touch operations received through the display screen through the operating system. Further, the interactive tablet may install at least one application based on the operating system, such as a whiteboard application installed in the interactive tablet. The whiteboard application may be an application program of the operating system, or may be an application program downloaded from a third party device or a server. When the whiteboard application is operated, a writing application interface is displayed on the display screen, writing operation can be performed in the range of the corresponding writing application interface in the display screen through fingers or writing pens, the interactive tablet can respond to the writing operation to display corresponding writing scripts in the writing application interface, character recognition can be performed on the writing scripts, and the recognized characters are displayed in the writing application interface. Text content and graphic elements can be inserted into the writing application interface, and optionally, the text content can be input through character recognition of writing handwriting, and can also be input through a virtual keyboard or an external physical keyboard.
The content erasing method provided by the application can be applied to erasing operation of text content on the interactive flat panel, for example, erasing part of the text content on the interactive flat panel. In the existing text content erasing scheme, the whole text content is generally taken as a text object, the whole text content is erased, a user cannot erase specific text content, the erasing operation of the text content erasing scheme is relatively fixed, and the flexibility is relatively poor. And under the use scene of the interactive tablet, the use of a mouse and a keyboard for editing the text is a difficult operation, and does not accord with the use habit of a user, so that the user experience is poor.
Based on the above, the content erasing method provided by the embodiment of the application is used for solving the technical problems of relatively fixed erasing operation, relatively poor flexibility and relatively poor user experience of the existing text content erasing scheme. The method aims at determining the residual text content from the text content according to the text positioning box after the erasing processing, and continuously displaying the residual text content, so that the dynamic erasing processing of the text content corresponding to the erasing operation is realized, the flexibility of the text erasing operation is effectively improved, and the user experience is improved.
Fig. 1 shows a flowchart of a content erasing method according to an embodiment of the present application, where the content erasing method according to the embodiment of the present application may be implemented in hardware and/or software, and integrated in a content erasing device (e.g. an interactive tablet).
The following description will be made taking an example in which the content erasing device performs a content erasing method. Referring to fig. 1, the content erasing method includes:
and S110, receiving a triggering operation of the content erasing function, determining text objects according to text content displayed in the writing application interface, and creating one or more text positioning boxes on the writing application interface according to each text object.
When the whiteboard application is operated on the content erasing device, a writing application interface is displayed on a display screen of the content erasing device, writing operation can be performed in a range corresponding to the writing application interface in the display screen through a finger or a writing pen, the content erasing device can respond to the writing operation to display corresponding writing handwriting in the writing application interface, text content can also be inserted in the writing application interface, at the moment, the writing handwriting and the text content are displayed on the writing application interface, and a font format corresponding to the text content is a standard font format. For example, the standard font format may be a font format that is encoded based on GB2312, times New Roman, or the like, which sets an encoding standard. When the content on the writing application interface needs to be erased, the content erasing function can be triggered to trigger operation so that the content erasing device enters an erasing mode, and a user can execute erasing operation on the content displayed on the writing application interface in the erasing mode.
When the content erasing device enters the erasing mode, text content displayed in the current writing application interface is determined, and a text object is created according to the text content. Alternatively, the text content in the same paragraph may be created as one text object, and when multiple text objects are displayed in the writing application interface, multiple text objects are determined according to the multiple text objects. The text content can be a single text or symbol, or a combination of a plurality of text and/or symbols, and one section of text content can be one line of text content or a plurality of lines of text content.
After determining text objects corresponding to text content displayed in the writing application interface, creating a hit text positioning box on the writing application interface according to each text object. The text positioning box is understood as a rectangular box for positioning text content on the writing application interface, and the text content on the writing application interface can be positioned according to the text positioning box. Each text object may correspond to create one or more text boxes, the size and location of which corresponds to the size and location of text content in the text object, each text box corresponding to a line of text content. For example, when a text object is determined from text content of one line, a text positioning box is created from the text object, and when a text object is determined from text content of a plurality of lines, a plurality of text positioning boxes are created from the text object.
In one embodiment, the erasing mode of the content erasing device may be triggered by an erasing function button provided on the content erasing device, or may be triggered by a medium type of the touch content erasing device, for example, when the medium type is detected as an eraser or an eraser.
In one possible embodiment, when one or more text positioning boxes are created on the writing application interface according to each text object, the content erasing method provided by the scheme can be that the text positioning boxes are created on the writing application interface according to the size information and the position information of each line of text content in each text object.
For example, after determining text objects corresponding to text contents displayed in the writing application interface, determining, for each text object, a text positioning box corresponding to each line of text contents is created on the writing application interface according to size information (including length and width) and position information of each line of text contents in the text object. At this time, the size (including length and width) and position of the text positioning box are consistent with the size information and position information of the text content of the corresponding line, and the text positioning box can cover the text content of the corresponding line. According to the text object erasing method and device, the text positioning boxes are accurately created according to the size information and the position information of each line of text content in the text object, so that the accuracy of erasing the text content is improved.
In one possible embodiment, when one or more text positioning boxes are created on the writing application interface according to each text object, the text positioning boxes with the first transparency can be created on the writing application interface according to each text object.
Illustratively, after determining the text objects, a text bounding box of a first transparency is created on the writing application interface from each text object. Wherein the transparency of the first transparency may range from 50% to 100%. For example, when the first transparency is 100%, the text positioning box is set to be fully transparent, the creation of the text positioning box does not influence the display effect of text contents in the writing application interface, the text positioning box is generated under the condition that a user does not feel, and the use experience of the user is improved. When the first transparency is smaller than 100%, the text positioning box can be observed in the writing application interface, and a user can quickly and accurately determine text content capable of performing the second erasing operation through the text positioning box, so that the content erasing efficiency is improved, and the user experience is improved. Optionally, the user may set one or more combinations of the first transparency, the border color, and the fill color according to the display effect requirements for the text box. According to the scheme, the text positioning box with the first transparency is created on the writing application interface, so that the display effect of the text positioning box is optimized, and the user experience is optimized.
In one embodiment, the content erasing method provided by the scheme comprises at least one of a first mode of receiving the content erasing function triggering operation triggered by the content erasing function button, a second mode of receiving the content erasing function triggering operation triggered by the setting gesture, a third mode of receiving the content erasing function triggering operation triggered by the setting touch action and a fourth mode of receiving the content erasing function triggering operation triggered by the touch display screen of the touch object with the set medium type.
For example, for mode one, a content erase function button may be provided in a whiteboard application, and the user may trigger the content erase function triggering operation by clicking the content erase function button. Alternatively, the content erasing function button may be provided in the operation panel, and the content erasing function triggering operation may be triggered on the content erasing function button in the operation panel by calling out the operation panel. For the second mode, a shooting device (such as a camera or an infrared camera) configured or externally connected on the content erasing device can be used for detecting gesture actions of a user, and when the gesture actions of the user are detected as setting gestures, it is determined that the user triggers a content erasing function triggering operation, for example, the setting gestures can be hand-up erasing gestures. For the third mode, the touch action performed on the display screen may be detected, and when the set touch action is detected, it is determined that the user triggers the content erasing function to trigger operation, for example, a touch track corresponding to the set touch action may be a track corresponding to the back and forth erasing on the display screen, or a track corresponding to a touch area larger than the set area (for example, the track is pasted on the display screen by using a palm to move). For the fourth mode, the medium type of the touch object of the touch display screen can be detected, and when the medium type of the touch object performing the touch operation on the display screen is detected to be a set medium type (for example, the set medium type is rubber, palm, handwriting pen holder and the like), it is determined that the user triggers the triggering operation of the content erasing function. Optionally, the detection of the medium type of the touch object may be performed by an elastic wave detection unit configured on the content erasing device, for example, detecting an elastic wave generated when the touch object performs a touch operation on the display screen, and determining that the medium type of the touch object is the set medium type when the detected elastic wave matches with the elastic wave generated when the touch object performs the touch operation on the display screen. According to the scheme, the trigger operation of the content erasing function is detected, so that the time for creating the text positioning box is accurately determined, and the content is accurately erased.
And S120, receiving a first erasing operation on the writing application interface, and erasing writing marks on the writing application interface according to the first erasing operation.
Illustratively, after entering the erase mode, the user may initiate a first erase operation on the writing trace to be erased on the writing application interface using a stylus, eraser, hand, or other medium. The content erasing device determines writing marks hit by the first erasing operation after detecting the first erasing operation performed on the writing application interface, and erases the writing marks hit by the first erasing operation on the writing application interface.
S130, receiving a second erasing operation on the writing application interface, and determining a text positioning box hit by the second erasing operation.
For example, after entering the erase mode, the user may initiate a second erase operation on the text content to be erased on the writing application interface using a stylus, eraser, hand, or other medium. After detecting the second erasing operation performed on the writing application interface, the content erasing device determines a text positioning box hit by the second erasing operation.
When the user triggers the second erasing operation according to the position of the text content to be erased on the writing application interface, the text positioning boxes hit by the second erasing operation comprise the text positioning boxes corresponding to the text content to be erased. Alternatively, the text box hit by the second erase operation may be determined based on the size and location of each text box and the location of one or more erase points of the erase path traversed by the second erase operation.
And S140, performing erasure processing on the hit text positioning box according to the second erasure operation.
Illustratively, after determining the text positioning box hit by the second erasing operation, erasing the hit text positioning box according to the second erasing operation, and determining the text positioning box after the erasing process. The erasing processing on the text positioning box may be erasing a portion corresponding to the second erasing operation in the hit text positioning box, for example, erasing a corresponding length from the hit text positioning box according to an erasing range corresponding to the second erasing operation. The missed text positioning boxes keep the original shape, and after the hit text positioning boxes are erased, the hit text positioning boxes are divided into erased text positioning boxes and residual text positioning boxes, and the shape corresponding to the addition of the erased text positioning boxes and the residual text positioning boxes is the shape of the hit text positioning boxes.
In the process that the user triggers the second erasing operation (the second erasing operation is completed after the user drops the eraser to start the erasing operation, a plurality of erasing points on the erasing path of the second erasing operation are continuously detected, a hit text positioning frame can be determined according to each erasing point in sequence, erasing processing is carried out on the hit text positioning frame, the text positioning frame is used as a new text positioning frame in the next erasing point after erasing processing is carried out on the basis of one erasing point, and the original text positioning frame can be deleted, so that the accuracy of content erasing is ensured. Based on this, in a process of triggering the second erasing operation, one text positioning box is repeatedly hit and erased, and the shape (length) of the corresponding remaining text positioning box is gradually reduced.
The text positioning box is used for positioning the text to be erased in the writing application interface, and the text to be erased is positioned in the writing application interface.
And S150, determining the residual text content from the text content according to the text positioning box after the erasure processing, and displaying the residual text content continuously.
For example, after the user completes the second erasing operation, the text positioning boxes left after the last second erasing operation is performed on the hit text positioning boxes are determined, the rest text content is determined from the text content according to the rest text positioning boxes (including the missed text positioning boxes and the rest text positioning boxes after erasing), and the rest text content is displayed continuously. The displaying of the remaining text content may be that after one or more text content words are erased, the original position of the erased text content is removed from the redisplayed text, and the original position of the erased text content is filled with the subsequent remaining text content, so that after part of the text content is erased, the displaying of the remaining text content is coherent, instead of freeing the original position of the erased text content.
At this time, the text content displayed on the writing application interface is composed of the remaining text content, and the text content other than the remaining text content in the original text content is deleted, so that the display effect that part of the text content is erased is presented. In one embodiment, when the content of the remaining text is displayed continuously, the positions of the characters and/or symbols of the remaining text are adaptively adjusted, so that the display effect after the content is erased is improved.
In the embodiment of the application, the text objects are determined according to the text content displayed in the writing application interface, one or more text positioning boxes are created on the writing application interface according to each text object, the writing handwriting on the writing application interface is erased according to the first erasing operation on the writing application interface, the erasing processing is carried out on the text positioning boxes hit by the second erasing operation on the writing application interface, the residual text content is determined from the text content according to the text positioning boxes after the erasing processing, the residual text content is displayed continuously, the dynamic erasing processing of the text content corresponding to the second erasing operation is realized, and the self-adaptive adjustment of the text content after the erasing processing is realized through the continuous display of the residual text content, so that the flexibility of the text erasing operation is effectively improved, and the user experience is improved.
On the basis of the above embodiment, fig. 2 shows a flowchart of another content erasing method according to an embodiment of the present application, where the content erasing method is embodied in the above content erasing method. Referring to fig. 2, the content erasing method includes:
and S210, receiving a triggering operation of a content erasing function, determining text objects according to text content displayed in a writing application interface, and creating one or more text positioning boxes on the writing application interface according to each text object.
S220, receiving a first erasing operation on the writing application interface, and erasing writing marks on the writing application interface according to the first erasing operation.
S230, receiving a second erasing operation on the writing application interface, determining an erasing range corresponding to an erasing point of the second erasing operation on the writing application interface, and determining a text positioning box intersected with the erasing range as a text positioning box hit by the second erasing operation.
Illustratively, after receiving a second erase operation performed on the writing application interface, an erase range corresponding to each erase point in an erase path of the second erase operation on the writing application interface is determined. In one embodiment, the erasing range may be a circular range with the erasing point as a center and the set length as a radius, wherein the set length may be determined according to the set width of the eraser.
After determining the erasure range, determining a text bounding box having an intersection with the erasure range, and determining the text bounding box having an intersection with the erasure range as the text bounding box hit by the second erasure operation. According to the scheme, the hit text positioning frame is accurately determined according to the intersection condition of the erasing range and the text positioning frame, which is determined by the erasing point of the second erasing operation, so that the hit efficiency and accuracy of the text positioning frame are effectively improved.
In one possible embodiment, when determining the text positioning box intersected with the erasing range as the text positioning box hit by the second erasing operation, the content erasing method provided by the scheme can be that in the case that a plurality of text positioning boxes intersected with the erasing range exist, the uppermost text positioning box in the plurality of text positioning boxes intersected with the erasing range is determined as the text positioning box hit by the second erasing operation.
When a plurality of text positioning boxes intersected with the erasing range are determined according to the erasing range corresponding to the erasing point, a hierarchical relationship between the text positioning boxes intersected with the erasing range is determined, and the text positioning box at the uppermost layer in the text positioning boxes is determined to be the text positioning box hit by the second erasing operation. For example, when multiple pieces of text content are overlaid on the early writing application interface, the second erasing operation may hit text positioning boxes corresponding to multiple overlaid text content at the same time, and the text positioning box on the uppermost layer of the text positioning boxes may be determined as the text positioning box hit by the second erasing operation.
Alternatively, the hierarchy of text boxes may be determined based on the corresponding text content. For example, the later (i.e., closer to the current time) the text content corresponding to the text positioning box is added to the writing application interface and/or is manipulated (e.g., text editing, text movement, etc.), the higher the corresponding level. According to the scheme, the text locating frame at the uppermost layer in the plurality of text locating frames which are intersected with the erasing range at the same time is determined to be the text locating frame hit by the second erasing operation, so that the hit efficiency and accuracy of the text locating frame are effectively improved, and the content erasing accuracy is improved.
S240, determining intersection information of an erasing range corresponding to the erasing point of the second erasing operation on the writing application interface and the hit text positioning box.
S250, determining the rest text positioning boxes in the text positioning boxes hit by the second erasing operation according to the intersection information.
After determining the text positioning box hit by the erasing point corresponding to the second erasing operation, further erasing the hit text positioning box according to the second erasing operation. Illustratively, intersection information of an erasure range corresponding to an erasure point of the second erasure operation on the writing application interface and the hit text positioning box is determined. The intersection information may reflect the intersection condition of the erasure range and the hit text positioning box, and optionally, the intersection information may be a start point and an end point of a minimum circumscribed rectangle corresponding to the intersection of the erasure range and the text positioning box.
Further, determining a part to be erased and the rest part in the text positioning boxes hit by the second erasing operation according to the intersection information, wherein the rest part is the rest text positioning boxes in the hit text positioning boxes. For example, the part to be erased in the hit text positioning box is determined according to the starting point and the ending point of the minimum circumscribed rectangle corresponding to the intersection of the erasing range and the text positioning box, and the rest part of the text positioning box is the rest part. According to the scheme, the text locating boxes which are hit are accurately determined according to the intersection information of the erasing range and the text locating boxes which are hit, and the remaining text locating boxes are left after the erasing processing, so that the accuracy of determining the content of the remaining text is improved, and the content erasing effect is guaranteed.
In one embodiment, the text positioning boxes provided in the present embodiment may be stored in a positioning box list, as shown in a schematic diagram of a determination flow of remaining text positioning boxes provided in fig. 3, where the content erasing method provided in the present embodiment includes, when determining, according to intersection information, remaining text positioning boxes in the text positioning boxes hit by the second erasing operation:
S251, determining the rest text positioning boxes in the text positioning boxes hit by the second erasing operation according to the intersection information.
And S252, adding the rest text positioning boxes to the positioning box list, and deleting the hit text positioning boxes from the positioning box list.
Illustratively, when a text bounding box is created on a writing application interface from a text object, the created text bounding box is recorded into a bounding box list. After intersection information of the hit text positioning boxes and an erasure range corresponding to erasure points of the second erasure operation on the writing application interface is determined, remaining text positioning boxes hit by the second erasure operation are determined according to the intersection information. For example, determining the part to be erased in the hit text positioning box according to the starting point and the ending point of the minimum circumscribed rectangle corresponding to the intersection of the erasing range and the text positioning box, wherein the rest part of the text positioning box is the rest text positioning box.
Further, the above-determined remaining text positioning boxes are added to the positioning box list, and the hit text positioning box is deleted from the positioning box list, and at this time, the hit text positioning box is updated as the remaining text positioning box. If the next erasing point still hits the remaining text positioning box, the remaining text positioning box is used as the hit text positioning box for erasing processing. According to the scheme, the text positioning boxes are recorded through the positioning box list, and then when the residual text content is determined from the text content according to the erased text positioning boxes, the residual text positioning boxes can be rapidly determined from the positioning box list, the residual text content is rapidly determined according to the residual text positioning boxes, and the content erasing accuracy and efficiency are improved.
In one possible embodiment, the positioning frame starting point position and the positioning frame end point position of the text positioning frame provided by the scheme can be recorded in the positioning list, and based on the positioning list, the content erasing method provided by the scheme further comprises adding the positioning frame starting point position and the positioning frame end point position of the rest text positioning frame to the positioning list after determining the rest text positioning frame in the text positioning frame hit by the second erasing operation according to intersection information, and deleting the positioning frame starting point position and the positioning frame end point position of the hit text positioning frame from the positioning list.
For example, when a text positioning box is created on a writing application interface according to a text object, the created text positioning box is recorded in a positioning list, and a positioning box start point position and a positioning box end point position of each text positioning box are added to the positioning list. Alternatively, the starting position and the ending position of the positioning frame of the text positioning frame may be determined according to the diagonal positions (such as the upper left corner and the lower right corner) of the text positioning frame, or may be determined according to the positions of the lower left corner and the lower right corner of the text positioning frame, and the width of the text positioning frame may be determined according to the text height of the corresponding text content.
After the remaining text positioning boxes hit by the second erasing operation are determined, the positioning box starting point positions and the positioning box end point positions of the remaining text positioning boxes are added into a positioning list, and the positioning box starting point positions and the positioning box end point positions of the hit text positioning boxes are deleted from the positioning list, and at the moment, the positioning box starting point positions and the positioning box end point positions corresponding to the hit text positioning boxes are updated to the positioning box starting point positions and the positioning box end point positions of the corresponding remaining text positioning boxes. According to the method, the starting point position and the ending point position of the positioning frame of the text positioning frame are recorded through the positioning list, when the text content to be erased and the residual text content are determined from the text content according to the erased text positioning frame, the erased text positioning frame and the residual text positioning frame can be rapidly determined from the positioning list, the text content to be erased and the residual text content can be rapidly determined according to the erased text positioning frame and the residual text positioning frame, and the content erasing accuracy and the content erasing efficiency are improved.
As shown in a schematic display diagram of an erasure range and hit text positioning boxes provided in fig. 4, it is assumed that the starting point and the ending point of the text positioning box are represented by the lower left corner and the lower right corner of the text positioning box, the width of the text positioning box can be determined according to the text height of the corresponding text content, the lower left corner of the hit text positioning box a is assumed to be point a, the lower right corner is assumed to be point b, the text positioning box a is recorded in the positioning box list, and the positioning box starting point position a and the positioning box ending point b of the text positioning box are recorded in the positioning list.
Assuming that the center of the erasure range D11 (i.e., the erasure point) is below the text positioning frame A1, the line segment ab forms a cutting line for the erasure range D11, the intersection points of the cutting line and the erasure range D11 are c and D, respectively, c and D are the start point and the end point of the smallest circumscribed rectangle corresponding to the intersection of the erasure range D11 and the text positioning frame A1, at this time, the range corresponding to c to D in the text positioning frame A1 is the part to be erased, the range corresponding to a to c and D to b is the rest part, and the text positioning frame corresponding to a to c in the hit text positioning frame A1 is the text positioning frame a11 corresponding to D to b, which is equivalent to erasing the part c to D in the text positioning frame A1. And deleting the positioning frame starting point position a and the positioning frame end point b of the text positioning frame A1 from the positioning frame list, and adding the positioning frame starting point position a and the positioning frame end point c of the text positioning frame A11 and the positioning frame starting point position d and the positioning frame end point b of the text positioning frame A12 to the positioning list.
Assuming that the center (i.e., the erasing point) of the erasing range D12 is inside the text positioning frame A1, two extreme points e and f in the horizontal direction of the erasing range D12 are the start point and the end point of the smallest circumscribed rectangle corresponding to the intersection of the erasing range D12 and the text positioning frame A1, at this time, the ranges corresponding to e to f in the text positioning frame A1 are the parts to be erased, the ranges corresponding to a to e and f to b are the rest parts, and the text positioning frames corresponding to a to e in the hit text positioning frame A1 are the text positioning frames a13 corresponding to a to e and the text positioning frames a14 corresponding to f to b, which are equivalent to erasing the parts e to f in the text positioning frame A1. And deleting the positioning frame starting point position a and the positioning frame end point e of the text positioning frame A13, and the positioning frame starting point position f and the positioning frame end point b of the text positioning frame A14 from the positioning list. Recording the text positioning frame through the positioning frame list, recording the starting point position and the end point position of the positioning frame of the text positioning frame through the positioning list, and then quickly determining the erased text content and the residual text content from the positioning list when determining the text content and the residual text content to be erased from the text content according to the erased text positioning frame, and quickly determining the starting point position and the end point position of the corresponding positioning frame and the erased text positioning frame and the residual text positioning frame according to the erased text positioning frame and the residual text positioning frame, and the starting point position and the end point position of the positioning frame, thereby improving the content erasing accuracy and efficiency.
In one possible embodiment, the content erasing method provided by the scheme further comprises the steps of determining the text content to be erased from the text content according to the text positioning box after the erasing processing according to the second erasing operation, and redrawing the text content to be erased according to the set display effect.
For example, after determining to erase the hit text positioning box, determining the text content to be erased from the text content according to the erased text positioning box. For example, according to the starting position and the ending position of the positioning frame of each text positioning frame recorded in the positioning list, determining the erased text positioning frame, determining the text content to be erased according to the erased text positioning frame, and redrawing the text content to be erased according to the set display effect. Optionally, the display effect is set to indicate transparency, size, text color, background color, whether highlighting is added, whether underlining is added, whether a strikethrough is added, and the like of the text content. According to the scheme, the text content to be erased is redrawn according to the set display effect, so that a user can observe the text content to be erased in real time, the dynamic erasing effect of the text content is realized, the editing capability of the text content is enriched, the text content in the interactive tablet is enabled to have more operation possibility, and the user experience is improved.
In one embodiment, when the text content to be erased is redrawn according to the set display effect, the text content to be erased may be redrawn according to the second transparency. Alternatively, the second transparency may have a transparency in the range of 50% to 100%. For example, when the second transparency is 100%, the content weight of the text to be erased is drawn as the text content which is completely transparent, the display effect that the text to be erased is displayed, when the second transparency is lower than 100%, the user can observe that the text to be erased is lighter, the user can more intuitively know the condition that the text content is erased, and the user experience is improved.
And S260, determining the residual text content from the text content according to the text positioning box after the erasure processing, and displaying the residual text content continuously.
In one possible embodiment, the starting position and the ending position of the positioning frame of the text positioning frame provided by the scheme can be recorded in the positioning list, and based on the positioning frame starting position and the ending position of the positioning frame, when the content erasing method provided by the scheme determines the residual text content from the text content according to the text positioning frame after the erasing process, the content erasing method can determine the residual text content covered by the text positioning frame after the erasing process from the text content according to the starting position and the ending position of the positioning frame of each text positioning frame in the positioning list.
After the hit text positioning boxes are erased according to the second erasing operation, the starting position and the ending position of the positioning boxes of each text positioning box in the positioning list are determined, and the rest text content covered by the erased text positioning boxes (including the text positioning boxes which are not hit and the rest text positioning boxes which are erased) is determined from the text content according to the starting position and the ending position of the positioning boxes of each text positioning box, wherein the rest text content covered by the text positioning boxes in the positioning box list is the text content which is not erased by the second erasing operation. According to the method and the device, the residual text content covered by the residual text positioning boxes after the erasing processing is accurately determined according to the starting point positions and the ending point positions of the positioning boxes of the text positioning boxes in the positioning list, the text content to be reserved is rapidly determined, and the content erasing accuracy and efficiency are improved.
Optionally, after the user completes the second erasing operation, determining the remaining text positioning boxes after the hit text positioning boxes are subjected to the second erasing operation for the last time, determining the remaining text content from the text content according to the remaining text positioning boxes (including the missed text positioning boxes and the remaining text positioning boxes after erasing), and then performing a stitching process on the remaining text content to continuously display the remaining text content. In a possible embodiment, when the content erasing method provided by the scheme is used for displaying the residual text content in a coherent manner, the residual text content can be spliced in sequence according to the coordinate sequence of the starting position and the ending position of the positioning frame of each text positioning frame in the positioning list.
After determining the residual text content covered by the text positioning boxes recorded in the current positioning box list, the determined residual text content is spliced in sequence according to the coordinate sequence from left to right and from top to bottom of the starting position and the ending position of the positioning boxes of the text positioning boxes in each positioning list, so as to obtain a content erasing result responding to the second erasing operation. According to the scheme, the residual text content is spliced according to the coordinate sequence of the starting point position and the ending point position of the positioning frame in the positioning list, so that the accurate and orderly splicing of the residual text content is ensured, and the content erasing effect is ensured.
As shown in a schematic diagram of a text content changing process provided in fig. 5, T1 is text content corresponding to "today's weather is good", where the text content T1 is a line of characters. A text object S1 is determined from the text content T1 (the text object is represented by a dashed box), and a text positioning box A2 is created on the writing application interface further from the text object S1.
After receiving the second erasing operation, assuming that the second erasing operation corresponds to the position of the "day" word in the "weather" (assuming that a plurality of erasing points of the second erasing operation hit the "day" word), at this time, the text positioning frame A2 in the second erasing operation, the corresponding "day" word is the text content to be erased, after the text positioning frame A2 is subjected to the second erasing operation, the hatched portion in the figure is the erased portion of the text positioning frame A2, the text positioning frame A2 is divided into the text positioning frames a21 and a22, the text positioning frame A2 can be deleted from the positioning frame list, the positioning frame start position and the positioning frame end position corresponding to the text positioning frame A2 are deleted from the positioning frame list, and the text positioning frames a21 and a22 are added to the positioning frame list, and the positioning frame start position and the positioning frame end position corresponding to the text positioning frames a21 and a22 are added to the positioning list. Meanwhile, the text content "day" with overlapping in the erased part of the text positioning box A2 is redrawn as transparent text. After the second erasing operation is completed, determining the 'today' and 'Qihao' of the residual text contents covered by each text positioning frame according to the starting point position and the ending point position of the positioning frame in the positioning list, and splicing the residual text contents according to the coordinate point sequence, wherein the 'Qihao' is moved forwards by a distance corresponding to the 'day', and the corresponding content erasing result is 'today Qihao'.
As shown in another schematic diagram of the text content changing process provided in fig. 6, T2 in the figure is text content corresponding to "today's weather is good", where text content T2 is two lines of text, the first line of text in text content T2 is "today's weather", and the second line of text is "good". A text object S2 is determined from the text content T2 (the text object is represented by a dashed box), and text positioning boxes A3 and A4 are further created on the writing application interface from the text object S2.
After the second erasing operation is received, it is assumed that the erasing points correspond to the positions of the "weather" words (it is assumed that a plurality of erasing points of the second erasing operation hit the "day" and/or the "air" words), at this time, the text positioning frame A3 in the second erasing operation corresponds to the text content to be erased, after the text positioning frame A3 is subjected to the second erasing operation, the hatched portion in the figure is the erased portion of the text positioning frame A3, the text positioning frame A3 is divided into the text positioning frames a31 and a32, the text positioning frame A3 can be deleted from the positioning frame list, the positioning frame start position and the positioning frame end position corresponding to the text positioning frame A3 are deleted from the positioning frame list, the text positioning frames a31 and a32 are added to the positioning frame list, and the positioning frame start position and the positioning frame end position corresponding to the text positioning frames a31 and a32 are added to the positioning list. Meanwhile, the text content 'weather' where the erased part of the text positioning box A3 is overlapped is redrawn into transparent characters. After the second erasing operation is completed, determining the 'today' and 'true' of the residual text contents covered by each text positioning frame according to the starting point position and the ending point position of the positioning frame in the positioning list, and splicing the residual text contents according to the coordinate point sequence, wherein the 'true' moves forward by a distance corresponding to the 'weather', and the corresponding content erasing result is 'today' is true.
In one possible embodiment, the content erasing method provided by the scheme can further comprise the steps of receiving a third erasing operation on the writing application interface and erasing the graphic elements on the writing application interface according to the third erasing operation.
For example, a graphical element may be inserted in the writing application interface while running a whiteboard application on the content erasing device. After the content erasing device enters an erasing mode, a user can initiate a third erasing operation on the graphic elements to be erased on the writing application interface by using media such as a handwriting pen, an blackboard eraser, a hand and the like. The content erasing device determines the graphic element hit by the third erasing operation after detecting the third erasing operation performed on the writing application interface, and erases the graphic element hit by the third erasing operation on the writing application interface. According to the method and the device, the graphic elements on the writing application interface are erased through responding to the third erasing operation on the writing application interface, so that the flexibility of text erasing operation is effectively improved, and the user experience is improved.
In one possible embodiment, the content erasing method provided by the scheme can further comprise determining text objects according to the residual text content displayed in the writing application interface and creating one or more text positioning boxes on the writing application interface according to each text object when the continuous display of the residual text content in the writing application interface is completed.
For example, after completing the coherent display of the remaining text content in the writing application interface, the text positioning box currently displayed on the writing application interface may be cleared, the text object corresponding to the remaining text content displayed in the writing application interface may be determined, a hit text positioning box may be created on the writing application interface according to each text object, and the erasing operation on the text content may be performed subsequently based on the newly created text positioning box. The text positioning box is created according to the residual text content displayed in the writing application interface, and the text positioning box is created according to the text content displayed in the writing application interface by referring to the content erasing method provided by the scheme, so that the corresponding technical effect is achieved, and the scheme is not repeated. According to the scheme, when the coherent display of the residual text content in the writing application interface is completed, the text positioning box is re-created on the writing application interface according to the residual text content displayed in the writing application interface, and then the erasing operation of the text content can be executed based on the newly created text positioning box, so that the situation that the erasing operation of the subsequent text content is abnormal due to the fact that the text positioning box does not correspond to the residual text content after the text content is erased once is reduced, and the subsequent text content can be correctly erased is ensured.
In the embodiment of the application, the text objects are determined according to the text content displayed in the writing application interface, one or more text positioning boxes are created on the writing application interface according to each text object, the writing handwriting on the writing application interface is erased according to the first erasing operation on the writing application interface, the erasing processing is carried out on the text positioning boxes hit by the second erasing operation on the writing application interface, the residual text content is determined from the text content according to the text positioning boxes after the erasing processing, the residual text content is displayed continuously, the dynamic erasing processing of the text content corresponding to the second erasing operation is realized, and the self-adaptive adjustment of the text content after the erasing processing is realized through the continuous display of the residual text content, so that the flexibility of the text erasing operation is effectively improved, and the user experience is improved. And accurately determining the rest text positioning boxes after the erasure processing according to the intersection information of the erasure range and the hit text positioning boxes, thereby improving the determination accuracy of the rest text content and ensuring the content erasure effect. And through redrawing the text content to be erased according to the set display effect, the user can observe the text content to be erased in real time conveniently, the dynamic erasing effect of the text content is realized, the editing capability of the text content is enriched, the text content in the interactive tablet has more operation possibility, and the user experience is improved.
The embodiment of the application also provides a content erasing device which can realize the content erasing method provided by any embodiment of the application. Fig. 7 is a schematic structural diagram of a content erasing apparatus according to an embodiment of the present application. Referring to fig. 7, the content erasing apparatus includes an input device 73, an output device 74, a memory 72, and one or more processors 71, the memory 72 storing one or more programs, which when executed by the one or more processors 71, cause the one or more processors 71 to implement the content erasing method as provided in the above-described embodiments. Wherein the input device 73, the output device 74, the memory 72 and the processor 71 may be connected by a bus or otherwise, for example in fig. 7.
The memory 72 is a computer readable storage medium that can be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the content erasure method provided by any of the embodiments of the present application. The memory 72 may mainly include a storage program area that may store an operating system, application programs required for at least one function, and a storage data area that may store data created according to use of the device, etc. In addition, memory 72 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 72 may further include memory located remotely from processor 71, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 73 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output device 74 may include a display device such as a display screen.
The processor 71 executes various functional applications of the device and data processing, i.e., implements the content erasure method described above, by running software programs, instructions, and modules stored in the memory 72.
The content erasing device and the computer provided by the above can be used for executing the content erasing method provided by any embodiment, and have corresponding functions and beneficial effects.
The embodiment of the application also provides a storage medium storing computer executable instructions, which when executed by a computer processor are used for executing the content erasing method provided by the embodiment, the content erasing method comprises the steps of receiving a content erasing function triggering operation, determining text objects according to text content displayed in a writing application interface, creating one or more text positioning boxes on the writing application interface according to each text object, wherein the writing application interface displays writing handwriting and the text content, the text content is in a standard font format, receiving a first erasing operation on the writing application interface, erasing the writing handwriting on the writing application interface according to the first erasing operation, determining a text positioning box hit by the second erasing operation, performing erasing processing on the hit text positioning boxes according to the second erasing operation, determining residual text content from the text content according to the text positioning boxes after the erasing processing, and displaying the residual text content in a coherent manner.
Storage media-any of various types of memory devices or storage devices. The term "storage medium" is intended to include mounting media such as CD-ROM, floppy disk or tape devices, computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc., non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage), registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a second, different computer system connected to the first computer system through a network such as the internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected by a network). The storage medium may store program instructions (e.g., embodied as a computer program) executable by one or more processors.
Of course, the storage medium storing the computer executable instructions provided in the embodiments of the present application is not limited to the content erasing method provided above, and may also perform the related operations in the content erasing method provided in any embodiment of the present application.
The content erasing apparatus and the storage medium provided in the above embodiments may perform the content erasing method provided in any embodiment of the present application, and technical details not described in detail in the above embodiments may be referred to the content erasing method provided in any embodiment of the present application.
The foregoing description is only of the preferred embodiments of the application and the technical principles employed. The present application is not limited to the specific embodiments provided herein, and various obvious changes, rearrangements and substitutions can be made by those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit of the application, the scope of which is set forth in the following claims.