diff options
Diffstat (limited to 'doc/picture-language.texi')
-rw-r--r-- | doc/picture-language.texi | 153 |
1 files changed, 150 insertions, 3 deletions
diff --git a/doc/picture-language.texi b/doc/picture-language.texi index d4196f1..069281b 100644 --- a/doc/picture-language.texi +++ b/doc/picture-language.texi @@ -253,10 +253,157 @@ Here is a simple polygon: @image{images/polygon.svg.scm,,,A polygon.} @end example + +@cindex triangle, simple shape +@deffn {Scheme Procedure} triangle @ + @var{W} @var{H} @ + [#:border-color @var{"black"} #:border-width @var{1}] + +This procedure draws an isosceles triangle with width @var{W} and +height @var{H}. The keys @var{BORDER-COLOR} (a string) and +@var{BORDER-WIDTH} (a number) are accepted to override the line color +and line thickness. +@end deffn + +@cindex triangle, example +Here is a simple triangle: +@example +@verbatiminclude images/triangle.svg.scm +@image{images/triangle.svg.scm,,,A triangle.} +@end example + + +@cindex filled-triangle, simple shape +@deffn {Scheme Procedure} filled-triangle @ + @var{W} @var{H} @ + [#:color @var{"black"}] + +This procedure draws a triangle just like the @code{triangle} +procedure, except that it does not have an outline and is filled with +the provided @var{COLOR}. +@end deffn + + +@cindex octagon, simple shape +@deffn {Scheme Procedure} octagon @ + @var{SIZE} @ + [#:border-color @var{"black"} #:border-width @var{1}] + +This procedure draws a p8 symmetric isogonal octagon with a maximum +width of @var{SIZE}. The keys @var{BORDER-COLOR} (a string) and +@var{BORDER-WIDTH} (a number) are accepted to override the line color +and line thickness. +@end deffn + +@cindex octagon, example +Here is a simple octagon: +@example +@verbatiminclude images/octagon.svg.scm +@image{images/octagon.svg.scm,,,An octagon.} +@end example + + +@cindex filled-octagon, simple shape +@deffn {Scheme Procedure} filled-octagon @ + @var{SIZE} @ + [#:color @var{"black"}] + +This procedure draws an octagon just like the @code{octagon} +procedure, except that it does not have an outline and is filled with +the provided @var{COLOR}. +@end deffn + + +@cindex circle, simple shape +@deffn {Scheme Procedure} circle @ + @var{SIZE} @ + [#:border-color @var{"black"} #:border-width @var{1}] + +This procedure draws a circle with an outer diameter of @var{SIZE}. +The keys @var{BORDER-COLOR} (a string) and @var{BORDER-WIDTH} (a +number) are accepted to override the line color and line thickness. +@end deffn + +@cindex circle, example +Here is a simple circle: +@example +@verbatiminclude images/circle.svg.scm +@image{images/circle.svg.scm,,,A circle.} +@end example + + +@cindex disk, simple shape +@deffn {Scheme Procedure} disk @ + @var{SIZE} @ + [#:color @var{"black"}] + +A disk is a filled circle. This procedure draws a disk with the outer +diameter @var{SIZE}. It's just like the output of the @code{circle} +procedure, except that it does not have an outline and is filled with +the provided @var{COLOR}. +@end deffn + + +@cindex ellipse, simple shape +@deffn {Scheme Procedure} ellipse @ + @var{W} @var{H} @ + [#:border-color @var{"black"} #:border-width @var{1}] + +This procedure draws an ellipse with width @var{W} and height @var{H}. +The keys @var{BORDER-COLOR} (a string) and @var{BORDER-WIDTH} (a +number) are accepted to override the line color and line thickness. +@end deffn + +@cindex ellipse, example +Here is a simple ellipse: +@example +@verbatiminclude images/ellipse.svg.scm +@image{images/ellipse.svg.scm,,,An ellipse.} +@end example + + +@cindex filled-ellipse, simple shape +@deffn {Scheme Procedure} filled-ellipse @ + @var{W} @var{H} @ + [#:color @var{"black"}] + +This procedure draws a filled ellipse. It's just like the ellipse +drawn by the @code{ellipse} procedure, except that it does not have an +outline and is filled with the provided @var{COLOR}. +@end deffn + + +@cindex rectangle, simple shape +@deffn {Scheme Procedure} rectangle @ + @var{W} @var{H} @ + [#:border-color @var{"black"} #:border-width @var{1} #:rx @var{0} #:ry @var{0}] + +This procedure draws a rectangle with width @var{W} and height +@var{H}. The keys @var{BORDER-COLOR} (a string) and +@var{BORDER-WIDTH} (a number) are accepted to override the line color +and line thickness. The keys @var{RX} and @var{RY} (both numbers) can +be provided to round off the corners. +@end deffn + +@cindex rectangle, example +Here is a simple rectangle with rounded corners: +@example +@verbatiminclude images/rectangle.svg.scm +@image{images/rectangle.svg.scm,,,A rectangle with rounded corners.} +@end example + + +@cindex filled-rectangle, simple shape +@deffn {Scheme Procedure} filled-rectangle @ + @var{W} @var{H} @ + [#:color @var{"black"} #:border-color @var{"none"} #:border-width @var{1} #:rx @var{0} #:ry @var{0}] + +This procedure draws a filled rectangle. It's just like the rectangle +drawn by the @code{rectangle} procedure, except that it does not have +an outline and is filled with the provided @var{COLOR}. +@end deffn + There are more primitive shapes that still need to be documented: -@code{triangle}, @code{filled-triangle}, @code{octagon}, -@code{filled-octagon}, @code{circle}, @code{disk}, @code{ellipse}, -@code{filled-ellipse}, @code{rectangle}, @code{filled-rectangle}, and @code{text}. @c ********************************************************************* |