aboutsummaryrefslogtreecommitdiff
path: root/Sources
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2023-04-26 17:18:09 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2023-04-26 17:18:09 +0200
commitcd8a7cf4a8dd77e11184202f6b67161383942652 (patch)
tree0f781a27810dbb24759f6a947efc49a3663952ec /Sources
parent1418fe49617f5d35b14b19fe0ead15fcc43526c8 (diff)
Make the properties public
Diffstat (limited to 'Sources')
-rw-r--r--Sources/Patterns/Pattern.swift10
-rw-r--r--Sources/Patterns/PatternPicker.swift10
-rw-r--r--Sources/Patterns/Tile.swift8
3 files changed, 14 insertions, 14 deletions
diff --git a/Sources/Patterns/Pattern.swift b/Sources/Patterns/Pattern.swift
index 4fbc528..6c63870 100644
--- a/Sources/Patterns/Pattern.swift
+++ b/Sources/Patterns/Pattern.swift
@@ -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) {
diff --git a/Sources/Patterns/PatternPicker.swift b/Sources/Patterns/PatternPicker.swift
index 1f7d17b..3f550e5 100644
--- a/Sources/Patterns/PatternPicker.swift
+++ b/Sources/Patterns/PatternPicker.swift
@@ -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
diff --git a/Sources/Patterns/Tile.swift b/Sources/Patterns/Tile.swift
index 3893324..816ebc5 100644
--- a/Sources/Patterns/Tile.swift
+++ b/Sources/Patterns/Tile.swift
@@ -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()