Skip to content

Shapes

keyed_extras.squiggly

Draw squiggly lines.

SquigglyLine

Bases: Line

A squiggly line that can be drawn between two points.

Parameters:

Name Type Description Default
scene Scene

The scene to which the line belongs

required
xs HasValue[float]

Starting x coordinate

required
ys HasValue[float]

Starting y coordinate

required
xe HasValue[float]

Ending x coordinate

required
ye HasValue[float]

Ending y coordinate

required
amplitude HasValue[float]

Height of the waves

20
num_waves int

Number of complete waves to draw

4
color HasValue[Color] | tuple[float, float, float]

Line color

(1, 1, 1)
line_width HasValue[float]

Width of the line

1
alpha HasValue[float]

Opacity of the line

1
dash tuple[Sequence[float], float] | None

Optional dash pattern

None
operator Operator

Cairo operator for compositing

OPERATOR_OVER

squiggly_underline

squiggly_underline(obj, offset=20, **kwargs)

Add a squiggly underline effect.

Parameters:

Name Type Description Default
offset float

Distance below baseline. Default is 20.

20
**kwargs Any

Additional arguments passed to Line constructor.

{}

Returns:

Type Description
SquigglyLine

The squiggly underline.