[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: box widths
From: |
Han-Wen Nienhuys |
Subject: |
Re: box widths |
Date: |
Thu, 28 Oct 2004 10:19:31 +0200 |
address@hidden writes:
> On Wed, 2004-10-27 at 08:36, Werner LEMBERG wrote:
> > I have a fundamental problem with the width of lilypond output, and
> > which should be fixed before releasing 2.4. Currently, I use
> >
> > (interval-start (ly:stencil-extent page X))
> >
> > but this isn't the right value. Reason: Contrary to TeX boxes,
> > lilypond's horizontal reference point is not always the left edge of
> > the output box:
> >
> > ^
> > |
> > +----+----------+
> > | | |
> > | | |
> > ----+----+----------+--->
A O B
> > | | |
> > +----+----------+
> > |
> > |
> >
> > We have `height' and `depth' as with TeX boxes, and we have `width'
> > and `extension' (to coin this term), where `width' is the amount right
> > of the y-axis, and `extension' the left amount (and let's assume that
> > `extension' is positive).
> >
> > The above scheme code gives `width + extension', but I need `width'
> > only. How can I get that?
ly:stencil-extent will return a pair (A . B) with A < B, and A
typically negative.
I've added a ly:stencil-origin, which returns the coordinates of O.
HTH,
Han-Wen
--
Han-Wen Nienhuys | address@hidden | http://www.xs4all.nl/~hanwen