OLD | NEW |
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) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 Jan Nieuwenhuizen <janneke@gnu.org> | 6 Jan Nieuwenhuizen <janneke@gnu.org> |
7 | 7 |
8 LilyPond is free software: you can redistribute it and/or modify | 8 LilyPond is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 return polygon; | 326 return polygon; |
327 } | 327 } |
328 | 328 |
329 /* | 329 /* |
330 TODO: deprecate? | 330 TODO: deprecate? |
331 */ | 331 */ |
332 Stencil | 332 Stencil |
333 Lookup::frame (Box b, Real thick, Real blot) | 333 Lookup::frame (Box b, Real thick, Real blot) |
334 { | 334 { |
335 Stencil m; | 335 Stencil m; |
336 Direction d = LEFT; | |
337 for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1)) | 336 for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1)) |
338 { | 337 { |
339 Axis o = Axis ((a + 1) % NO_AXES); | 338 Axis o = Axis ((a + 1) % NO_AXES); |
340 do | 339 for (LEFT_and_RIGHT (d)) |
341 { | 340 { |
342 Box edges; | 341 Box edges; |
343 edges[a] = b[a][d] + 0.5 * thick * Interval (-1, 1); | 342 edges[a] = b[a][d] + 0.5 * thick * Interval (-1, 1); |
344 edges[o][DOWN] = b[o][DOWN] - thick / 2; | 343 edges[o][DOWN] = b[o][DOWN] - thick / 2; |
345 edges[o][UP] = b[o][UP] + thick / 2; | 344 edges[o][UP] = b[o][UP] + thick / 2; |
346 | 345 |
347 m.add_stencil (round_filled_box (edges, blot)); | 346 m.add_stencil (round_filled_box (edges, blot)); |
348 } | 347 } |
349 while (flip (&d) != LEFT); | |
350 } | 348 } |
351 return m; | 349 return m; |
352 } | 350 } |
353 | 351 |
354 /* | 352 /* |
355 Make a smooth curve along the points | 353 Make a smooth curve along the points |
356 */ | 354 */ |
357 Stencil | 355 Stencil |
358 Lookup::slur (Bezier curve, Real curvethick, Real linethick, | 356 Lookup::slur (Bezier curve, Real curvethick, Real linethick, |
359 SCM dash_details) | 357 SCM dash_details) |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 { | 567 { |
570 if (points[i - 1].is_sane () && points[i].is_sane ()) | 568 if (points[i - 1].is_sane () && points[i].is_sane ()) |
571 { | 569 { |
572 Stencil line | 570 Stencil line |
573 = Line_interface::make_line (thick, points[i - 1], points[i]); | 571 = Line_interface::make_line (thick, points[i - 1], points[i]); |
574 ret.add_stencil (line); | 572 ret.add_stencil (line); |
575 } | 573 } |
576 } | 574 } |
577 return ret; | 575 return ret; |
578 } | 576 } |
OLD | NEW |