lilypond-devel
[Top][All Lists]
Advanced

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

Re: issue 5307: Skyline Refinements (Rounded Boxes and Rotated Ellipses)


From: Torsten Hämmerle
Subject: Re: issue 5307: Skyline Refinements (Rounded Boxes and Rotated Ellipses) (issue 341140043 by address@hidden)
Date: Mon, 11 Jun 2018 08:39:07 -0700 (MST)

David Kastrup wrote
> https://codereview.appspot.com/341140043/diff/20001/lily/stencil-integral.cc#newcode393
> lily/stencil-integral.cc:393: for (vsize i = 0; i < (vsize) points.size
> () - 1; i++)
> Why would the last point not be transformed?

Oh, the last point actually is being transformed, because all these straight
lines are drawn from p0 to p1 with
Offset p1 = points[i+1];

Therefore, i+1 must be less than the size of the array and hence
i < points.size () - 1


But, obviously, it'd be better to increase i by 2 in each step, because my
current version will draw unnecessary lines (coloured grey in the attached
image).
These additional straight lines don't do any harm because they always lie
within the rounded box, but it'd be better to just leave them away, of
course:

<http://lilypond.1069038.n5.nabble.com/file/t3887/dak-1.png> 




David Kastrup wrote
> https://codereview.appspot.com/341140043/diff/20001/lily/stencil-integral.cc#newcode423
> lily/stencil-integral.cc:423: for (vsize i = 0; i < (vsize) quantization
> + 1; i++)
> Why not i <= quantization ?

No special reason for this. I threw a coin (really!) and I just used <
instead of <= because this had also been done in make_partial_ellipse_boxes.

When changing this, I'd also change it in make_partial_ellipse_boxes, OK?


All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/Dev-f88644.html



reply via email to

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