drawBorderPixels :: PrimMonad m => Canvas (PrimState m) -> Color -> StdGen -> P2 -> m (Canvas (PrimState m))
drawBorderPixels canvas color g point = do
    (_,_,touched) <- UM.read canvas (index point)
    if touched then do
        points <- pointsToDraw canvas point g
        sequence_ $ (drawPixel canvas color) <$> points
        return canvas
    else return canvas

-- Generate list of safe pixels to check
drawBorderPixels :: PrimMonad m => Canvas (PrimState m) -> Color -> StdGen -> P2 -> m (Canvas (PrimState m))
drawBorderPixels canvas color g point = do
    (_,_,touched) <- UM.read canvas (index point)
    if touched then do
        points <- pointsToDraw canvas point g
        sequence_ $ (drawPixel canvas color) <$> points
        return canvas
    else return canvas

-- Generate list of safe pixels to check
drawBorderPixels canvas color g point = do
    (_,_,touched) <- UM.read canvas (index point)
    if touched then do
        points <- pointsToDraw canvas point g
        sequence_ $ (drawPixel canvas color) <$> points
        return canvas
    else return canvas

-- Generate list of safe pixels to check