]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add regression tests for \path markup command.
authorPatrick McCarty <pnorcks@gmail.com>
Fri, 13 Aug 2010 21:42:46 +0000 (14:42 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Fri, 13 Aug 2010 22:03:08 +0000 (15:03 -0700)
input/regression/markup-path-fill.ly [new file with mode: 0644]
input/regression/markup-path-linecap.ly [new file with mode: 0644]
input/regression/markup-path-linejoin.ly [new file with mode: 0644]
input/regression/markup-path.ly [new file with mode: 0644]

diff --git a/input/regression/markup-path-fill.ly b/input/regression/markup-path-fill.ly
new file mode 100644 (file)
index 0000000..e4c9a03
--- /dev/null
@@ -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 (file)
index 0000000..7ed4e62
--- /dev/null
@@ -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 (file)
index 0000000..f11879f
--- /dev/null
@@ -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 (file)
index 0000000..deedf54
--- /dev/null
@@ -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))
+  }
+}