Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

1 participant

@gcr

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

Before this change, this snippet is rendered incorrectly:

Incorrect render

(dc                                        
 (λ (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)                                  
@gcr

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
View
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)])))
(close))
Something went wrong with that request. Please try again.