Scenic v0.10.2 Scenic.Primitive.Path View Source
Draw a complex path on the screen described by a list of actions.
Data
list_of_commands
The data for a path is a list of commands. They are interpreted in order when the path is drawn. See below for the commands it will accept.
Styles
This primitive recognizes the following styles
hidden
- show or hide the primitivefill
- fill in the area of the primitivestroke
- stroke the outline of the primitive. In this case, only the curvy part.cap
- says how to draw the ends of the line.join
- control how segments are joined.miter_limit
- control how segments are joined.
Commands
:begin
- start a new path segment:close_path
- draw a line back to the start of the current segment:solid
- mark the current segment as something that will be filled:hole
- mark the current segment as something that cut out of other segments{:move_to, x, y}
- move the current draw position{:line_to, x, y}
- draw a line from the current position to a new location.{:bezier_to, c1x, c1y, c2x, c2y, x, y}
- draw a bezier curve from the current position to a new location.{:quadratic_to, cx, cy, x, y}
- draw a quadratic curve from the current position to a new location.{:arc_to, x1, y1, x2, y2, radius}
- draw an arc from the current position to a new location.
Usage
You should add/modify primitives via the helper functions in
Scenic.Primitives
Link to this section Summary
Functions
Returns a list of styles recognized by this primitive
Link to this section Functions
Link to this function
valid_styles()
View Source
valid_styles()
View Source
valid_styles() :: [:fill | :hidden | :stroke, ...]
valid_styles() :: [:fill | :hidden | :stroke, ...]
Returns a list of styles recognized by this primitive.