LEFT | RIGHT |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 (ly:format | 105 (ly:format |
106 "~a ~4f ~4f ~4f draw_ellipse" | 106 "~a ~4f ~4f ~4f draw_ellipse" |
107 (if fill | 107 (if fill |
108 "true" | 108 "true" |
109 "false") | 109 "false") |
110 x-radius y-radius thick)) | 110 x-radius y-radius thick)) |
111 | 111 |
112 (define (embedded-ps string) | 112 (define (embedded-ps string) |
113 string) | 113 string) |
114 | 114 |
115 (define (glyph-string postscript-font-name | 115 (define (glyph-string pango-font |
| 116 postscript-font-name |
116 size | 117 size |
117 cid? | 118 cid? |
118 w-x-y-named-glyphs) | 119 w-x-y-named-glyphs) |
119 | 120 |
120 (define (glyph-spec w h x y g) ; h not used | 121 (define (glyph-spec w h x y g) ; h not used |
121 (let ((prefix (if (string? g) "/" ""))) | 122 (let ((prefix (if (string? g) "/" ""))) |
122 (ly:format "~4f ~4f ~4f ~a~a" | 123 (ly:format "~4f ~4f ~4f ~a~a" |
123 w x y | 124 w x y |
124 prefix g))) | 125 prefix g))) |
125 | 126 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 (ly:format "~4f ~4f moveto ~a\n" x y s) | 195 (ly:format "~4f ~4f moveto ~a\n" x y s) |
195 "")) | 196 "")) |
196 | 197 |
197 (define (polygon points blot-diameter filled?) | 198 (define (polygon points blot-diameter filled?) |
198 (ly:format "~a ~4l ~a ~4f draw_polygon" | 199 (ly:format "~a ~4l ~a ~4f draw_polygon" |
199 (if filled? "true" "false") | 200 (if filled? "true" "false") |
200 points | 201 points |
201 (- (/ (length points) 2) 1) | 202 (- (/ (length points) 2) 1) |
202 blot-diameter)) | 203 blot-diameter)) |
203 | 204 |
204 (define (repeat-slash width slope beam-thickness) | |
205 (define (euclidean-length x y) | |
206 (sqrt (+ (* x x) (* y y)))) | |
207 | |
208 (let ((x-width (euclidean-length beam-thickness (/ beam-thickness slope))) | |
209 (height (* width slope))) | |
210 (ly:format "~4l draw_repeat_slash" | |
211 (list x-width width height)))) | |
212 | |
213 | |
214 (define (round-filled-box left right bottom top blotdiam) | 205 (define (round-filled-box left right bottom top blotdiam) |
215 (let* ((halfblot (/ blotdiam 2)) | 206 (let* ((halfblot (/ blotdiam 2)) |
216 (x (- halfblot left)) | 207 (x (- halfblot left)) |
217 (width (- right (+ halfblot x))) | 208 (width (- right (+ halfblot x))) |
218 (y (- halfblot bottom)) | 209 (y (- halfblot bottom)) |
219 (height (- top (+ halfblot y)))) | 210 (height (- top (+ halfblot y)))) |
220 (ly:format "~4l draw_round_box" | 211 (ly:format "~4l draw_round_box" |
221 (list width height x y blotdiam)))) | 212 (list width height x y blotdiam)))) |
222 | 213 |
223 ;; save current color on stack and set new color | 214 ;; save current color on stack and set new color |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 thickness | 292 thickness |
302 (convert-path-exps exps) | 293 (convert-path-exps exps) |
303 (if fill? "fill" "")))) | 294 (if fill? "fill" "")))) |
304 | 295 |
305 (define (setscale x y) | 296 (define (setscale x y) |
306 (ly:format "gsave ~4l scale\n" | 297 (ly:format "gsave ~4l scale\n" |
307 (list x y))) | 298 (list x y))) |
308 | 299 |
309 (define (resetscale) | 300 (define (resetscale) |
310 "grestore\n") | 301 "grestore\n") |
LEFT | RIGHT |