From b2ae4264e3c227330e4cfcae4eceb431abbbf289 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 24 Feb 2009 17:47:24 +0000 Subject: [PATCH] change pin-line pull to a ratio svn: r13821 --- collects/scribblings/slideshow/picts.scrbl | 16 +++++++--------- collects/slideshow/pict.ss | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/collects/scribblings/slideshow/picts.scrbl b/collects/scribblings/slideshow/picts.scrbl index 72d8a03d26..cae5e309f1 100644 --- a/collects/scribblings/slideshow/picts.scrbl +++ b/collects/scribblings/slideshow/picts.scrbl @@ -287,8 +287,8 @@ argument for consistency with the other functions.} [find-dest (pict? pict-path? . -> . (values real? real?))] [#:start-angle start-angle (or/c real? #f) #f] [#:end-angle end-angle (or/c real? #f) #f] - [#:start-pull start-pull (or/c real? #f) #f] - [#:end-pull end-pull (or/c real? #f) #f] + [#:start-pull start-pull real? 1/4] + [#:end-pull end-pull real? 1/4] [#:line-width line-width (or/c #f real?) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f] [#:under? under? any/c #f]) @@ -300,8 +300,8 @@ argument for consistency with the other functions.} [find-dest (pict? pict-path? . -> . (values real? real?))] [#:start-angle start-angle (or/c real? #f) #f] [#:end-angle end-angle (or/c real? #f) #f] - [#:start-pull start-pull (or/c real? #f) #f] - [#:end-pull end-pull (or/c real? #f) #f] + [#:start-pull start-pull real? 1/4] + [#:end-pull end-pull real? 1/4] [#:line-width line-width (or/c #f real?) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f] [#:under? under? any/c #f] @@ -314,8 +314,8 @@ argument for consistency with the other functions.} [find-dest (pict? pict-path? . -> . (values real? real?))] [#:start-angle start-angle (or/c real? #f) #f] [#:end-angle end-angle (or/c real? #f) #f] - [#:start-pull start-pull (or/c real? #f) #f] - [#:end-pull end-pull (or/c real? #f) #f] + [#:start-pull start-pull real? 1/4] + [#:end-pull end-pull real? 1/4] [#:line-width line-width (or/c #f real?) #f] [#:color color (or/c #f string? (is-a/c? color%)) #f] [#:under? under? any/c #f] @@ -343,9 +343,7 @@ The @scheme[start-angle], @scheme[end-angle], @scheme[start-pull], and @item{The @scheme[start-pull] and @scheme[end-pull] arguments specify a kind of momentum for the starting and ending angles; larger - values preserve the angle longer. If @scheme[start-pull] or - @scheme[end-pull] is @scheme[#f], then it is replaced with - one-fourth of the distance between the start and end points.} + values preserve the angle longer.} ] diff --git a/collects/slideshow/pict.ss b/collects/slideshow/pict.ss index aac07f9fb0..adc304e0d8 100644 --- a/collects/slideshow/pict.ss +++ b/collects/slideshow/pict.ss @@ -108,8 +108,8 @@ [ea (or ea (atan (- sy0 dy0) (- dx0 sx0)))] [d (sqrt (+ (* (- dy0 sy0) (- dy0 sy0)) (* (- dx0 sx0) (- dx0 sx0))))] - [sp (or sp (* 1/4 d))] - [ep (or ep (* 1/4 d))]) + [sp (* (or sp 1/4) d)] + [ep (* (or ep 1/4) d)]) (let ([dx (if end-arrow? (- dx0 (* sz (cos ea))) dx0)] [dy (if end-arrow? (+ dy0 (* sz (sin ea))) dy0)] [sx (if start-arrow? (+ sx0 (* sz (cos sa))) sx0)]