X-Git-Url: https://git.r.bdr.sh/rbdr/patterns/blobdiff_plain/8b0b5b394e5eca8538956fecbaa70ca66fdde24b..ba4ee0edf2aba19ad73fa53cb01dd0fb9b527526:/Sources/Patterns/Tile.swift diff --git a/Sources/Patterns/Tile.swift b/Sources/Patterns/Tile.swift deleted file mode 100644 index c27fcf9..0000000 --- a/Sources/Patterns/Tile.swift +++ /dev/null @@ -1,35 +0,0 @@ -import SwiftUI - -struct Tile: View { - - let pixelSize: CGFloat = 2.0; - - let design: TileDesign - - private var pixels: [Int] { - design.pixels() - } - - var body: some View { - VStack(spacing: 0) { - ForEach(0 ..< 8) { i in - HStack(spacing: 0) { - ForEach(0 ..< 8) { j in - Rectangle() - .frame(width: pixelSize, height: pixelSize) - .foregroundColor(pixels[(i % 8) * 8 + j % 8] == 0 - ? .black - : .white - ) - } - } - } - } - } -} - -struct Tile_Previews: PreviewProvider { - static var previews: some View { - Tile(design: .grid) - } -}