Update of /project/gsharp/cvsroot/gsharp In directory clnet:/tmp/cvs-serv17676
Modified Files: score-pane.lisp sdl.lisp Log Message: Fixed the +-1 problems with beam drawing.
--- /project/gsharp/cvsroot/gsharp/score-pane.lisp 2006/06/07 14:27:27 1.33 +++ /project/gsharp/cvsroot/gsharp/score-pane.lisp 2006/06/07 22:40:26 1.34 @@ -476,9 +476,9 @@ (loop for y from y1 below y2 for x from x1 by inverse-slope do (let ((upper (sdl::ensure-beam-segment-design :down :upper (- (round (+ x inverse-slope)) (round x)))) - (upper-tr (make-translation-transformation (round x) (1+ y))) ; don't know why the 1 is neccesary + (upper-tr (make-translation-transformation (round x) y)) (lower (sdl::ensure-beam-segment-design :down :lower (- (round (+ x inverse-slope)) (round x)))) - (lower-tr (make-translation-transformation (round x) (+ y thickness 1)))) ; don't know why the 1 is neccesary + (lower-tr (make-translation-transformation (round x) (+ y thickness)))) (climi::medium-draw-bezier-design* medium (transform-region upper-tr upper)) (climi::medium-draw-bezier-design* medium (transform-region lower-tr lower)) (medium-draw-rectangle* medium (round x) (1+ y) (round (+ x inverse-slope)) (+ y thickness) t))))) @@ -492,9 +492,9 @@ (loop for y from y1 above y2 for x from x1 by inverse-slope do (let ((upper (sdl::ensure-beam-segment-design :up :upper (- (round (+ x inverse-slope)) (round x)))) - (upper-tr (make-translation-transformation (round x) (1- y))) ; don't know why the -1 is necessary + (upper-tr (make-translation-transformation (round x) y)) (lower (sdl::ensure-beam-segment-design :up :lower (- (round (+ x inverse-slope)) (round x)))) - (lower-tr (make-translation-transformation (round x) (+ y thickness)))) ; don't know why +1 is not neccesary + (lower-tr (make-translation-transformation (round x) (+ y thickness -1)))) (climi::medium-draw-bezier-design* medium (transform-region upper-tr upper)) (climi::medium-draw-bezier-design* medium (transform-region lower-tr lower)) (medium-draw-rectangle* medium (round x) y (round (+ x inverse-slope)) (1- (+ y thickness)) t))))) --- /project/gsharp/cvsroot/gsharp/sdl.lisp 2006/06/07 20:07:12 1.30 +++ /project/gsharp/cvsroot/gsharp/sdl.lisp 2006/06/07 22:40:26 1.31 @@ -307,11 +307,11 @@ (climi::close-path (if (eq direction :down) (if (eq position :upper) - (mf #c(0 0) -- (complex width -1) -- (complex 0 -1) -- #c(0 0)) - (mf #c(0 0) -- (complex width 0) -- (complex width -1) -- #c(0 0))) + (mf #c(0 0) -- (complex width 1) -- (complex 0 1) -- #c(0 0)) + (mf #c(0 0) -- (complex width 0) -- (complex width 1) -- #c(0 0))) (if (eq position :upper) - (mf #c(0 0) -- (complex width 1) -- (complex width 0) -- #c(0 0)) - (mf #c(0 0) -- (complex width 0) -- (complex 0 -1) -- #c(0 0))))))))) + (mf #c(0 0) -- (complex width -1) -- (complex width 0) -- #c(0 0)) + (mf #c(0 0) -- (complex width 0) -- (complex 0 1) -- #c(0 0)))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;