3 public struct Pattern: View {
5 private let pixelSize: CGFloat = 2.0;
7 private var patternSize: CGFloat {
11 @Binding var design: TileDesign;
13 public var body: some View {
14 GeometryReader { gr in
16 ForEach(0 ..< 1 + Int(ceil(gr.size.height / patternSize)), id: \.self) { i in
18 ForEach(0 ..< Int(ceil(gr.size.width / patternSize)), id: \.self) { j in
28 struct Pattern_Previews: PreviewProvider {
29 static var previews: some View {
30 Pattern(design: .constant(TileDesign.grid))