One point inside a flat swipe path.
Syntax
SwipePoint(point, speed="NORMAL", delay_before=0, random=10, humanized=False, scale="fixed", anchor="none")Constructor parameters
| Name | Description |
|---|---|
pointPoint | tuple[Number, Number] | Coordinate as Point or tuple (x, y). Point scale/anchor metadata is copied unless scale/anchor are provided on SwipePoint. Required · Positional or named No default |
speedString | Speed preset from this point to the next point. Values: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST. Optional · Positional or named Default: NORMAL |
delay_beforeNumber | Delay before this point/segment in milliseconds. Optional · Positional or named Default: 0 |
randomNumber | Random pixel offset radius for this point. Optional · Positional or named Default: 10 |
humanizedBoolean | Use a curved human-like path where supported. Optional · Positional or named Default: False |
scaleString | Coordinate scale mode. Optional · Positional or named Default: fixed |
anchorString | Coordinate anchor. Optional · Positional or named Default: none |
Returns
SwipePointBehavior / side effects
One point inside a flat swipe path. The point must be a Point or tuple (x, y). Pass a list of at least two SwipePoint values to swipe([...]) to move one finger through multiple points.
Execution
- Blocking: No
- Thread safety: Use separate objects per flow
- Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
# Two parallel fingers, each finger is one flat path
Touch.collect()
left = swipe([
SwipePoint(Point(300, 1500), speed="FAST"),
SwipePoint(Point(300, 500))
], parallel=True)
right = swipe([
SwipePoint(Point(780, 1500), speed="FAST"),
SwipePoint(Point(780, 500))
], parallel=True)
Touch.send()
Touch.wait()Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
None
Fields
| Name | Description |
|---|---|
pointPoint | Coordinate point in pixels. Point carries scale/anchor metadata. |
speedString | Speed preset from this point to the next point. Values: VERY_SLOW, SLOW, NORMAL, FAST, VERY_FAST. Default: NORMAL |
delay_beforeNumber | Delay before this point/segment in milliseconds. Default: 0 |
randomNumber | Random pixel offset radius for this point. Default: 10 |
humanizedBoolean | Use a curved human-like path where supported. Default: False |
scaleString | Coordinate scale mode. Default: fixed |
anchorString | Coordinate anchor. Default: none |
Constructor example
path = [
SwipePoint(Point(500, 1500), speed="FAST"),
SwipePoint((560, 980), speed="NORMAL", humanized=True),
SwipePoint(Point(500, 500))
]
swipe(path)