Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
Markdown
outline #
Overview #
Sets the global drawing mode to outline for all subsequent shape drawing operations.
Syntax #
(outline)
Parameters #
None
Returns #
undefined
Description #
The outline command switches the global drawing mode to outlined shapes. After calling outline, all shapes drawn with circle, box, tri, and other primitives will be rendered as hollow outlines until the mode is changed with fill or explicitly overridden with a mode parameter.
This is the default mode in KidLisp, ensuring backward compatibility with existing code.
This command is inspired by Processing's stateful drawing API, making it familiar to creative coders.
Default Behavior #
- KidLisp starts in fill mode by default (matches box's default behavior)
- Calling
outlineexplicitly switches to outline mode - The mode persists across frames until explicitly changed
- Individual shapes can override the global mode with explicit parameters
Aliases #
stroke- Processing-style alias foroutlinenofill- Processing-style alias foroutline
Examples #
Basic Outline Mode #
(outline) ; Explicit, though this is the default
(circle 100 100 50) ; Outlined circle
(box 150 150 60 60) ; Outlined rectangle
Switching Between Modes #
(fill)
(circle 100 100 50) ; Filled
(outline)
(circle 200 100 50) ; Outlined
(fill)
(circle 300 100 50) ; Filled
(outline)
(circle 400 100 50) ; Outlined again
Explicit Override #
(outline) ; Set global to outline
(circle 100 100 50) ; Outlined (uses global)
(circle 200 100 50 "fill") ; Filled (explicit override)
(circle 300 100 50) ; Outlined (back to global)
Variable Thickness Outlines #
(outline)
(circle 100 100 50 "outline:1")
(circle 200 100 50 "outline:3")
(circle 300 100 50 "outline:5")
(circle 400 100 50 "outline:10")
Neon Effect #
(ink "black")
(fill)
(box 0 0 width height) ; Black background
(ink "cyan")
(outline)
(circle 200 200 100 "outline:8")
(circle 200 200 80 "outline:5")
(circle 200 200 60 "outline:3")
(circle 200 200 40 "outline:1")
Animation Pattern #
; Pulsing outline thickness
(let ((thickness (* 5 (+ 1 (sin (/ ticks 20))))))
(outline)
(ink "green")
(circle 200 200 80 (str "outline:" thickness)))
Related Commands #
fill- Switch to fill modenostroke- Alias forfillcircle,box,tri- Shape commands that respect fill/outline mode
Notes #
- Fill mode is the default in KidLisp (matches box's default behavior)
- Call
outlineto switch from fill to outline mode - Individual shapes can always override with explicit
"fill"or"outline"parameters - Thickness can be controlled using
"outline:N"notation (e.g.,"outline:5"for 5px thick) - The mode is reset to
fillwhen the KidLisp interpreter resets