http://codereview.appspot.com/5626052/diff/78001/lily/skyline.cc File lily/skyline.cc (right):
http://codereview.appspot.com/5626052/diff/78001/lily/skyline.cc#newcode693 lily/skyline.cc:693: Skyline::padded (Real horizon_padding) const On 2012/07/01 23:04:17, Keith wrote:
The horizon_padding built in to Skyline::Skyline had nice beveled
corners; does
this result in nice beveled corners ?
It did - I want to get Joe's feedback first before moving back large chunks of the old code, as he was the one who created a lot of this new Skyline stuff and I want to make sure I'm understanding it correctly. http://codereview.appspot.com/5626052/diff/78001/lily/skyline.cc#newcode699 lily/skyline.cc:699: if (last_end > -infinity_f) On 2012/07/01 23:04:17, Keith wrote:
I don't see any assignments to 'last_end' so this seems to be always
false. True - that's one of the problems. The other is that height is always an empty interval. I've rewritten it as: Skyline Skyline::padded (Real horizon_padding) const { vector<Box> pad_boxes; Real last_end = -infinity_f; for (list<Building>::const_iterator i = buildings_.begin (); i != buildings_.end (); ++i) { if (last_end > -infinity_f) { // Add the box that pads the left side of the current building. Real start = last_end - horizon_padding; Real height = i->height (last_end); if (height > -infinity_f) pad_boxes.push_back (Box (Interval (start, last_end), Interval (min (height - 0.01, height), max (height - 0.01, height)))); } if (i->end_ < infinity_f) { // Add the box that pads the right side of the current building. Real start = i->end_; Real end = start + horizon_padding; Real height = i->height (start); if (height > -infinity_f) pad_boxes.push_back (Box (Interval (start, end), Interval (min (height - 0.01, height), max (height - 0.01, height)))); } } // We created pad_boxes assuming that sky_ is UP. To get padded to use // the UP side of the boxes, we need to create it pointing UP even if // it doesn't really. Skyline padded (pad_boxes, X_AXIS, UP); padded.sky_ = sky_; padded.merge (*this); return padded; } and still no result as expected... http://codereview.appspot.com/5626052/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel