A processing method and device for preventing handwriting path overlap

By segmenting the handwriting path on the electronic whiteboard and overlaying it with the SRC effect, combined with the accelerated processing of the hardware display layer and the screen display layer, the problem of handwriting path overlap is solved, the operating experience and refresh speed are improved, and the screen flicker is reduced.

CN115407887BActive Publication Date: 2025-09-19LANGYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211031530.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2025-09-19
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

When writing on an electronic whiteboard, the handwriting path is prone to overlap when accelerated in segments, affecting the user's operating experience.

Method used

The handwriting of calligraphy and painting operations is divided into several paths, and the preset SRC effect is used to make the latter path cover the previous path. At the same time, each path is accelerated, and the layered processing of the drawing layer and the cache layer is used, combined with the acceleration library acceleration of the hardware display layer and the screen display layer to achieve the path coverage effect.

Benefits of technology

It solves the problem of overlapping handwriting paths, improves the user's operating experience, increases the refresh speed of textures, and reduces screen flickering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115407887B_ABST
    Figure CN115407887B_ABST
Patent Text Reader

Abstract

The present invention discloses a processing method and device for preventing handwriting path overlap, the method comprising: dividing a first handwriting of a calligraphy or painting operation into a plurality of paths and accelerating each path; and then, based on a preset SRC effect, overlaying the latter of two adjacent paths on the former. Using an embodiment of the present invention, by setting the SRC effect, the latter of two adjacent paths in the first handwriting is overlaid on the former, while each path is accelerated. This ensures segmented acceleration of the first handwriting during the drawing process, solves the problem of handwriting path overlap, and improves the user's operating experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic whiteboards, and in particular to a processing method and device for preventing handwriting paths from overlapping. Background Art

[0002] When writing or drawing on an electronic whiteboard with a standard pen (Tail Pencil), the handwriting is divided into several paths during the writing process to accelerate the writing process. A bitmap of the area where each path is located is then transferred to the acceleration library to achieve writing acceleration. When the pen is set to the round-tip pen cap effect, the endpoints of the handwriting appear as semicircular pen caps. As a result, two adjacent paths will overlap at the endpoints. The overlapping area is the end of the previous path and the beginning of the next path, resulting in a circular appearance, which affects the user experience. Summary of the Invention

[0003] The present invention provides a processing method and device for preventing handwriting path overlap, so as to solve the technical problem that when handwriting is accelerated in sections, handwriting paths cannot be prevented from overlapping and the user operation experience cannot be optimized.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for preventing handwriting paths from overlapping, comprising:

[0005] The first stroke of the calligraphy and painting operation is divided into several paths and each path is accelerated. Then, according to the preset SRC effect, the latter of the two adjacent paths is covered on the previous path.

[0006] The present invention sets the SRC effect so that the latter path of two adjacent paths in the first handwriting covers the previous path, and accelerates each path at the same time, which not only ensures the segmented acceleration of the first handwriting during the drawing process, but also solves the problem of handwriting path overlap, thereby improving the user's operating experience.

[0007] Furthermore, the first handwriting of the calligraphy and painting operation is divided into several paths and each path is accelerated, and then according to the preset SRC effect, the latter of two adjacent paths is covered on the former path, specifically:

[0008] When performing calligraphy and painting operations, the first handwriting in the calligraphy and painting operation is drawn in the drawing layer; the first handwriting is divided into a plurality of paths, and the area corresponding to each path is accelerated; wherein the background of the drawing layer is transparent;

[0009] According to a preset SRC effect, SRC calculation is performed on the plurality of paths of the drawing layer so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting;

[0010] When the calligraphy and painting operation is finished, the second handwriting of the drawing layer is drawn into the cache layer so that the second handwriting is mixed with the third handwriting of the cache layer, and the drawing layer is cleared and rendering is performed.

[0011] The present invention divides the drawing layer and the cache layer and makes the background of the drawing layer transparent, so that when the user performs calligraphy and painting operations, other apps on the screen will not be scratched or covered because the background and handwriting are in the same bitmap layer; in addition, according to the preset SRC effect, SRC calculation is performed on several paths of the handwriting to achieve an overlay effect between the paths, solving the problem of handwriting overlap; and because the drawing layer and the cache layer are layered, the second handwriting in the drawing layer will not directly cover the third note in the cache layer, but a mixed effect will be achieved after the calligraphy and painting operation is completed, thereby solving the problem of handwriting path overlap and improving the user's operating experience.

[0012] Furthermore, the drawing layer is a bitmap layer set in the hardware display layer; the cache layer is a bitmap layer set in the screen display layer.

[0013] Furthermore, the area corresponding to each path is accelerated as follows:

[0014] Transferring the area corresponding to each path to the acceleration library in sequence;

[0015] The area is refreshed according to the acceleration library.

[0016] The present invention sets the drawing layer on the hardware display layer and also sets the cache layer in the screen display layer. While ensuring that the two bitmap layers are distinguished, the drawing layer can realize acceleration of the acceleration library of the hardware display layer, thereby improving the refresh speed of the map.

[0017] Furthermore, after sequentially transmitting the area corresponding to each path to the acceleration library and before refreshing the area according to the acceleration library, the method includes:

[0018] Obtaining the color value corresponding to each of the areas in the acceleration library;

[0019] A restoration operation is performed on the color value so that the color value in the area is replaced by the corrected color value.

[0020] The present invention performs a restoration operation on the color value of the refreshed area in the acceleration link of the acceleration library, solves the problem of color fading of the second handwriting due to the pre-multiplication operation in the drawing layer, and improves the user's operating experience.

[0021] Furthermore, when the calligraphy and painting operation is finished, the second handwriting of the drawing layer is drawn into the cache layer so that the second handwriting is mixed with the third handwriting of the cache layer, and the drawing layer is cleared and rendering is performed, specifically:

[0022] When performing calligraphy and painting operations, the third handwriting in the cache layer is locked;

[0023] When the calligraphy and painting operation is finished, unlocking the third handwriting of the cache layer, and drawing the second handwriting of the drawing layer into the cache layer;

[0024] In the cache layer, mixing the second handwriting and the third handwriting to obtain a fourth handwriting;

[0025] According to the Android system rendering mechanism, surfaceview is called to refresh the cache layer and render the fourth handwriting to the screen.

[0026] When performing calligraphy and painting operations, the present invention locks the cache layer and only accelerates the drawing layer in the hardware display layer. After the calligraphy and painting operations are completed, the cache layer is unlocked to mix the handwriting in the two bitmap layers. The fourth handwriting obtained after the mixing is rendered according to the Android system rendering mechanism, which solves the problem of screen flickering caused by refreshing the drawing layer and the cache layer at the same time and improves the user's operating experience.

[0027] Furthermore, the preset SRC effect is to replace the portion of the target pixel that overlaps with the source pixel with the alpha value and color value of the source pixel.

[0028] In the present invention, the SRC effect is set to enable the alpha value in the original pixel to cover the area of ​​the target pixel that overlaps with the original pixel, thereby achieving path coverage, solving the problem of path overlap, and improving the user's operating experience.

[0029] On the other hand, an embodiment of the present invention further provides a processing device for preventing handwriting paths from overlapping, comprising: a covering module;

[0030] The overlay module is used to divide the first handwriting of the calligraphy and painting operation into several paths and accelerate each path, and then overlay the latter path of two adjacent paths on the former path according to the preset SRC effect.

[0031] Furthermore, the covering module includes: a drawing unit, a correction unit and a rendering unit;

[0032] The drawing unit is used to draw the first handwriting in the drawing operation in the drawing layer when performing the drawing operation; divide the first handwriting into a plurality of paths, and accelerate the area corresponding to each path; wherein the background of the drawing layer is transparent;

[0033] The correction unit is used to perform SRC calculation on the plurality of paths of the drawing layer according to a preset SRC effect, so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting;

[0034] The rendering unit is used for drawing the second handwriting of the drawing layer into the cache layer when the calligraphy and painting operation is finished, so as to mix the second handwriting with the third handwriting of the cache layer, clear the drawing layer and perform rendering.

[0035] Furthermore, the rendering unit includes: an unlocking subunit, a mixing subunit and a rendering subunit;

[0036] When performing calligraphy and painting operations, the third handwriting in the cache layer is locked;

[0037] The unlocking subunit is used for unlocking the third handwriting of the cache layer and drawing the second handwriting of the drawing layer into the cache layer when the calligraphy and drawing operation is finished;

[0038] The mixing subunit is used to mix the second handwriting and the third handwriting in the cache layer to obtain a fourth handwriting;

[0039] The rendering subunit is used to call the surface view to refresh the cache layer according to the Android system rendering mechanism, and render the fourth handwriting to the screen.

[0040] The present invention sets the SRC effect so that the latter path of two adjacent paths in the first handwriting covers the previous path, and accelerates each path at the same time, which not only ensures the segmented acceleration of the first handwriting during the drawing process, but also solves the problem of handwriting path overlap, thereby improving the user's operating experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic flow chart of an embodiment of a method for preventing handwriting path overlap provided by an embodiment of the present invention;

[0042] Figure 2 A flowchart of another embodiment of a method for preventing handwriting path overlap provided by an embodiment of the present invention;

[0043] Figure 3 A schematic flow chart of an embodiment of a drawing layer refresh method provided by an embodiment of the present invention;

[0044] Figure 4 A schematic flow chart of another embodiment of a drawing layer refresh method provided by an embodiment of the present invention;

[0045] Figure 5A flowchart of another embodiment of a method for preventing handwriting path overlap provided by an embodiment of the present invention;

[0046] Figure 6 A schematic structural diagram of an embodiment of a processing device for preventing handwriting path overlap provided by an embodiment of the present invention;

[0047] Figure 7 A schematic structural diagram of another embodiment of a processing device for preventing handwriting path overlap provided by an embodiment of the present invention;

[0048] Figure 8 A schematic structural diagram of another embodiment of a processing device for preventing handwriting path overlap provided by an embodiment of the present invention;

[0049] Figure 9 A schematic diagram of an embodiment of handwriting path overlap provided by an embodiment of the present invention;

[0050] Figure 10 A schematic diagram of an embodiment in which other APPs provided in an embodiment of the present invention are scratched or covered;

[0051] Figure 11 A schematic diagram of an embodiment of the present invention in which the background of the drawing layer is transparent;

[0052] Figure 12 A schematic diagram of an embodiment of handwriting path coverage provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0054] Example 1

[0055] Please refer to Figure 1 , which is a flow chart of an embodiment of a method for preventing handwriting path overlap provided by an embodiment of the present invention, mainly includes step 101, which is specifically as follows:

[0056] Step 101: Divide the first stroke of the calligraphy and painting operation into several paths and accelerate each path. Then, according to the preset SRC effect, cover the latter of two adjacent paths on the former path.

[0057] Please refer to Figure 9, a schematic diagram of an embodiment of handwriting path overlap provided by an embodiment of the present invention. In the prior art, when a user writes with a regular pen and the pen cap is set to a round tip, the handwriting will form a circular overlapping area due to the overlapping paths. Part of the circle comes from the semicircular pen cap at the end of the previous path, and the other part comes from the semicircular pen cap at the beginning of the next path. This embodiment shows the effect when the handwriting color transparency is 50%, and the specific pixel is (argb: 127, 255, 0, 0).

[0058] In this embodiment, by presetting the SRC effect, the latter path of two adjacent paths covers the former path, so that the intersection area between the paths no longer overlaps; and the handwriting can continue to be segmented to achieve acceleration of the area corresponding to the path.

[0059] Please refer to Figure 2 , which is a flow chart of another embodiment of a processing method for preventing handwriting path overlap provided in an embodiment of the present invention. Figure 2 and Figure 1 The main difference is that Figure 2 The process includes steps 201 to 203, which are specifically as follows:

[0060] In this embodiment, step 101 is specifically steps 201 to 203.

[0061] Step 201: When performing a calligraphy or painting operation, draw the first handwriting in the calligraphy or painting operation in a drawing layer; divide the first handwriting into a plurality of paths, and accelerate the area corresponding to each path; wherein the background of the drawing layer is transparent.

[0062] Please refer to Figure 10 , which is a schematic diagram of an embodiment of the present invention in which other apps are scratched or covered. Generally, the drawing operation's traces, background, and other cached content are on the same bit layer, causing the traces and background to scratch or cover other apps during drawing.

[0063] In this embodiment, the drawing layer is distinguished from the cache layer, and the background of the drawing layer is transparent, so that when the user draws, only the drawn handwriting is displayed on the screen without other content, so it will not scratch or cover other apps.

[0064] Please refer to Figure 11 , is a schematic diagram of an embodiment of the present invention in which the background of the drawing layer is transparent. Since the background of the drawing layer is transparent, no covering phenomenon occurs.

[0065] Step 202: performing SRC calculation on the plurality of paths of the drawing layer according to a preset SRC effect, so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting.

[0066] In this embodiment, a pixel is composed of four components, which are expressed as ARGB; A represents the alpha value, and the following three components RGB represent the three colors of red, green and blue respectively; when overwriting, the latter stroke covers the alpha value and color of the previous stroke.

[0067] Step 203: When the calligraphy and painting operation is finished, the second handwriting of the drawing layer is drawn into the cache layer to mix the second handwriting with the third handwriting of the cache layer, and the drawing layer is cleared and rendered.

[0068] Please refer to Figure 12 , a schematic diagram of an embodiment of handwriting path overlay provided by an embodiment of the present invention. Generally, the first handwriting drawn by the user is saved together with the background and other cached handwriting in the same bitmap layer. Therefore, when implementing path overlay, since all content is in the same bitmap layer, the second handwriting, obtained by modifying the first handwriting, overwrites the third note. Users often need to blend the currently drawn handwriting with the previously cached handwriting.

[0069] In this embodiment, by dividing the drawing layer and the cache layer and making the background of the drawing layer transparent, when the user performs calligraphy and painting operations, other APPs on the screen will not be scratched or covered because the background and handwriting are in the same bitmap layer; in addition, according to the preset SRC effect, SRC calculation is performed on several paths of the handwriting to achieve an overlay effect between the paths, solving the problem of handwriting overlap; and because the drawing layer and the cache layer are layered, the second handwriting in the drawing layer will not directly cover the third note in the cache layer, but a mixed effect will be achieved after the calligraphy and painting operation is completed, thereby solving the problem of handwriting path overlap and improving the user's operating experience.

[0070] In this embodiment, the drawing layer is a bitmap layer set in the hardware display layer; the cache layer is a bitmap layer set in the screen display layer.

[0071] The present invention sets the drawing layer on the hardware display layer and also sets the cache layer in the screen display layer. While ensuring that the two bitmap layers are distinguished, the drawing layer can realize acceleration of the acceleration library of the hardware display layer, thereby improving the refresh speed of the map.

[0072] Please refer to Figure 3 , which is a flow chart of an embodiment of a drawing layer refresh method provided by an embodiment of the present invention, mainly includes steps 301 to 302, which are specifically as follows:

[0073] Step 301: The area corresponding to each path is sequentially transmitted to the acceleration library.

[0074] In this embodiment, the drawing layer is set in the hardware display layer, so the drawing layer is not refreshed and rendered through the Android system rendering mechanism, but can be refreshed separately by using an acceleration library, thereby improving the refresh speed.

[0075] Step 302: Refresh the area according to the acceleration library.

[0076] The present invention sets the drawing layer on the hardware display layer and also sets the cache layer in the screen display layer. While ensuring that the two bitmap layers are distinguished, the drawing layer can realize acceleration of the acceleration library of the hardware display layer, thereby improving the refresh speed of the map.

[0077] Please refer to Figure 4 , which is a flow chart of another embodiment of the drawing layer refresh method provided by an embodiment of the present invention. Figure 4 and Figure 3 The main difference is that Figure 4 The steps 401 to 402 are as follows:

[0078] In this embodiment, step 401 is performed after step 301 and step 402 is performed before step 302 .

[0079] Step 401: Obtain the color value corresponding to each of the regions in the acceleration library.

[0080] Step 402: Perform a restoration operation on the color value to replace the color value in the area with the corrected color value.

[0081] In this embodiment, after the second note is transferred to the acceleration library, it will usually undergo a pre-multiplication operation. During the pre-multiplication operation, the second note is mixed with the fully transparent argb(0,0,0,0), that is, the opaque color is mixed with the transparent color. Specifically, when the background color is (r1,g1,b1) and the foreground color is (r2,g2,b2,a), the color obtained after mixing is expressed as:

[0082] (r=r2*a / 255+r1*(1-a / 255), g=g2*a / 255+g1*(1-a / 255), b=b2*a / 255+b1*(1-a / 255));

[0083] Therefore, when the foreground is r2=255, a=127, and the background is r1=0, the resulting r is 125; thus, the color of the second note in the drawing layer is halved, and the other colors g and b are also halved.

[0084] In this embodiment, during the process of accelerating the area where the path is located, the color of each path is restored, and the restored color value is accelerated and then pasted to the hardware display layer, thereby finally obtaining a third handwriting with restored color.

[0085] The present invention performs a restoration operation on the color value of the refreshed area in the acceleration link of the acceleration library, solves the problem of color fading of the second handwriting due to the pre-multiplication operation in the drawing layer, and improves the user's operating experience.

[0086] Please refer to Figure 5 , which is a flow chart of another embodiment of the processing method for preventing handwriting path overlap provided in an embodiment of the present invention. Figure 5 and Figure 2 The main difference is that Figure 5 The steps 501 to 503 are as follows:

[0087] In this embodiment, step 203 is specifically steps 501 to 503.

[0088] In this embodiment, when performing calligraphy and painting operations, the third handwriting in the cache layer is locked.

[0089] Step 501: When the calligraphy and painting operation is finished, the third handwriting of the cache layer is unlocked, and the second handwriting of the drawing layer is drawn into the cache layer.

[0090] Step 502: In the cache layer, the second handwriting and the third handwriting are mixed to obtain a fourth handwriting.

[0091] Step 503: According to the Android system rendering mechanism, call SurfaceView to refresh the cache layer and render the fourth handwriting to the screen.

[0092] In this embodiment, when responding to the user's calligraphy and painting operations, the drawing layer directly operates the hardware display layer instead of using the Android system rendering mechanism for rendering, which can reduce the delay in displaying the first handwriting and the second handwriting; when the calligraphy and painting operation is completed, the cache layer is unlocked, and the second handwriting and the third handwriting are mixed to obtain a fourth handwriting with a mixed effect; and then through the Android system rendering step, the content in the cache layer or the fourth handwriting is rendered to the screen.

[0093] When the user performs calligraphy and painting operations, the present invention locks the cache layer and only accelerates the drawing layer in the hardware display layer. After the calligraphy and painting operations are completed, the cache layer is unlocked to mix the handwriting in the two bitmap layers. The fourth handwriting obtained after the mixing is rendered according to the Android system rendering mechanism, which solves the problem of screen flickering caused by the simultaneous refresh of the drawing layer and the cache layer, and improves the user's operating experience.

[0094] In this embodiment, the preset SRC effect is to replace the portion of the target pixel that overlaps with the source pixel with the alpha value and color value of the source pixel.

[0095] In this embodiment, the source pixel can be represented by S, and the color value of the source pixel is expressed as [Sa, Sc], where Sa is the alpha value of the source pixel and Sc is the color of the source pixel. The destination pixel D can be expressed as [Da, Dc], where Da is the alpha value of the destination pixel and Dc is the color of the destination pixel. When setting the SRC effect, to achieve the masking effect, the SRC calculation rule is set to SRC: [Sa, Sc].

[0096] In the present invention, the SRC effect is set to enable the alpha value in the original pixel to cover the area of ​​the target pixel that overlaps with the original pixel, thereby achieving path coverage, solving the problem of path overlap, and improving the user's operating experience.

[0097] Please refer to Figure 6 , which is a structural diagram of an embodiment of a processing device for preventing handwriting path overlap provided by an embodiment of the present invention, mainly including: a covering module 601.

[0098] In this embodiment, the overlay module 601 is used to divide the first handwriting of the calligraphy and painting operation into several paths and accelerate each path, and then overlay the latter path of two adjacent paths on the former path according to the preset SRC effect.

[0099] Please refer to Figure 7 , which is a structural diagram of another embodiment of a processing device for preventing handwriting path overlap provided by an embodiment of the present invention. Figure 7 and Figure 6 The main difference is that Figure 7 It also includes: a drawing unit 701 , a correction unit 702 and a rendering unit 703 .

[0100] In this embodiment, the covering module 601 includes a drawing unit 701 , a correction unit 702 , and a rendering unit 703 .

[0101] The drawing unit 701 is used to draw the first handwriting in the calligraphy and painting operation in the drawing layer when performing calligraphy and painting operations; divide the first handwriting into several paths, and accelerate the area corresponding to each path; wherein the background of the drawing layer is transparent.

[0102] The correction unit 702 is used to perform SRC calculation on the plurality of paths of the drawing layer according to a preset SRC effect, so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting.

[0103] The rendering unit 703 is used for drawing the second handwriting of the drawing layer into the cache layer when the calligraphy and painting operation is finished, so as to mix the second handwriting with the third handwriting of the cache layer, clear the drawing layer and perform rendering.

[0104] Please refer to Figure 8 , which is a structural diagram of another embodiment of the processing device for preventing handwriting path overlap provided by an embodiment of the present invention. Figure 8 and Figure 7 The main difference is that Figure 8 It also includes: an unlocking subunit 801 , a mixing subunit 802 and a rendering subunit 803 .

[0105] In this embodiment, the rendering unit 703 specifically includes an unlocking subunit 801 , a mixing subunit 802 and a rendering subunit 803 .

[0106] In this embodiment, when performing calligraphy and painting operations, the third handwriting in the cache layer is locked.

[0107] The unlocking subunit 801 is used to unlock the third handwriting in the cache layer and draw the second handwriting in the drawing layer into the cache layer when the calligraphy and drawing operation is finished.

[0108] The mixing subunit 802 is configured to mix the second handwriting and the third handwriting in the cache layer to obtain a fourth handwriting.

[0109] The rendering sub-unit 803 is used to call the surface view to refresh the cache layer according to the Android system rendering mechanism, and render the fourth handwriting to the screen.

[0110] The present invention sets the SRC effect so that the latter path of two adjacent paths in the first handwriting covers the previous path, and accelerates each path at the same time, which not only ensures the segmented acceleration of the first handwriting during the drawing process, but also solves the problem of handwriting path overlap, thereby improving the user's operating experience.

[0111] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for preventing handwriting paths from overlapping, characterized in that: include: The first stroke of the calligraphy and painting operation is divided into several paths and each path is accelerated. Then, according to the preset SRC effect, the latter of the two adjacent paths is overlaid on the previous path; specifically: When performing calligraphy and painting operations, the first handwriting in the calligraphy and painting operation is drawn in the drawing layer; the first handwriting is divided into a plurality of paths, and the area corresponding to each path is accelerated; wherein the background of the drawing layer is transparent; According to a preset SRC effect, SRC calculation is performed on the plurality of paths of the drawing layer so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting; When the calligraphy and painting operation is finished, the second handwriting of the drawing layer is drawn into the cache layer so that the second handwriting is mixed with the third handwriting of the cache layer, and the drawing layer is cleared and rendered; The preset SRC effect is to replace the portion of the target pixel that overlaps with the source pixel with the alpha value and color value of the source pixel.

2. The method for preventing handwriting paths from overlapping according to claim 1, wherein: The drawing layer is a bitmap layer set in the hardware display layer; the cache layer is a bitmap layer set in the screen display layer.

3. The method for preventing handwriting paths from overlapping according to claim 2, wherein: The acceleration of the area corresponding to each path is specifically as follows: Transferring the area corresponding to each path to the acceleration library in sequence; The area is refreshed according to the acceleration library.

4. The method for preventing handwriting paths from overlapping according to claim 3, wherein: After sequentially transmitting the area corresponding to each path to the acceleration library and before refreshing the area according to the acceleration library, the method includes: Obtaining the color value corresponding to each of the areas in the acceleration library; A restoration operation is performed on the color value so that the color value in the area is replaced by the corrected color value.

5. The method for preventing handwriting paths from overlapping according to claim 1, wherein: When the calligraphy and painting operation is finished, the second handwriting of the drawing layer is drawn into the cache layer so that the second handwriting is mixed with the third handwriting of the cache layer, and the drawing layer is cleared and rendering is performed, specifically: When performing calligraphy and painting operations, the third handwriting in the cache layer is locked; When the calligraphy and painting operation is finished, unlocking the third handwriting of the cache layer, and drawing the second handwriting of the drawing layer into the cache layer; In the cache layer, mixing the second handwriting and the third handwriting to obtain a fourth handwriting; According to the Android system rendering mechanism, surfaceview is called to refresh the cache layer and render the fourth handwriting to the screen.

6. A processing device for preventing handwriting paths from overlapping, characterized in that: include: Covering module; The overlay module is used to divide the first handwriting of the calligraphy and painting operation into several paths and accelerate each path, and then overlay the latter of two adjacent paths on the former path according to the preset SRC effect; The covering module includes: a drawing unit, a correction unit and a rendering unit; The drawing unit is used to draw the first handwriting in the drawing operation in the drawing layer when performing the drawing operation; divide the first handwriting into a plurality of paths, and accelerate the area corresponding to each path; wherein the background of the drawing layer is transparent; The correction unit is used to perform SRC calculation on the plurality of paths of the drawing layer according to a preset SRC effect, so that the latter path of two adjacent paths covers the former path, thereby obtaining a second handwriting; The rendering unit is used for drawing the second handwriting of the drawing layer into the cache layer when the calligraphy and painting operation is finished, so that the second handwriting is mixed with the third handwriting of the cache layer, clearing the drawing layer and performing rendering; The preset SRC effect is to replace the portion of the target pixel that overlaps with the source pixel with the alpha value and color value of the source pixel.

7. The device for preventing handwriting paths from overlapping according to claim 6, wherein: The rendering unit includes: an unlocking subunit, a mixing subunit and a rendering subunit; When performing calligraphy and painting operations, the third handwriting in the cache layer is locked; The unlocking subunit is used for unlocking the third handwriting of the cache layer and drawing the second handwriting of the drawing layer into the cache layer when the calligraphy and drawing operation is finished; The mixing subunit is used to mix the second handwriting and the third handwriting in the cache layer to obtain a fourth handwriting; The rendering subunit is used to call the surface view to refresh the cache layer according to the Android system rendering mechanism, and render the fourth handwriting to the screen.

Citation Information

Patent Citations

  • Dual system-based handwriting display method and system, storage medium and device

    CN107422974A

  • Display device and display method

    CN114442849A