From 2882982e075d2c78a14476db3a12f10ddf992d31 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Wed, 12 Aug 2015 15:20:48 +0200 Subject: [PATCH] Don't bother drawing straight flags in a certain orientation --- scm/define-markup-commands.scm | 16 ++++------------ scm/flag-styles.scm | 15 ++++----------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index d7c0f22e46..363977da9b 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -3495,18 +3495,10 @@ Supported flag-styles are @code{default}, @code{old-straight-flag}, (thickness-offset (cons 0 (* -1 thickness dir))) (spacing (* -1 flag-spacing factor dir)) (start (cons (- half-stem-thickness) (* half-stem-thickness dir))) - ;; The points of a round-filled-polygon need to be given in - ;; clockwise order, otherwise the polygon will be enlarged by - ;; blot-size*2! - (points (if stem-up - (list start - flag-end - (offset-add flag-end thickness-offset) - (offset-add start thickness-offset)) - (list start - (offset-add start thickness-offset) - (offset-add flag-end thickness-offset) - flag-end))) + (points (list start + flag-end + (offset-add flag-end thickness-offset) + (offset-add start thickness-offset))) (stencil (ly:round-filled-polygon points half-stem-thickness)) ;; Log for 1/8 is 3, so we need to subtract 3 (flag-stencil (buildflags stencil (- log 3) stencil spacing))) diff --git a/scm/flag-styles.scm b/scm/flag-styles.scm index 01fe315da0..2b52f44cb2 100644 --- a/scm/flag-styles.scm +++ b/scm/flag-styles.scm @@ -90,17 +90,10 @@ All lengths are scaled according to the font size of the note." (thickness-offset (cons 0 (* -1 thickness dir))) (spacing (* -1 flag-spacing factor dir )) (start (cons (- half-stem-thickness) (* half-stem-thickness dir))) - ;; The points of a round-filled-polygon need to be given in clockwise - ;; order, otherwise the polygon will be enlarged by blot-size*2! - (points (if stem-up - (list start - flag-end - (offset-add flag-end thickness-offset) - (offset-add start thickness-offset)) - (list start - (offset-add start thickness-offset) - (offset-add flag-end thickness-offset) - flag-end))) + (points (list start + flag-end + (offset-add flag-end thickness-offset) + (offset-add start thickness-offset))) (stencil (ly:round-filled-polygon points half-stem-thickness)) ;; Log for 1/8 is 3, so we need to subtract 3 (flag-stencil (buildflag stencil (- log 3) stencil spacing)) -- 2.39.2