From 01847735ed2800e8a7a74802c39b906ef7362015 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 13 Aug 2010 14:42:46 -0700 Subject: [PATCH] Add regression tests for \path markup command. --- input/regression/markup-path-fill.ly | 17 +++++++++++++++ input/regression/markup-path-linecap.ly | 26 +++++++++++++++++++++++ input/regression/markup-path-linejoin.ly | 27 ++++++++++++++++++++++++ input/regression/markup-path.ly | 23 ++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 input/regression/markup-path-fill.ly create mode 100644 input/regression/markup-path-linecap.ly create mode 100644 input/regression/markup-path-linejoin.ly create mode 100644 input/regression/markup-path.ly diff --git a/input/regression/markup-path-fill.ly b/input/regression/markup-path-fill.ly new file mode 100644 index 0000000000..e4c9a030ba --- /dev/null +++ b/input/regression/markup-path-fill.ly @@ -0,0 +1,17 @@ +\version "2.13.31" + +\header { + texidoc = " +The @code{\\path} markup command supports the @code{filled} +property to toggle its fill. +" +} + +\markup { + \override #'(filled . #t) { + \path #0.2 #'((moveto 1 1) + (lineto 1 6) + (curveto 3 8 5 6 1 1) + (closepath)) + } +} diff --git a/input/regression/markup-path-linecap.ly b/input/regression/markup-path-linecap.ly new file mode 100644 index 0000000000..7ed4e62eca --- /dev/null +++ b/input/regression/markup-path-linecap.ly @@ -0,0 +1,26 @@ +\version "2.13.31" + +\header { + texidoc = " +The @code{\\path} markup command supports the +@code{line-cap-style} property with values of @code{butt}, +@code{round}, and @code{square}. +" +} + +myPath = +#'((moveto 0 0) (lineto 5 0)) + +\markup { + \column { + \override #'(line-cap-style . butt) { + \path #1 #myPath + } + \override #'(line-cap-style . round) { + \path #1 #myPath + } + \override #'(line-cap-style . square) { + \path #1 #myPath + } + } +} diff --git a/input/regression/markup-path-linejoin.ly b/input/regression/markup-path-linejoin.ly new file mode 100644 index 0000000000..f11879f872 --- /dev/null +++ b/input/regression/markup-path-linejoin.ly @@ -0,0 +1,27 @@ +\version "2.13.31" + +\header { + texidoc = " +The @code{\\path} markup command supports the +@code{line-join-style} property with values of @code{bevel}, +@code{round}, and @code{miter}. +" +} + +myPath = +#'((moveto 0 0) (rlineto 2 5) (rlineto 2 -5)) + +\markup { + \column { + \null + \override #'(line-join-style . bevel) { + \path #1 #myPath + } + \override #'(line-join-style . round) { + \path #1 #myPath + } + \override #'(line-join-style . miter) { + \path #1 #myPath + } + } +} diff --git a/input/regression/markup-path.ly b/input/regression/markup-path.ly new file mode 100644 index 0000000000..deedf54a13 --- /dev/null +++ b/input/regression/markup-path.ly @@ -0,0 +1,23 @@ +\version "2.13.31" + +\header { + texidoc = " +The @code{\\path} markup command allows the user to draw +arbitrary paths using a simple syntax. The two paths below +should be identical. +" +} + +\markup { + \column { + \path #0.2 #'((moveto 1 1) + (lineto 1 6) + (curveto 3 8 5 6 1 1) + (closepath)) + + \path #0.2 #'((rmoveto 1 1) + (rlineto 0 5) + (rcurveto 2 2 4 0 0 -5) + (closepath)) + } +} -- 2.39.5