Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any form of dash seems broken if pen width is 1 #7

Closed
zenspider opened this issue Sep 28, 2016 · 1 comment
Closed

any form of dash seems broken if pen width is 1 #7

zenspider opened this issue Sep 28, 2016 · 1 comment

Comments

@zenspider
Copy link

zenspider commented Sep 28, 2016

If pen width is 1 and you use 'long-dash or any other variant, dashes are only drawn on the horizontal lines. If width is set to 2, they appear fine.

Repro is here, runs in drracket or racket-mode:

#lang racket/base

(require racket/draw
         racket/class)

(define (draw-box broken)
  (define canvas (make-bitmap 51 28))
  (define dc (send canvas make-dc))

  (send dc set-brush "WhiteSmoke" 'solid)

  (send dc set-pen "black"
        (if broken 1 2)                 ; BUG
        'long-dash)

  (send dc draw-rectangle 1 1 50 25)

  canvas)

(printf "BUG: only dashed on the sides:~n")
(draw-box 'broken)

(printf "correctly dashed, but needs to be 2x wide:~n")
(draw-box #f)

I can't track this down. The cairo binding code is really dense for me.

@zenspider
Copy link
Author

ping

@mflatt mflatt closed this as completed in 04c2c45 Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant