diagrams / diagrams-rasterific

Rasterific backend for diagrams
Other
15 stars 12 forks source link

disappearing dashes at low resolution #51

Closed robx closed 6 years ago

robx commented 6 years ago

After switching from diagrams-cairo, I've noticed some gaps in dashed circles, compare https://github.com/robx/puzzle-draw/issues/32

The first two below are fine, then some dashes start disappearing in a way that seems wrong:

test-dashing-100 test-dashing-80 test-dashing-50 test-dashing-40

These were rendered by the following code:

dia :: Diagram B
dia = bgFrame 0.15 white $
    circle 0.35 # lwG (1/40) # dashingG [1/20, 1/20] 0

sizeSpec :: Double -> SizeSpec V2 Double
sizeSpec w = mkSizeSpec2D (Just w) Nothing

main :: IO ()
main = do
  renderRasterific "test-dashing-100.png" (sizeSpec 100) dia
  renderRasterific "test-dashing-80.png" (sizeSpec 80) dia
  renderRasterific "test-dashing-50.png" (sizeSpec 50) dia
  renderRasterific "test-dashing-40.png" (sizeSpec 40) dia
robx commented 6 years ago

It turns out the Rasterific fix (with version 0.7.4) also restored some missing small sold circles:

before after