[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ question:

From: David Kastrup
Subject: Re: C++ question:
Date: Fri, 20 Jan 2017 11:16:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Knut Petersen <address@hidden> writes:

> Hi everybody!
> Is there an equivalent of  \with-dimensions #'(0 . 0) #'(0 . 0) that can be 
> used on a stencil within the C++ part of lilypond?
> If not: I thought I could work around that problem  by constructing and using 
> a markup:
>           SCM properties = Font_interface::text_font_alist_chain (me);
>           SCM ws_mol = Text_interface::interpret_markup (me->layout 
> ()->self_scm (), properties, ly_string2scm ("\\markup {\\bold foo}"));
>           Stencil ws = *unsmob<Stencil> (ws_mol);
> That emits "\markup {\bold foo}" instead of the result of the interpreted 
> markup. If I define a property test-markup,
> replace 'ly_string2scm ("\\markup {\\bold foo}")' with something like  
> 'me->get_property ("test-markup")' the code works
> as expected. So ly_string2scm is not enough ... I need a string2markup(). Any 
> idea?

Uh what?

If you want to change the dimensions of a stencil copy, you can just do

Stencil wd0 = orig;
wd0.set_empty (false);

(set_empty (false) sets the bounding dimensions to 0,0 like
point-stencil does, set_empty (true) to nothing like overriding the
stencil with ##f does).

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]