Re: adding markup-commands \oval and \ellipse (issue 11427044)

2013-07-23 Thread dak


https://codereview.appspot.com/11427044/diff/9001/scm/define-markup-commands.scm
File scm/define-markup-commands.scm (right):

https://codereview.appspot.com/11427044/diff/9001/scm/define-markup-commands.scm#newcode416
scm/define-markup-commands.scm:416: (x-padding 0.75)
I am not enthused about the use of x-padding and y-padding here (no
other commands have them).  Boxes (of all kind) have box-padding (for
both x and y), circles have circle-padding.

It does make sense to have padding names that don't change when the
padded element changes.  It is somewhat annoying that overrides
encompass all enclosed material (particularly for things like word-space
and similar) rather than just the top level.

At any rate, having things like omnidirectional oval-padding and
ellipse-padding would not likely make me much happier.  So I'm just
expressing my displeasure at a dissatisfactory state that is not really
the fault of this patch.

https://codereview.appspot.com/11427044/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: adding markup-commands \oval and \ellipse (issue 11427044)

2013-07-22 Thread david . nalesnik

LGTM

Thanks for adding these, Harm.

https://codereview.appspot.com/11427044/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: adding markup-commands \oval and \ellipse (issue 11427044)

2013-07-21 Thread graham

LGTM

https://codereview.appspot.com/11427044/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


adding markup-commands \oval and \ellipse (issue 11427044)

2013-07-17 Thread thomasmorley65

Reviewers: ,

Message:
Please review.

(git-cl seems to work - currently)

Description:
adding markup-commands \oval and \ellipse

\oval and \ellipse are drawing an oval respectively an ellipse around
their argument.
Also adding a reg-test for markup-commands framing their argument.

Please review this at https://codereview.appspot.com/11427044/

Affected files:
  A input/regression/markup-frame-text.ly
  M scm/define-markup-commands.scm


Index: input/regression/markup-frame-text.ly
diff --git a/input/regression/markup-frame-text.ly  
b/input/regression/markup-frame-text.ly

new file mode 100644
index  
..b7960807dc56c0d6f5a11ca43439db8608ded04e

--- /dev/null
+++ b/input/regression/markup-frame-text.ly
@@ -0,0 +1,15 @@
+\version "2.17.23"
+
+\header {
+
+  texidoc = "Text is framed properly with @code{\\box},
+  @code{\\circle}, @code{\\oval} and @code{\\ellipse}"
+
+}
+
+\markup \column {
+   \line { \box { text in boxes "1" "12" "123" } }
+   \line { \circle { text in circles "1" "12" "123" } }
+   \line { \oval { text in ovals "1" "12" "123" } }
+   \line { \ellipse { text in ellipses "1" "12" "123" } }
+}
Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index  
ed1ab40420943d12fa0d4d83ce0e7dbc54d3c43f..f23644e1b55605dba04aefb40f6ac89612f5c69d  
100644

--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -380,6 +380,58 @@ thickness and padding around the markup.
 (m (interpret-markup layout props arg)))
 (circle-stencil m th pad)))

+(define-markup-command (ellipse layout props arg)
+  (markup?)
+  #:category graphic
+  #:properties ((thickness 1)
+(font-size 0)
+(ellipse-padding 0.2))
+ "
+@cindex drawing ellipse around text
+
+Draw an ellipse around @var{arg}.  Use @code{thickness},
+@code{ellipse-padding} and @code{font-size} properties to determine line
+thickness and padding around the markup.
+
+@lilypond[verbatim,quote]
+\\markup {
+  \\ellipse {
+Hi
+  }
+}
+@end lilypond"
+  (let ((th (* (ly:output-def-lookup layout 'line-thickness)
+   thickness))
+(pad (* (magstep font-size) ellipse-padding))
+(m (interpret-markup layout props arg)))
+(ellipse-stencil m th pad pad)))
+
+(define-markup-command (oval layout props arg)
+  (markup?)
+  #:category graphic
+  #:properties ((thickness 1)
+(font-size 0)
+(oval-padding 0.75))
+ "
+@cindex drawing oval around text
+
+Draw a oval around @var{arg}.  Use @code{thickness},
+@code{oval-padding} and @code{font-size} properties to determine line
+thickness and padding around the markup.
+
+@lilypond[verbatim,quote]
+\\markup {
+  \\oval {
+Hi
+  }
+}
+@end lilypond"
+  (let ((th (* (ly:output-def-lookup layout 'line-thickness)
+   thickness))
+(pad (* (magstep font-size) oval-padding))
+(m (interpret-markup layout props arg)))
+(oval-stencil m th pad pad)))
+
 (define-markup-command (with-url layout props url arg)
   (string? markup?)
   #:category graphic



___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel