Skip to main content

Mark

check-mark

check-mark() -> bool 

Checks if a mark should be drawn according to the current style.

style:

The current style.

process-style

process-style() 

Processes the mark styling. TODO: remember what is actually going on here.

The context object.

style:

The current style.

root:

Where the mark is being placed, normally either "start" or "end". Allows different styling for marks in different directions.

path-length:

The length of the path. This is used for relative offsets.

place-mark-on-path

place-mark-on-path() -> dictionary 

Places a mark on the given path. Returns a dictionary with the following keys:

drawables:

The mark drawables.

distance:

The length to shorten the path by.

The position of the mark, can be used to snap the end of the path to after shortening.


The canvas context object.

styles:

A processed mark styling.

segments:

The path to place the mark on.

is-end:

Default: false

TODO

place-marks-along-path

place-marks-along-path() -> array 

Places marks along a path. Returns them as an array of drawable.

The context object.

style:

The current mark styling.

transform:

The current transformation matrix.

The path to place the marks on.

add-path:

Default: true

When true the shortened path will returned as the first drawable in the array