[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Image width issue
From: |
Rajesh Baskar |
Subject: |
Re: Image width issue |
Date: |
Tue, 31 Jan 2023 11:23:29 -0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
Hi Jean,
The solution you gave me works very good for whole
notes. But if the notes have stems then the stems are not
removed. Please look at the LilyPond like below.
\version "2.22.0" \language english boxify =
#(define-music-function (grob-path) (key-list?) (define proc
(grob-transformer 'stencil (lambda (grob orig)
(grob-interpret-markup grob #{ \markup \override #'(box-padding
. 1.25) \override #'(thickness . 1) \box \stencil #orig #}))))
#{ \override $grob-path . stencil = #proc #})
\header {tagline = ##f }
RedDotMarkup = \markup \with-color "#FF0000" \vcenter \fontsize
#10 \musicglyph "dots.dot"
RedDot =
\tweak text \RedDotMarkup
\tweak stencil
#(grob-transformer
'stencil
(lambda (grob original)
(ly:stencil-outline
(ly:text-interface::print grob)
original)))
\tweak staff-position #0
\etc
\score {\new Staff { \override
Score.SpacingSpanner.strict-note-spacing = ##t
\set Score.proportionalNotationDuration =
#(ly:make-moment 1/8)
\override
Staff.MeasureCounter.staff-padding = #4.5
\set Staff.midiInstrument = #"acoustic
grand"
\key c \major \numericTimeSignature \time
4/4
\clef bass \startMeasureCount f4 g a bf
\once \hide Accidental\RedDot bf4 \RedDot c'
f2 \stopMeasureCount \bar "||"}
\layout { \context { \Staff \consists
Measure_counter_engraver
\boxify MeasureCounter } } }
On 1/13/2023 3:25 PM, Jean Abou Samra
wrote:
Le
14/01/2023 à 00:22, Rajesh Baskar a écrit :
Hi Jean,
I don't think I saw your response.Here is the question again -
The solution that you gave makes the 1st image match the width
of the 2nd image by reducing it. Can the 2nd images width match
the 1st images width by increasing it.
Why not, as I said, read the response I gave to this on
https://lists.gnu.org/archive/html/lilypond-user/2023-01/msg00228.html
Why we need this is when there are a lot
of notes hidden then this difference between the 2 images looks
really bad in our app.
I'm curious, could you tell more about what you're using LilyPond
for in this app?
Regards,
Jean