]> git.r.bdr.sh - rbdr/patterns/commitdiff
Make the properties public
authorRuben Beltran del Rio <redacted>
Wed, 26 Apr 2023 15:18:09 +0000 (17:18 +0200)
committerRuben Beltran del Rio <redacted>
Wed, 26 Apr 2023 15:18:09 +0000 (17:18 +0200)
Sources/Patterns/Pattern.swift
Sources/Patterns/PatternPicker.swift
Sources/Patterns/Tile.swift

index 4fbc5287dcf974c94aea8a64c51349d7e1604b76..6c63870fa7e077394181da79730ef97500ca7d09 100644 (file)
@@ -1,16 +1,16 @@
 import SwiftUI
 
 public struct Pattern: View {
+
+  @Binding public var design: TileDesign;
+  public var pixelSize: CGFloat = 2.0;
+  public var foregroundColor: Color = .black
+  public var backgroundColor: Color = .white
   
   private var patternSize: CGFloat {
     pixelSize * 8.0;
   }
   
-  @Binding var design: TileDesign;
-  var pixelSize: CGFloat = 2.0;
-  var foregroundColor: Color = .black
-  var backgroundColor: Color = .white
-  
   public var body: some View {
     GeometryReader { gr in
       VStack(spacing: 0) {
index 1f7d17bab8fe00a369a5241fdc06806b43322158..3f550e528371fb7ad605c66867e1c4416030c677 100644 (file)
@@ -2,12 +2,12 @@ import SwiftUI
 
 public struct PatternPicker: View {
   
-  @Binding var selectedDesign: TileDesign;
+  @Binding public var selectedDesign: TileDesign;
   
-  var selectedColor: Color = .accentColor
-  var pixelSize: CGFloat = 2.0;
-  var foregroundColor: Color = .black
-  var backgroundColor: Color = .white
+  public var selectedColor: Color = .accentColor
+  public var pixelSize: CGFloat = 2.0;
+  public var foregroundColor: Color = .black
+  public var backgroundColor: Color = .white
   
   let patterns = TileDesign.allCases
 
index 389332428f29b8ebe9e22f56ba7e10e4f77a7810..816ebc5a87926eef37f4dfaa89b5f6da4cd8546a 100644 (file)
@@ -2,10 +2,10 @@ import SwiftUI
 
 public struct Tile: View {
   
-  let design: TileDesign
-  var pixelSize: CGFloat = 2.0;
-  var foregroundColor: Color = .black
-  var backgroundColor: Color = .white
+  public let design: TileDesign
+  public var pixelSize: CGFloat = 2.0;
+  public var foregroundColor: Color = .black
+  public var backgroundColor: Color = .white
   
   private var pixels: [Int] {
     design.pixels()