- Stencil s = stencils[d]->translated (span_points[d]);
- SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
- bounds[d], SCM_BOOL_F);
- SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
- bounds[d], SCM_BOOL_F);
+ Interval ext = stencils[d]->extent (X_AXIS);
+ Real anchor = ext.linear_combination (anchor_align[d]) - ext[LEFT];
+ span_points[d][X_AXIS] -= anchor;
+
+ Stencil s = stencils[d]->translated (span_points[d]);
+ SCM align = ly_assoc_get (ly_symbol2scm ("stencil-align-dir-y"),
+ bounds[d], SCM_BOOL_F);
+ SCM off = ly_assoc_get (ly_symbol2scm ("stencil-offset"),
+ bounds[d], SCM_BOOL_F);