Skip to content

Commit

Permalink
Remove unused code in glyph drawing code (#128)
Browse files Browse the repository at this point in the history
The original intent of the `when` block was to remove the line around the
glyph when the line and fill color were the same. However, the `eq?` test was
always false in Typed Racket, so the code never executed.

The `eq?` test is now fixed in
racket/typed-racket#1358, but as a result, the visual
layout of plots would change, making glyphs smaller, since the outline is not
drawn anymore.

To keep the backwards compatibility of the plot look-and-feel, the entire
`when` block was removed.
  • Loading branch information
alex-hhh authored Jan 27, 2024
1 parent 2417c22 commit 5de5490
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions plot-lib/plot/private/common/plot-device.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,6 @@
(define r (* 1/2 size))
(define line-sym
(cond [(hash-has-key? full-glyph-hash real-sym)
(when (eq? pen-color brush-color)
(set-pen pen-color 1 'transparent)
(set-brush brush-color 'solid))
(hash-ref full-glyph-hash real-sym)]
[else (set-brush brush-color 'transparent)
real-sym]))
Expand Down

0 comments on commit 5de5490

Please sign in to comment.