Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Bugfix: Make the text-outline method of dc-path% handle curves correctly #68

wants to merge 1 commit into from

1 participant


The text-outline method of dc-path% incorrectly handles curves.

Before this change, this snippet is rendered incorrectly:

Incorrect render

 (λ (dc x y)                               
   (define r (new region%))                
   (let ([p (new dc-path%)])               
     (send p text-outline                  
           (make-object font% 35 'default) 
           "Hello world"                   
           x y)                            
     (send r set-path p))                  
   (send dc set-clipping-region r)         
   (send dc set-brush "black" 'solid)      
   (send dc draw-rectangle 0 0 500 200))   
 500 200)                                  

Fixed in ae1ca5b

@gcr gcr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 26, 2011
  1. @gcr
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 collects/racket/draw/private/dc-path.rkt
4 collects/racket/draw/private/dc-path.rkt
@@ -290,8 +290,8 @@
[(move) (move-to (cadr a) (caddr a))]
[(line) (line-to (cadr a) (caddr a))]
[(curve) (curve-to (cadr a) (caddr a)
- (list-ref a 2) (list-ref a 3)
- (list-ref a 4) (list-ref a 5))]
+ (list-ref a 3) (list-ref a 4)
+ (list-ref a 5) (list-ref a 6))]
[(close) (close)])))
Something went wrong with that request. Please try again.