bug-lilypond
[Top][All Lists]
Advanced

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

override color property of a markup command


From: Davide Bonetti
Subject: override color property of a markup command
Date: Mon, 27 Jan 2014 16:04:21 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I'm not top posting.

%non si riesce a modificare la proprietà di un nuovo comando markup
%se questa proprietà si riferisce a un colore

% in a new markup command it is not possible to override a color property

% esempio minimo: definisco un nuovo comando che colora un markup di rosso
% ma del quale voglio poter cambiare la proprietà "internal-color"
successivamente

% minimal example: a new command that turn red a text, where i can change
the property "internal-color"

\version "2.18.0"

#(define-markup-command (colorize layout props arg1) (markup?)
  #:properties ((internal-color red))
    (interpret-markup layout props
    #{\markup 
      \with-color #internal-color #arg1
    #}))

% usato normalmente il comando funziona

% the new command works in normal way

\markup \colorize "foo" %funziona

% tentando di cambiare la proprietà "internal-color" si riceve un messaggio
di errore

% but if I try to override the "internal-color" property I get an error message

\markup 
  \override #'(internal-color . green)
   \colorize "foo"
   
% messaggio di errore ricevuto:
% errore: tipo di argomento errato per 1. Previsto color, trovato green

% parser-ly-from-scheme.scm:71:22: Wrong type argument in position 1: (green
. #f)




reply via email to

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