# US 2022/0276754 A1 · Stroke erase method, terminal, and computer-readable storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0276754 A1
- Document ID: US20220276754A1
- Status: Published application
- Kind: A1
- Application number: 17/629,575
- Filed: 2020-07-22
- Published: 2022-09-01
- Earliest claimed: 2019-07-25
- Assignees: Zte Corporation
- Applicants: ZTE Corporation
- Inventors: Qian DONG
- Web page: https://patentgrep.com/patent/US20220276754A1

## CPC

- G06F 3/0484: for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F 3/04845: for image manipulation, e.g. dragging, rotation, expansion or change of colour
- G06F 3/0488: using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F 3/04883: for inputting data by handwriting, e.g. gesture or text
- G06F 40/171: by use of digital ink
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 11/23: using straight lines or curves
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A stroke erasing method, a terminal device, and a computer-readable storage medium are disclosed. The method may include: determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region; traversing each of collection points of the intersecting stroke to determine whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region; determining, in response to the line of connection intersecting with the erasing region, an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion; and splitting the intersecting stroke into segments according to the approximate intersection point, and drawing the segments not erased by the erasing region.

## Claims

### Claim 1

A stroke erasing method, comprising:
determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region;
traversing each of collection points of the intersecting stroke to determine whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region;
determining, in response to the line of connection intersecting with the erasing region, an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion; and
splitting the intersecting stroke into segments according to the approximate intersection point, and drawing the segments not erased by the erasing region.

### Claim 2 (depends on 1)

The stroke erasing method of claim 1, wherein determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region comprises:
traversing each stroke on the electronic whiteboard, and calculating intersection between the erasing region and a boundary rectangle where the stroke is located, to determine the intersecting stroke, the stroke comprising a bezier curve, and the erasing region comprising a polygon region.

### Claim 3 (depends on 2)

The stroke erasing method of claim 2, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
determining that the line of connection intersects with the erasing region in response to at least one of the two collection points being within the erasing region.

### Claim 4 (depends on 3)

The stroke erasing method of claim 3, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
in response to the two collection points being not within the erasing region and a length of the line of connection being determined to be less than a width of the erasing region,
calculating a midpoint of the two collection points and determining whether the midpoint is within the erasing region; and
determining that the line of connection intersects with the erasing region in response to the midpoint being within the erasing region.

### Claim 5 (depends on 4)

The stroke erasing method of claim 4, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
splitting the line of connection into two first line segments based on the middle of the line of connection in response to the length of the line of connection being greater than or equal to the width of the erasing region;
determining, in response to a length of each of the first line segments being determined to be less than the width of the erasing region, whether a midpoint of the first line segment is within the erasing region; and
determining that the first line segment intersects with the erasing region in response to the midpoint of the first line segment being within the erasing region.

### Claim 6 (depends on 5)

The stroke erasing method of claim 5, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
in response to the length of the first line segments being determined to be greater than or equal to the width of the erasing region, splitting the first line segment based on the midpoint of the first line segment until a length of a second line segment after splitting is less than the width of the erasing region; and
determining that the second line segment intersects with the erasing region in response to a midpoint of the second line segment being within the erasing region.

### Claim 7 (depends on 1)

The stroke erasing method of claim 1, wherein the determining an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion comprises:
in response to, of two points corresponding to the line of connection or a line segment of the line of connection, one point being within the erasing region, and the other point being outside the erasing region,
taking a midpoint of the line of connection or the line segment of the line of connection as the approximate intersection point in response to determining a length of the line of connection or the line segment of the line of connection to be less than or equal to m, m being less than the width of the erasing region.

### Claim 8 (depends on 7)

The stroke erasing method of claim 7, wherein the determining an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion further comprises:
in response to determining the length of the line of connection or the line segment of the line of connection to be greater than m, performing splitting according to the midpoint of the line of connection or the line segment of the line of connection until a length of a sub-line segment after splitting is less than or equal to m, and taking a midpoint of the sub-line segment as the approximate intersection point.

### Claim 9

A terminal device, comprising a processor, a memory, and a communication bus; wherein
the communication bus is configured to implement connection communication between the processor and the memory; and
the processor is configured to execute one or more programs stored in the memory to perform steps of a stroke erasing method, wherein the method comprises:
determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region;
traversing each of collection points of the intersecting stroke to determine whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region;
determining, in response to the line of connection intersecting with the erasing region, an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion; and
splitting the intersecting stroke into segments according to the approximate intersection point, and drawing the segments not erased by the erasing region.

### Claim 10

A non-transitory computer-readable storage medium, storing one or more programs, wherein the one or more programs, when executed by one or more processors, cause the one or more processors to perform steps of a stroke erasing method, wherein the method comprises:
determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region;
traversing each of collection points of the intersecting stroke to determine whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region;
determining, in response to the line of connection intersecting with the erasing region, an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion; and
splitting the intersecting stroke into segments according to the approximate intersection point, and drawing the segments not erased by the erasing region.

### Claim 11 (depends on 9)

The terminal device of claim 9, wherein determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region comprises:
traversing each stroke on the electronic whiteboard, and calculating intersection between the erasing region and a boundary rectangle where the stroke is located, to determine the intersecting stroke, the stroke comprising a bezier curve, and the erasing region comprising a polygon region.

### Claim 12 (depends on 11)

The terminal device of claim 11, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
determining that the line of connection intersects with the erasing region in response to at least one of the two collection points being within the erasing region.

### Claim 13 (depends on 12)

The terminal device of claim 12, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
in response to the two collection points being not within the erasing region and a length of the line of connection being determined to be less than a width of the erasing region,
calculating a midpoint of the two collection points and determining whether the midpoint is within the erasing region; and
determining that the line of connection intersects with the erasing region in response to the midpoint being within the erasing region.

### Claim 14 (depends on 13)

The terminal device of claim 13, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
splitting the line of connection into two first line segments based on the middle of the line of connection in response to the length of the line of connection being greater than or equal to the width of the erasing region;
determining, in response to a length of each of the first line segments being determined to be less than the width of the erasing region, whether a midpoint of the first line segment is within the erasing region; and
determining that the first line segment intersects with the erasing region in response to the midpoint of the first line segment being within the erasing region.

### Claim 15 (depends on 14)

The terminal device of claim 14, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
in response to the length of the first line segments being determined to be greater than or equal to the width of the erasing region, splitting the first line segment based on the midpoint of the first line segment until a length of a second line segment after splitting is less than the width of the erasing region; and
determining that the second line segment intersects with the erasing region in response to a midpoint of the second line segment being within the erasing region.

### Claim 16 (depends on 9)

The terminal device of claim 9, wherein the determining an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion comprises:
in response to, of two points corresponding to the line of connection or a line segment of the line of connection, one point being within the erasing region, and the other point being outside the erasing region,
taking a midpoint of the line of connection or the line segment of the line of connection as the approximate intersection point in response to determining a length of the line of connection or the line segment of the line of connection to be less than or equal to m, m being less than the width of the erasing region.

### Claim 17 (depends on 16)

The terminal device of claim 16, wherein the determining an approximate intersection point between the line of connection and the erasing region by means of midpoint recursion further comprises:
in response to determining the length of the line of connection or the line segment of the line of connection to be greater than m, performing splitting according to the midpoint of the line of connection or the line segment of the line of connection until a length of a sub-line segment after splitting is less than or equal to m, and taking a midpoint of the sub-line segment as the approximate intersection point.

### Claim 18 (depends on 10)

The non-transitory computer-readable storage medium of claim 10, wherein determining an intersecting stroke on an electronic whiteboard that intersects with an erasing region comprises:
traversing each stroke on the electronic whiteboard, and calculating intersection between the erasing region and a boundary rectangle where the stroke is located, to determine the intersecting stroke, the stroke comprising a bezier curve, and the erasing region comprising a polygon region.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
determining that the line of connection intersects with the erasing region in response to at least one of the two collection points being within the erasing region.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the determining whether a line of connection between each two adjacent ones of the collection points intersects with the erasing region further comprises:
in response to the two collection points being not within the erasing region and a length of the line of connection being determined to be less than a width of the erasing region,
calculating a midpoint of the two collection points and determining whether the midpoint is within the erasing region; and
determining that the line of connection intersects with the erasing region in response to the midpoint being within the erasing region.
