LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2002--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2002--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 vector<Box> boxes = Accidental_interface::accurate_boxes (a, common); | 264 vector<Box> boxes = Accidental_interface::accurate_boxes (a, common); |
265 ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ()); | 265 ape->extents_.insert (ape->extents_.end (), boxes.begin (), boxes.end ()); |
266 | 266 |
267 for (vsize j = boxes.size (); j--;) | 267 for (vsize j = boxes.size (); j--;) |
268 ape->vertical_extent_.unite (boxes[j][Y_AXIS]); | 268 ape->vertical_extent_.unite (boxes[j][Y_AXIS]); |
269 | 269 |
270 last_octave = p->get_octave (); | 270 last_octave = p->get_octave (); |
271 last_alteration = p->get_alteration (); | 271 last_alteration = p->get_alteration (); |
272 } | 272 } |
273 ape->left_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, LEFT); | 273 ape->left_skyline_ = Skyline (ape->extents_, Y_AXIS, LEFT); |
274 ape->right_skyline_ = Skyline (ape->extents_, 0, Y_AXIS, RIGHT); | 274 ape->right_skyline_ = Skyline (ape->extents_, Y_AXIS, RIGHT); |
275 } | 275 } |
276 | 276 |
277 static vector<Grob *> | 277 static vector<Grob *> |
278 extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes) | 278 extract_heads_and_stems (vector<Accidental_placement_entry *> const &apes) |
279 { | 279 { |
280 vector<Grob *> note_cols; | 280 vector<Grob *> note_cols; |
281 vector<Grob *> ret; | 281 vector<Grob *> ret; |
282 | 282 |
283 for (vsize i = apes.size (); i--;) | 283 for (vsize i = apes.size (); i--;) |
284 { | 284 { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 static Skyline | 344 static Skyline |
345 build_heads_skyline (vector<Grob *> const &heads_and_stems, | 345 build_heads_skyline (vector<Grob *> const &heads_and_stems, |
346 Grob **common) | 346 Grob **common) |
347 { | 347 { |
348 vector<Box> head_extents; | 348 vector<Box> head_extents; |
349 for (vsize i = heads_and_stems.size (); i--;) | 349 for (vsize i = heads_and_stems.size (); i--;) |
350 head_extents.push_back (Box (heads_and_stems[i]->extent (common[X_AXIS], X_A
XIS), | 350 head_extents.push_back (Box (heads_and_stems[i]->extent (common[X_AXIS], X_A
XIS), |
351 heads_and_stems[i]->pure_height (common[Y_AXIS]
, 0, INT_MAX))); | 351 heads_and_stems[i]->pure_height (common[Y_AXIS]
, 0, INT_MAX))); |
352 | 352 |
353 return Skyline (head_extents, 0, Y_AXIS, LEFT); | 353 return Skyline (head_extents, Y_AXIS, LEFT); |
354 } | 354 } |
355 | 355 |
356 /* | 356 /* |
357 Position the apes, starting from the right, so that they don't collide. | 357 Position the apes, starting from the right, so that they don't collide. |
358 Return the total width. | 358 Return the total width. |
359 */ | 359 */ |
360 static Interval | 360 static Interval |
361 position_apes (Grob *me, | 361 position_apes (Grob *me, |
362 vector<Accidental_placement_entry *> const &apes, | 362 vector<Accidental_placement_entry *> const &apes, |
363 Skyline const &heads_skyline) | 363 Skyline const &heads_skyline) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 "Resolve accidental collisions.", | 482 "Resolve accidental collisions.", |
483 | 483 |
484 /* properties */ | 484 /* properties */ |
485 "accidental-grobs " | 485 "accidental-grobs " |
486 "direction " | 486 "direction " |
487 "padding " | 487 "padding " |
488 "positioning-done " | 488 "positioning-done " |
489 "right-padding " | 489 "right-padding " |
490 "script-priority " | 490 "script-priority " |
491 ); | 491 ); |
LEFT | RIGHT |