Stroke erasing method, electronic device, medium, and program product

By using cached bitmap technology in the electronic whiteboard, the non-erasable image is stored in the foreground layer and the background layer image is removed, which solves the problems of layer changes and flickering during the erasure process and improves the user experience.

WO2026103725A1PCT designated stage Publication Date: 2026-05-21ZTE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
ZTE CORP
Filing Date
2025-11-12
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

When erasing an erasable image onto a non-erasable image on an electronic whiteboard, it causes noticeable changes in hierarchy and brief flickering, affecting the user experience.

Method used

By using a cached bitmap to store the non-erasable image and mapping it onto the foreground layer, while removing the erasable image from the background layer, the foreground layer is rendered overlaid on the background layer, avoiding layer changes and flickering.

Benefits of technology

This effectively avoids the user visually perceiving changes in hierarchy and brief flickering of non-erasable images, thus improving the user experience of erasing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025134308_21052026_PF_FP_ABST
    Figure CN2025134308_21052026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides a stroke erasing method, comprising: in response to receiving an erase operation instruction, determining a first image corresponding to the erase operation instruction in a cache bitmap, and determining a second image corresponding to the erase operation instruction in a background layer, wherein the cache bitmap is used for storing a non-erasable image in the background layer; mapping the first image into a foreground layer, and removing the second image in the background layer, wherein the foreground layer is a transparent layer overlapping the background layer; and displaying the first image in the foreground layer and an image in the background layer after the second image is removed. The present invention further provides an electronic device, a computer-readable medium, and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

Stroke erasure methods, electronic devices, media and software products

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese patent application CN 202411626651.1, filed on November 13, 2024, entitled “Stroke erasing method, electronic device, medium and program product”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure relates to the field of computer technology, and in particular to a stroke erasing method, electronic device, medium, and computer program product. Background Technology

[0004] An electronic whiteboard is a digital device that can replace a traditional blackboard / whiteboard. It allows users to write, erase, and save data using their fingers or a specific pen, without the need for a mouse or keyboard.

[0005] However, when performing an erasure operation on an electronic whiteboard, if the content to be erased covers the content that cannot be erased, the user may observe a significant change in the hierarchy of the displayed content on the electronic whiteboard during the erasure process, which may affect the user experience. Summary of the Invention

[0006] This disclosure provides a stroke erasing method, electronic device, medium, and program product.

[0007] This disclosure provides a stroke erasing method, comprising: in response to receiving an erasing operation instruction, determining a first image corresponding to the erasing operation instruction in a cached bitmap, and determining a second image corresponding to the erasing operation instruction in a background layer, wherein the cached bitmap is used to store non-erasable images in the background layer; mapping the first image to a foreground layer, and removing the second image from the background layer, wherein the foreground layer is a transparent layer overlaid on the background layer; and displaying the first image in the foreground layer and the image in the background layer after removing the second image.

[0008] This disclosure also provides an electronic device, which includes a memory and a processor; the memory stores a computer program, and when the computer program is executed by the processor, the processor implements a stroke erasure method according to an embodiment of this disclosure.

[0009] This disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement a stroke erasure method according to embodiments of this disclosure.

[0010] This disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, causes the processor to implement a stroke erasure method according to an embodiment of this disclosure. Attached Figure Description

[0011] In the accompanying drawings of the embodiments disclosed herein:

[0012] Figure 1 is a schematic flowchart of the stroke erasure method provided in the embodiments of this disclosure;

[0013] Figure 2 is another schematic flowchart of the stroke erasure method provided in an embodiment of this disclosure;

[0014] Figure 3 is a schematic diagram of the structure of the electronic device provided in an embodiment of this disclosure;

[0015] Figure 4 is a schematic flowchart of an exemplary stroke erasure method provided in an embodiment of this disclosure;

[0016] Figure 5 is a schematic diagram of the layers before receiving the erase operation command according to an embodiment of this disclosure;

[0017] Figure 6 is a schematic diagram of a cache bitmap provided in an embodiment of this disclosure;

[0018] Figure 7 is a schematic diagram of layer changes during the erasure operation provided in the embodiments of this disclosure;

[0019] Figure 8 is a schematic diagram of the layer display during the erasure operation provided in an embodiment of this disclosure;

[0020] Figure 9 is a schematic diagram of the stroke erasing system provided in an embodiment of this disclosure. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0022] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.

[0023] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.

[0024] This disclosure may be described with reference to plan and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.

[0025] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0026] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0027] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so specified in this disclosure.

[0028] This disclosure is not limited to the embodiments shown in the accompanying drawings, but includes modifications to the configuration based on the manufacturing process. Therefore, the areas illustrated in the drawings are schematic, and the shapes of the areas shown illustrate specific shapes of areas of an element, but are not intended to be limiting.

[0029] In some related technologies, for electronic whiteboards, users can erase handwriting using designated tools or gestures (e.g., an eraser). There are two main methods for erasing handwriting on electronic whiteboards: full erasure (also known as spot erasure) and precise erasure. Full erasure refers to erasing the entire handwriting or content touched by the eraser in one go. Precise erasure refers to erasing a specific area or portion of the handwriting covered by the eraser without affecting other areas or content not covered by the eraser. Handwriting processed by precise erasure can be completely erased or partially preserved, thus forming new handwriting.

[0030] Different erasure tools are provided for different erasure methods to achieve different erasure effects. For example, the full-stroke erasure eraser can be used to erase all the writing on the electronic whiteboard; and the precision erasure eraser can be used to precisely erase the writing on the electronic whiteboard.

[0031] The content displayed on an electronic whiteboard includes erasable and non-erasable images. Erasable images are those that can be partially erased using the precise erasure eraser, such as drawn strokes. Non-erasable images are those that cannot be partially erased using the full eraser and / or the precise eraser, such as inserted pictures, graphics, tables, mind maps, and text. Erasable images can also be completely erased in one go using the full eraser.

[0032] Based on the two erasing methods mentioned above, when dealing with erasable images, if erasable and non-erasable images overlap, in order not to affect the non-erasable images, the non-erasable images will be redrawn to the bottom of the electronic whiteboard (e.g., the background layer). That is, the non-erasable images are all placed at the bottom layer. Then, after the operation corresponding to the erasing action is completed, the non-erasable images at the bottom layer will be restored and drawn to their original positions.

[0033] However, this approach causes a shift in the hierarchy between erasable and non-erasable images during the erasing process. Users can observe this noticeable shift on the electronic whiteboard. Furthermore, when the non-erasable image is redrawn to the bottom of the whiteboard, a brief flickering of the non-erasable image can be observed, especially when the erasable image is semi-transparent. Both this shift in hierarchy and the flickering result in a poor user experience.

[0034] As an example of a related technology, an image (i.e., an indelible image) is placed on top of an erasable handwriting (i.e., an erasable image), and the process of a user clicking the eraser to erase the handwriting is as follows.

[0035] When a user touches the electronic whiteboard, the image is redrawn at the bottom of the whiteboard, so that the handwriting that was originally covered by the image is on top of the image. This causes the user to be able to observe a clear change in the hierarchy of the image and the handwriting on the electronic whiteboard (that is, the relative hierarchy between the handwriting and the image changes). At the same time, the image being redrawn at the bottom of the electronic whiteboard causes the user to be able to observe a brief flash of the image on the electronic whiteboard.

[0036] When the user stops touching the electronic whiteboard, the image is restored from the bottom layer to its original position (i.e., overlaid on the handwriting). If any handwriting remains on the bottom layer of the image after erasing, that part of the handwriting will be placed back on the bottom layer of the image, allowing the user to observe the layer change on the electronic whiteboard again.

[0037] Therefore, there is an urgent need for an erasure method that can overcome the effects of hierarchical changes and flickering.

[0038] It's worth noting that an electronic whiteboard is an interactive electronic device that allows users to operate it via touch, handwriting, or an electronic pen, flexibly drawing, inserting images, erasing, and performing other operations on the content to be displayed. In some embodiments, the electronic whiteboard can be connected to display devices such as computers and projectors, supporting the display and interaction of multimedia content. Therefore, electronic whiteboards are widely applicable in educational, meeting, and training scenarios.

[0039] The stroke erasing method in this disclosure can be applied not only to electronic whiteboards, but also to other interactive electronic devices, such as interactive touch screens and virtual reality devices. This disclosure does not impose any special limitations on this.

[0040] This disclosure provides a stroke erasing method, referring to Figure 1, which includes the following steps S1 to S3.

[0041] In step S1, in response to receiving an erase operation instruction, the first image corresponding to the erase operation instruction in the cache bitmap and the second image corresponding to the erase operation instruction in the background layer are determined, wherein the cache bitmap is used to store the non-erasable image in the background layer.

[0042] In step S2, the first image is mapped onto the foreground layer, and the second image is removed from the background layer, wherein the foreground layer is a transparent layer superimposed on the background layer.

[0043] In step S3, the first image in the foreground layer and the image in the background layer after removing the second image are displayed.

[0044] In this embodiment, the cached bitmap stores the non-erasable image in the background layer. Upon receiving an erase operation command, the first image corresponding to the erase operation command in the cached bitmap is mapped to the foreground layer, and the second image corresponding to the erase operation command in the background layer is removed. The second image is composed of the erasable image and / or the non-erasable image in the background layer. During rendering, since the foreground layer overlaps and covers the background layer, rendering the background layer with the second image removed and the foreground layer with the first image mapped to it simultaneously to the screen allows both the background layer with the second image removed and the foreground layer with the first image mapped to it to be visually presented at the same time. Compared to the erasure method where the non-erasable image is placed at the bottom layer during erasure, this effectively avoids the problem of layer changes in the user's visual experience. Moreover, since the user cannot see the image changes in the cached bitmap during operation, the process of storing the non-erasable image in the cached bitmap will not produce flickering, thereby improving the user experience.

[0045] The erase operation instruction is an instruction to define the area to be erased, used to instruct the erasure of the corresponding second image in the background layer. The second image includes an erasable image and / or a non-erasable image. The erase operation instruction is also used to instruct the mapping of the corresponding first image in the cached bitmap to the foreground layer, so as to produce a visual effect in which the erasable image in the area to be erased in the background layer is removed, while the non-erasable image is retained. In some embodiments, the erase operation instruction can be an instruction for a full erase operation or an instruction for a precise erase operation, and this disclosure is not limited thereto.

[0046] The background layer includes non-erasable and / or erasable images, and the foreground layer is the layer above the background layer, and vice versa. Here, "upper layer" and "lower layer" refer to the overlay relationship between the foreground layer and the background layer in the user-facing visual presentation; that is, the content of the foreground layer covers the content of the background layer. In some embodiments, the foreground layer and background layer have the same layer attribute configuration information, and their size and position attributes are configured identically. It is worth noting that the foreground layer is a transparent layer; in the absence of an erase operation command, the foreground layer contains no image content, and the content of the lower layer (i.e., the background layer) can be seen through the foreground layer.

[0047] A cached bitmap is a bitmap that pre-stores an image (e.g., a non-erasable image in a background layer) in memory for fast access during subsequent operations. A bitmap is composed of pixels, which can be arranged and colored differently to form a pattern. In this embodiment, the cached bitmap is invisible during the erasure operation; that is, it is not rendered or displayed during the operation, therefore, the user cannot see any changes to the cached bitmap.

[0048] In some embodiments, an inerasable image of the background layer is stored in the cache bitmap before an erase operation instruction is received.

[0049] The first image refers to the region in the cache bitmap corresponding to the area to be erased indicated by the erase operation instruction, that is, the intersection area between the area to be erased and the cache bitmap. Since the cache bitmap stores non-erasable images, the first image only contains non-erasable images and does not contain any other image content. The intersection area between the area to be erased and the cache bitmap can be empty, that is, without an image, or it can be part or all of the non-erasable images.

[0050] In some embodiments, the process of mapping the first image to the foreground layer includes: drawing the first image onto the foreground layer, wherein the position and size of the first image in the foreground layer are the same as the position and size of the second image in the background layer.

[0051] The second image refers to the area in the background layer corresponding to the area to be erased indicated by the erase operation command, that is, the intersection area between the area to be erased and the image in the background layer. Since the background layer can include both non-erasable and erasable images, the second image corresponding to the erase operation command in the background layer can be empty, that is, there is no image, or it can be a non-erasable image and / or part or all of the non-erasable image and / or the erasable image.

[0052] In some embodiments, the method further includes: in response to acquiring an erase instruction, and / or in response to receiving a touch instruction with a touch area greater than a preset area threshold, storing an indelible image in the background layer to a cached bitmap.

[0053] In embodiments of this disclosure, the inerasable image can be stored in a cached bitmap after receiving an erase command. The cached bitmap stores the inerasable image in the background layer at the moment the erase command is received. The erase command is obtained based on the user's erase operation intention, which can be an eraser selection command, voice, etc., and this disclosure is not limited thereto.

[0054] In embodiments of this disclosure, when a touch command is sensed and the touch area corresponding to the touch command is identified to be greater than a preset area threshold, the inerasable image can be stored in a cache bitmap. The cache bitmap stores the inerasable image in the background layer at the moment the touch operation is received. A touch area greater than the preset area threshold indicates that the touch command comes from a specific touch tool (e.g., a specially designed capacitive eraser), thereby determining that the user currently intends to erase.

[0055] As one embodiment of this disclosure, when a user selects the eraser control in the toolbar of the electronic whiteboard, it means that the user's next operation will be an erasure operation. Therefore, the received eraser selection instruction can be used as an erasure instruction. This disclosure does not impose any special limitations on the method of obtaining the erasure instruction.

[0056] As another embodiment of this disclosure, when a user touches the screen using a specially designed capacitive eraser, since the capacitive eraser differs from other capacitive accessories in that the touch area of ​​other capacitive accessories is smaller than a preset area threshold, while the touch area of ​​the capacitive eraser is larger than the preset area threshold, it can be determined that the user is currently using a capacitive eraser when the touch area is larger than the preset area threshold. Since the capacitive eraser is used to perform an erasing operation, it means that the user's touch operation is an erasing operation, thereby storing the non-erasable image in the background layer to the cache bitmap.

[0057] It is worth noting that when there is no indelible image in the background layer, the indelible image will not be stored in the cache bitmap, or the content stored in the cache bitmap will be empty.

[0058] In some embodiments, the method further includes: storing the inerasable image to a cached bitmap in response to generating an inerasable image.

[0059] In embodiments of this disclosure, when generating an indelible image in the background layer, the indelible image in the background layer can be stored in a cached bitmap.

[0060] In some embodiments, after storing the indelible image to a cached bitmap in response to generating the indelible image, the method further includes: updating the indelible image stored in the cached bitmap in response to receiving an adjustment instruction for the indelible image.

[0061] In embodiments of this disclosure, the image stored in the cache bitmap changes with the change of the non-erasable image stored in the background layer. When the non-erasable image in the background layer changes, the cache bitmap responds to the adjustment instruction and updates the stored non-erasable image so that the first image obtained when the erase operation instruction is received can correspond to the current background layer, avoiding the situation where the rendered first image and the image after removing the second image in the background layer do not match.

[0062] In some embodiments, determining the first image corresponding to the erase operation instruction in the cache bitmap includes: obtaining a first sampling point of the erase operation instruction in the cache bitmap; and determining the area within a first preset radius corresponding to the first sampling point as the first image, with the first sampling point as the center.

[0063] In embodiments of this disclosure, an erase operation instruction is used to delineate a first image in a cached bitmap. Based on the user's actions on an input device (e.g., an electronic whiteboard, a touchscreen, etc.), multiple first sampling points in the cached bitmap are collected to determine the first image. The first image delineated by the erase operation instruction is composed of all images within a first preset radius region centered on the first sampling point. In some embodiments, the first sampling point can be obtained by sampling at a first preset frequency. Both the first preset frequency and the first preset radius can be set according to actual conditions, and this disclosure is not limited thereto.

[0064] It is worth noting that the embodiments disclosed herein do not impose any special restrictions on the method of delineating the first image in the cache bitmap according to the area to be erased corresponding to the erase operation instruction.

[0065] As an example, a user selects the eraser control in the toolbar of the electronic whiteboard and then performs an erasing action on the whiteboard via touch. During the erasing action, the user first touches pixel A, then slides to pixel B and releases. The entire erasing action from A to B is sampled at a first preset frequency, resulting in multiple first sampling points. Subsequently, the positions of these first sampling points in the cached bitmap are determined, and for each first sampling point, a region within a first preset radius in the cached bitmap is defined as the first sub-image corresponding to that first sampling point. The first image is composed of all the first sub-images corresponding to the first sampling points, and this first image is the image to be mapped to the foreground layer.

[0066] In some embodiments, determining the second image corresponding to the erase operation instruction in the background layer includes: acquiring a second sampling point of the erase operation instruction in the background layer; and determining the area within a second preset radius corresponding to the second sampling point as the second image, with the second sampling point as the center.

[0067] In embodiments of this disclosure, an erase operation command is used to delineate a second image in the background layer. Based on the user's actions on the input device (e.g., an electronic whiteboard, touchscreen, etc.), multiple second sampling points in the background layer are collected to determine the second image. The second image delineated by the erase operation command is composed of all images within a second preset radius region centered on the second sampling points. In some embodiments, the second sampling points can be obtained by sampling at a second preset frequency. Both the second preset frequency and the second preset radius can be set according to actual conditions, and this disclosure is not limited thereto.

[0068] It is worth noting that the embodiments disclosed herein do not impose any special restrictions on the method of delineating the second image in the background layer according to the area to be erased corresponding to the erasure operation instruction.

[0069] As an example, a user uses a capacitive eraser to erase on a touchscreen. During the erasing action, the erasing action is sampled at a second preset frequency, resulting in multiple second sampling points. Subsequently, the positions of these second sampling points within the background layer are determined. For each second sampling point, a region within a second preset radius in the background layer, centered on the second sampling point, is defined as the corresponding second sub-image. The second image, which is the image to be cleared, is composed of all the second sub-images corresponding to the second sampling points.

[0070] In some embodiments, removing the second image from the background layer includes setting the pixel value of each pixel corresponding to the second image to a preset configuration value corresponding to the erase operation instruction.

[0071] In the embodiments of this disclosure, after determining the first image and the second image, the second image (including erasable and / or non-erasable images) in the background layer is removed, and the first image (including non-erasable images) mapped to the foreground layer can be displayed due to the superposition relationship between the foreground layer and the background layer, thereby presenting a display effect in which only the erasable image has been removed.

[0072] In some embodiments, the preset configuration value corresponding to the erase operation command can be a first preset initial value that is the same as the background color of the background layer. For example, if the background layer is a layer that simulates white paper, then the background color of the background layer is white, and the first preset initial value is the pixel value of the white pixel.

[0073] In some other embodiments, the preset configuration value corresponding to the erase operation command can also be a specified pixel value, such as a transparent pixel value, a black pixel value, etc., and this disclosure is not limited thereto.

[0074] It is worth noting that all parts of the foreground layer except for the mapped first image are transparent. Transparency means that parts of the background layer can show through and present the image, thus achieving the erasure of the erasureable image without affecting the user's visual effect of the non-erasureable image.

[0075] Compared to some related technologies that place the non-erasable content at the bottom layer (the layer below the background layer) while retaining the erasable image in the background layer, the erasing method of this disclosure does not result in a significant change in the layer hierarchy between the non-erasable and erasable images. Moreover, since the background layer and the foreground layer are rendered and displayed simultaneously, the brief flickering phenomenon of the non-erasable image is avoided.

[0076] In some embodiments, referring to FIG2, after step S3, the method further includes steps S4 to S7.

[0077] In step S4, in response to the end of the erasure operation, the target image is determined based on the first image and the image after removing the second image from the background layer.

[0078] In step S5, the background layer and the foreground layer are cleared.

[0079] In step S6, the target image is mapped onto the cleared background layer.

[0080] In step S7, the target image in the background layer is displayed.

[0081] In the embodiments of this disclosure, after the erasure operation ends, a target image is calculated based on the first image and the image after removing the second image from the background layer. The target image is the image to be finally presented in the background layer. This disclosure does not impose any special limitations on the method of calculating the target image. Since the foreground layer is a transparent layer superimposed on the background layer, and multiple erasure operations may be involved for the same image area in the same background layer, after each erasure operation, the target image after the current erasure operation is determined, and the background and foreground layers are cleared, so that the foreground layer is restored to a transparent layer, the background layer is restored to its default configuration, and then the target image is mapped onto the background layer to display the target image in the background layer. Simultaneously, the foreground layer is displayed. Since the foreground layer is a transparent layer above the background layer, the simultaneously displayed foreground layer does not affect the visual display effect of the target image. When the next erasure operation instruction is received, the transparent foreground layer can be used again to cache and display the second image corresponding to the next erasure operation instruction during the erasure process, avoiding the problem of second image conflicts between multiple erasure operations.

[0082] The visual effect of overlaying the first image and the background image after removing the second image is the same as the visual effect of the target image.

[0083] It is worth noting that the default configuration of the background layer can be either completely white or transparent, and this disclosure does not limit it to this.

[0084] In some embodiments, when an indelible image is stored in a cache bitmap in response to receiving an erase command and / or in response to receiving a touch command with a touch area greater than a preset area threshold, the method further includes: clearing the cache bitmap.

[0085] In the embodiments of this disclosure, when an inerasable image is stored in a cache bitmap after receiving an erase command and / or when a touch command is received that the touch area is greater than a preset area threshold, it indicates that the cache bitmap is empty bitmap data before receiving an erase operation command. Therefore, after the erase operation is completed, the contents of the cache bitmap should be cleared, that is, restored to the state before receiving the erase operation command, so as to avoid image conflict or interference when performing the next operation.

[0086] In some embodiments, clearing the background layer and the foreground layer (i.e., step S5) includes: setting the pixel values ​​of all pixels in the background layer to a first preset initial value, and setting all pixels in the foreground layer to a second preset initial value.

[0087] In the embodiments of this disclosure, after calculating the target image, all pixels in the background layer are restored to a first preset initial value, and all pixels in the foreground layer are restored to a second preset initial value, that is, the foreground and background layers are restored to their initial configuration. Since the foreground layer is initially configured as a transparent layer, the second preset initial value can be a transparent pixel value.

[0088] In some embodiments, the first preset initial value is the configuration value of the background color of the background layer, but this disclosure is not limited thereto.

[0089] In the above embodiments of this disclosure, the cached bitmap is used to store the non-erasable image in the background layer. After receiving the erase operation instruction, the first image (including the non-erasable image) corresponding to the erase operation instruction in the cached bitmap is mapped to the foreground layer, and the second image (including the non-erasable image and / or the erasable image) corresponding to the erase operation instruction is removed from the background layer. When rendering and displaying the first image in the foreground layer and the image after removing the second image in the background layer, since the foreground layer overlaps and covers the background layer, it is possible to avoid presenting a hierarchical change between the erasable image and the non-erasable image in the user's visual effect.

[0090] Meanwhile, since the first image in the foreground layer and the image after removing the second image in the background layer are rendered and displayed simultaneously, compared with some related technologies that redraw the indelible content to the bottom layer (the layer below the background layer) during erasure, the embodiments of this disclosure do not require redrawing all the content of the indelible image, which can effectively avoid the problem of brief flickering, thereby improving the user experience when erasing handwriting.

[0091] This disclosure provides an electronic device, as shown in FIG3, which includes a memory 302 and a processor 301. The memory 302 stores a computer program, which, when executed by the processor 301, causes the processor 301 to implement the stroke erasure method according to the embodiments of this disclosure.

[0092] The processor 301 and the memory 302 are connected through one or more I / O interfaces 303, which are configured to enable information exchange between the processor 301 and the memory 302.

[0093] Processor 301 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); memory 302 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); I / O interface (read / write interface) 303 is connected between processor 301 and memory 302, enabling information exchange between processor 301 and memory 302, including but not limited to a data bus (Bus).

[0094] This disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement a stroke erasure method according to various embodiments of this disclosure.

[0095] This disclosure provides a computer program product, which includes a computer program that, when executed by a processor, causes the processor to implement a stroke erasure method according to various embodiments of this disclosure.

[0096] To enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of this disclosure, the technical solutions provided by the embodiments of this disclosure will be described in detail below through specific embodiments.

[0097] Example 1

[0098] Exemplarily, as a specific embodiment of this disclosure, referring to Figures 4 and 5, the foreground layer is a transparent layer overlaid on the background layer. The foreground layer and the background layer have the same size and position. The table in the background layer is a non-erasable image, and the circle-like handwriting markers are erasable images. The table is used to record names and ages, and the recorded content includes two columns: the first column records the name "Zhang San" and the age "25", and the second column records the name "Zhang San" and the age "26". The handwriting markers are superimposed on the table, circling the name "Zhang San" in the first column. The handwriting erasure method includes the following steps 401 to 4010.

[0099] In step 401, the system detects the user's click on the precise erase button in the toolbar of the electronic whiteboard and receives a precise erase command.

[0100] In step 402, the non-erasable image (i.e., the table) is drawn onto a cached bitmap. The cached bitmap exists only in memory and is not rendered to the user. Referring to Figure 6, the cached bitmap only stores the non-erasable image (i.e., the table) stored in the background layer at the moment a precise erase command is received.

[0101] In step 403, an erasure operation command is received, which indicates the area to be erased by the user.

[0102] In step 404, a first image corresponding to the erase operation instruction in the cache bitmap is determined. The first image is the intersection area of ​​the area to be erased by the erase operation instruction and the cache bitmap. The first image is extracted from the cache bitmap and drawn onto the foreground layer.

[0103] The extraction process includes: traversing each pixel of the first image in the cached bitmap, retaining the pixel value of each pixel, and setting each pixel in the other areas of the cached bitmap except for the first image to be transparent, thereby extracting the first image from the cached bitmap.

[0104] In step 405, the second image corresponding to the erase operation instruction in the background layer is determined. The second image is the intersection area of ​​the area to be erased by the erase operation instruction and the background layer. The second image in the background layer is then erased. Referring to Figure 7, the user uses a virtual eraser to erase the handwriting marks. The first image corresponding to the cached bitmap is mapped to the foreground layer, making all areas in the foreground layer except the first image transparent. Since the cached bitmap only stores non-erasable images, the first image mapped to the foreground layer is also a non-erasable image. The second image corresponding to the background layer is erased regardless of whether it is an erasable image or not.

[0105] In step 406, the foreground layer including the first image and the background layer with the second image removed are rendered to the screen simultaneously. Referring to Figure 8, since the foreground layer and the background layer are layers of the same size and position, and the foreground layer is superimposed on the background layer, what is presented to the user is that the first image in the foreground layer completely covers the second image in the background layer, and the content in the background layer not covered by the first image in the foreground layer can be seen through the foreground layer. The first image in the foreground layer retains the non-erasable image (table) but has no erasable image (handwriting markers), while the second image removes both the non-erasable image (table) and the erasable image (handwriting markers). The areas in the foreground layer other than the first image are transparent, and the areas in the background layer other than the second image remain unchanged. Therefore, only the erasable image (handwriting markers) in the area to be erased (the area to be erased refers to the area corresponding to the first image in the foreground layer or the second image in the background layer) is erased, thus presenting the user with only the erasable image (handwriting markers) in the area to be erased (the area to be erased refers to the area corresponding to the first image in the foreground layer or the second image in the background layer).

[0106] In step 407, an erasure operation end command is received, indicating that the user should no longer erase. For example, the system detects that the user clicked on other non-erasable buttons in the whiteboard toolbar.

[0107] In step 408, based on the first image and the image after removing the second image from the background layer, the final display result is calculated, and the final display result is the target image. The visual effect of the target image is that the non-erasable image remains unchanged (i.e., the table is not erased), and the erasable image is erased (i.e., the handwriting markings are erased).

[0108] In step 409, the foreground layer, background layer, and cached bitmap are cleared. The cleared foreground layer is then made transparent, and the target image is drawn onto the cleared background layer.

[0109] In step 4010, the transparent foreground layer and the background layer including the target image are rendered to the screen simultaneously.

[0110] In this example, layer changes and flickering were avoided when erasing handwriting marks on the electronic whiteboard, significantly improving the erasing effect and enhancing the user experience.

[0111] Example 2

[0112] As an example, as a specific form of the embodiment of this disclosure, referring to FIG9, the handwriting erasure system is installed in a computer device (e.g., mobile phone, tablet, personal computer PC, etc.). The handwriting erasure system can be used to process erasure operation commands. The handwriting erasure system includes: a network interface, a user interface, a processor, and a memory.

[0113] A network interface is used to connect computer devices to a network; for example, a network card or wireless adapter.

[0114] The user interface includes at least a touchscreen for human-computer interaction between the user and the computer device, including the selection of erase controls and the sliding delineation of erase areas.

[0115] The processor is used to execute and process user interaction instructions (e.g., erase operation instructions) received from the user interface.

[0116] The memory is used to store data, programs, systems, etc., in a computer device. The memory includes an operating system, a network communication module, a user interface module, and intelligent interactive operating applications. The operating system manages and controls the hardware and software resources of the computer device; the network communication module handles network data transmission and communication connected to the computer device; the user interface module handles data or instructions received by the user interface that interact with the computer device; the intelligent interactive operating applications refer to programs capable of intelligently processing network data, human-computer interaction data, or instructions, and intelligent interaction may include handwriting erasure methods according to embodiments of this disclosure.

[0117] A processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU); a memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); an I / O interface (read / write interface) connects the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to a data bus (Bus).

[0118] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0119] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.

[0120] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0121] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A stroke erasing method, comprising: In response to receiving an erase operation instruction, a first image corresponding to the erase operation instruction in a cached bitmap is determined, and a second image corresponding to the erase operation instruction in a background layer is determined, wherein the cached bitmap is used to store non-erasable images in the background layer; The first image is mapped onto the foreground layer, and the second image is removed from the background layer, wherein the foreground layer is a transparent layer overlaid on the background layer; Displays the first image in the foreground layer and the image in the background layer after removing the second image.

2. The method according to claim 1, further comprising: In response to receiving an erase command, and / or in response to receiving a touch command with a touch area greater than a preset area threshold, the non-erasable image in the background layer is stored in the cache bitmap.

3. The method according to claim 1, further comprising: In response to generating the inerasable image, the inerasable image is stored in the cached bitmap.

4. The method of claim 3, wherein, After storing the inerasable image into the cached bitmap in response to generating the inerasable image, the method further includes: In response to receiving an adjustment instruction for an inerasable image, the inerasable image stored in the cached bitmap is updated.

5. The method of claim 1, wherein, Determining the first image corresponding to the erase operation instruction in the cache bitmap includes: Obtain the first sampling point of the erase operation instruction in the cache bitmap; Using the first sampling point as the center, the area within the first preset radius corresponding to the first sampling point is defined as the first image.

6. The method of claim 1, wherein, Determining the second image corresponding to the erase operation command in the background layer includes: Obtain the second sampling point of the erase operation command in the background layer; Using the second sampling point as the center, the area within the second preset radius corresponding to the second sampling point is determined as the second image.

7. The method of claim 1, wherein, Removing the second image from the background layer includes: Set the pixel values ​​of each pixel in the second image to the preset configuration values ​​corresponding to the erase operation command.

8. The method of claim 1, wherein, After displaying the first image in the foreground layer and the image in the background layer after removing the second image, the method further includes: In response to the end of the erasure operation, a target image is determined based on the first image and the image in the background layer after removing the second image; Clear the background layer and the foreground layer; Map the target image onto the cleared background layer; Display the target image in the background layer.

9. The method of claim 8, wherein, In response to receiving an erase command and / or in response to receiving a touch command that the touch area is greater than a preset area threshold, the method further includes storing an indelible image to the cached bitmap. Clear the cache bitmap.

10. The method of claim 8, wherein, Clearing the background layer and the foreground layer includes: Set the pixel values ​​of all pixels in the background layer to the first preset initial value, and set the pixel values ​​of all pixels in the foreground layer to the second preset initial value.

11. An electronic device, comprising a memory and a processor, The memory stores computer programs. When the computer program is executed by the processor, the processor causes the processor to implement the stroke erasure method according to any one of claims 1 to 10.

12. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the stroke erasure method according to any one of claims 1 to 10.

13. A computer program product comprising a computer program that, when executed by a processor, causes the processor to implement the stroke erasure method according to any one of claims 1 to 10.