/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Stencil *s2 = Stencil::unsmob (second);
Stencil result;
- SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first == SCM_EOL,
+ SCM_ASSERT_TYPE (s1 || scm_is_false (first) || scm_is_null (first),
first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
- SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL,
+ SCM_ASSERT_TYPE (s2 || scm_is_false (second) || scm_is_null (second),
second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
LY_ASSERT_TYPE (is_axis, axis, 2);
LY_ASSERT_TYPE (is_direction, direction, 3);
Real p = 0.0;
- if (padding != SCM_UNDEFINED)
+ if (!SCM_UNBNDP (padding))
{
LY_ASSERT_TYPE (scm_is_number, padding, 5);
p = scm_to_double (padding);
Stencil *s2 = Stencil::unsmob (second);
Stencil result;
- SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first == SCM_EOL,
+ SCM_ASSERT_TYPE (s1 || scm_is_false (first) || scm_is_null (first),
first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
- SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL,
+ SCM_ASSERT_TYPE (s2 || scm_is_false (second) || scm_is_null (second),
second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
LY_ASSERT_TYPE (is_axis, axis, 2);
LY_ASSERT_TYPE (is_direction, direction, 3);
Real p = 0.0;
- if (padding != SCM_UNDEFINED)
+ if (!SCM_UNBNDP (padding))
{
LY_ASSERT_TYPE (scm_is_number, padding, 5);
p = scm_to_double (padding);
expr, SCM_ARG1, __FUNCTION__, "registered stencil expression");
Interval x;
- if (xext != SCM_UNDEFINED)
+ if (!SCM_UNBNDP (xext))
{
LY_ASSERT_TYPE (is_number_pair, xext, 2);
x = ly_scm2interval (xext);
}
Interval y;
- if (yext != SCM_UNDEFINED)
+ if (!SCM_UNBNDP (yext))
{
LY_ASSERT_TYPE (is_number_pair, yext, 3);
y = ly_scm2interval (yext);
LY_DEFINE (ly_stencil_scale, "ly:stencil-scale",
3, 0, 0, (SCM stil, SCM x, SCM y),
- "Scale @var{stil} using the horizontal and vertical scaling"
- " factors @var{x} and @var{y}.")
+ "Scale stencil @var{stil} using the horizontal and vertical"
+ " scaling factors @var{x} and @var{y}. Negative values will"
+ " flip or mirror @var{stil} without changing its origin;"
+ " this may result in collisions unless it is repositioned.")
{
Stencil *s = Stencil::unsmob (stil);
LY_ASSERT_SMOB (Stencil, stil, 1);