LayMeshDocs
中文

Path At

path-at.lay
# Minimal complete example: path.atpage=canvas(size=(100mm,75mm),background="#ffffff")curve=page.add(path(commands=[move_to(0mm,0mm),cubic_to(0mm,0mm,0mm,35mm,50mm,35mm),cubic_to(65mm,35mm,70mm,0mm,75mm,0mm),line_to(82mm,12mm)],border_color="#0072b2",border_width=0.7mm),offset=(8mm,15mm))route=curve.path.subpaths[0]dot=ellipse(size=(2mm,2mm),fill="#e36b70")point=route.at(fraction=0.5)page.add(dot,anchor=center,target=point)

Preview

Background
Path At
Original example
Total —
Details

Not run yet

Measured in this browser; excludes debounce.

Edits stay on this page
Dependencies
  • examples/manual/path-at.lay

Reproduce

sh
laymesh validate examples/manual/path-at.laylaymesh render examples/manual/path-at.lay -o figure.svglaymesh render examples/manual/path-at.lay -o figure.pdflaymesh render examples/manual/path-at.lay -o figure.png --dpi 300