Skip to content

Commit

Permalink
Document draw-line.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed Mar 27, 2020
1 parent c8eef3e commit db2cb64
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion doc/modules/ROOT/pages/funcs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,25 @@ predefined value>>.
[[draw-line]]
== draw-line

> TODO: Document
Adds a line to the SVG being built up. This is used extensively by the
other functions here to draw the diagram, but you can use it yourself
to draw your own custom content, either in your diagram itself, or as
a part of a custom label function in <<draw-box,`draw-box`>>.

.Arguments
[source,clojure]
----
[x1 y1 x2 y2]
[x1 y1 x2 y2 attr-spec]
----

The four required arguments are the coordinates of the endpoints of
the line segment to be drawn. If those are the only arguments you
supply, the line will be drawn with a `:stroke-width` of `1` and a
`:stroke` of `#000000` (black). But you can override those (and other
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute[SVG
attributes]) by passing an <<attrs#attribute-expressions,attribute
expression>> as the second argument.

[[draw-related-boxes]]
== draw-related-boxes
Expand Down

0 comments on commit db2cb64

Please sign in to comment.