[TODO]
* begin and end should be treated as a/acknowledge Scripts.
* broken slur should have uniform trend
- * smart changing of endings and offsets to avoid ugly beziers.
+ * smart changing of endings
+ * smart changing of (Y-?)offsets to avoid ugly beziers
+ (along-side-stem)
*/
#include "directional-element-interface.hh"
{
SCM s = get_elt_property ("attachment");
SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
+ String str = ly_symbol2string (a);
Real ss = Staff_symbol_referencer_interface (this).staff_space ();
Real hs = ss / 2.0;
Offset o;
{
if (Stem* st = dynamic_cast<Stem*> (n->stem_l ()))
{
- String str = ly_symbol2string (a);
if (str == "head")
{
o = Offset (0, st->chord_start_f ());
}
}
}
-
+
+
+ /*
+ URG
+ */
+
+ if (str != "loose-end")
+ {
+ Link_array<Note_column> encompass_arr =
+ Pointer_group_interface__extract_elements (this, (Note_column*)0,
+ "note-columns");
+ o -= Offset (0, calc_interstaff_dist (dir == LEFT ? encompass_arr[0]
+ : encompass_arr.top (), this));
+ }
return o;
}
left is broken edge
*/
int cross_count = cross_staff_count ();
+
+ /*
+ URG
+ */
bool cross_b = cross_count && cross_count < encompass_arr.size ();
if (encompass_arr[0] != get_bound (LEFT))
{
first--;
- Real is = calc_interstaff_dist (encompass_arr[0], this);
+ Real is = calc_interstaff_dist (encompass_arr[0], this);
if (cross_b)
offset_arr[0][Y_AXIS] += is;
}
Bezier b;
int i = 0;
- if (!directional_element (this).get ())
+ // URGURG?
+ if (!directional_element (this).get ()
+ || ! gh_symbol_p (index_cell (get_elt_property ("attachment"), LEFT)))
((Slur*)this)->set_extremities ();
if (!gh_pair_p (get_elt_property ("control-points")))
-;;; als aan echte stok
-;;; if ((note_column_drul[d] == get_bound (d))
-;;; && note_column_drul[d]->first_head ()
-;;; && (note_column_drul[d]->stem_l ()))
-;;;
-;;; *Need: Score_elment::pointer_alist_
-;;; Score_elment::property_alist_
-;;; Spanner::Drul_array<Item*> spanned_drul_;
-;;; spanner:: (cons get_bound (LEFT) get_bound (RIGHT))
-
(define (attached-to-stem slur dir)
(let* ((note-columns (get-pointer slur 'note-columns))
(col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
;; default case, attach to head
((lambda (x y) #t) . head)
-
- ;; silly rule, just to check
- ((lambda (slur dir)
- (and (attached-to-stem slur dir)
- (= (get-property slur 'direction) dir))) . stem)
))