From 7865e8f87e139c4f0a735b3cb2ffafa973fdd827 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 27 Jul 2006 17:12:18 +0000 Subject: [PATCH] Undo the following revisions: r3839 r3825 r3823 r3821 r3820 (undo only the changes in drscheme/private/debug.ss) r3792 r3791 They will be re-done after v352 is released svn: r3843 original commit: 5099b078c6bc07d83e0b11d486e342905a87ede4 --- collects/mrlib/graph.ss | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/collects/mrlib/graph.ss b/collects/mrlib/graph.ss index 4aa788d0..a1be5258 100644 --- a/collects/mrlib/graph.ss +++ b/collects/mrlib/graph.ss @@ -748,18 +748,18 @@ (send dc draw-polygon points dx dy)) (when (named-link? from-link) (let*-values ([(text-len h d v) (send dc get-text-extent (link-label from-link))] - [(theta) (angle (- to-pt from-pt))] - [(cx cy) (values (/ (+ from-x to-x) 2) - (/ (+ from-y to-y) 2))] - - ;; ax, ay is the location of the beginning of the string - ;; offset from cx,cy by enough to make the string centered - ;; (but it doesn't seem to be quite right; i'm not sure why) - [(ax ay) (values (- cx (* 1/2 text-len (cos theta))) - (- cy (* 1/2 text-len (sin theta))))] - - [(x y) (values (- ax (* h (cos theta))) - (- ay (* h (sin theta))))] + [(x) (/ (+ from-x to-x) 2)] + [(y) (/ (+ from-y to-y) 2)] + [(theta) (- (angle (- to-pt from-pt)))] + [(flip?) #f #;(negative? (- to-x from-x))] + [(text-angle) + (if flip? + (+ theta pi) + theta)] + [(x) + (- x (* h (cos (if flip? (+ (- theta) pi) (- theta)))))] + [(y) + (- y (* h (sin (if flip? (+ (- theta) pi) (- theta)))))] [(sqr) (λ (x) (* x x))]) (when (> (sqrt (+ (sqr (- to-x from-x)) (sqr (- to-y from-y)))) text-len) (send dc draw-text (link-label from-link) @@ -767,7 +767,7 @@ (+ dy y) #f 0 - (- theta))) + text-angle)) ))])))))))) (define (named-link? l) (link-label l))