-- | Stroke using default QR code colors (black on white) and
-- with the \"quiet\" region.
stroke :: (D.Backend b D.V2 Double, D.Renderable (D.Path D.V2 Double) b)
          => D.Path D.V2 Double
          -> D.QDiagram b D.V2 Double Any
stroke = D.bg white . quiet . D.fc black . D.lw D.none . D.stroke
  where
    zoneX = D.strutX 4
    zoneY = D.strutY 4
    quiet d =
                  zoneY
                  D.===
       (zoneX D.||| d D.||| zoneX)
                  D.===
                  zoneY


-- | Convert a QR code represented as a list of bounded values
-- into a 'Path'.  'minBound' values are considered to be
-- \"off\", while every other value is considered to be \"on\".
stroke :: (D.Backend b D.V2 Double, D.Renderable (D.Path D.V2 Double) b)
          => D.Path D.V2 Double
          -> D.QDiagram b D.V2 Double Any
stroke = D.bg white . quiet . D.fc black . D.lw D.none . D.stroke
  where
    zoneX = D.strutX 4
    zoneY = D.strutY 4
    quiet d =
                  zoneY
                  D.===
       (zoneX D.||| d D.||| zoneX)
                  D.===
                  zoneY


-- | Convert a QR code represented as a list of bounded values
-- into a 'Path'.  'minBound' values are considered to be
-- \"off\", while every other value is considered to be \"on\".
stroke = D.bg white . quiet . D.fc black . D.lw D.none . D.stroke
  where
    zoneX = D.strutX 4
    zoneY = D.strutY 4
    quiet d =
                  zoneY
                  D.===
       (zoneX D.||| d D.||| zoneX)
                  D.===
                  zoneY


-- | Convert a QR code represented as a list of bounded values
-- into a 'Path'.  'minBound' values are considered to be
-- \"off\", while every other value is considered to be \"on\".