Skip to content

Commit 4e98cb2

Browse files
committed
feat: better image position
1 parent 4ccb408 commit 4e98cb2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

examples/first-example/first-example/ContentView.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ struct ContentView: View {
1212
var body: some View {
1313
SwiftUISkia.Surface(width: 360, height: 360) {
1414
SwiftUISkia.Rect(x: 10, y: 220, width: 30, height: 30, style: "fill", color: "cyan") {}
15-
SwiftUISkia.Image(image: "https://developer.apple.com/assets/elements/icons/swiftui/swiftui-96x96_2x.png", x: 70, y: 70, width: 48, height: 48, blur: 5, brighten: 80) {}
16-
SwiftUISkia.Image(image: "https://developer.apple.com/assets/elements/icons/swiftui/swiftui-96x96_2x.png", x: 0, y: 0, width: 48, height: 48) {}
17-
SwiftUISkia.Line(p1: [100, 260], p2: [50, 285], strokeWidth: 8, color: "black") {}
15+
SwiftUISkia.Image(image: "https://raw.githubusercontent.com/rustq/swiftui-skia/main/examples/first-example/first-example/Assets.xcassets/swiftui-96x96_2x.imageset/swiftui-96x96_2x.png", x: 0, y: 0, width: 64, height: 64, blur: 5, brighten: 98) {}
1816
SwiftUISkia.RoundRect(x: 220, y: 50, r: 10, width: 80, height: 80, style: "stroke", color: "fuchsia") {}
1917
SwiftUISkia.Points(points: [
2018
[138, 10],
@@ -28,11 +26,10 @@ struct ContentView: View {
2826
[10, 103],
2927
[98, 90],
3028
[138, 10],
31-
], strokeWidth: 1, style: "fill", color: "rgba(200, 255, 0, 0.7)") {}
29+
], strokeWidth: 1, style: "fill", color: "rgba(200, 255, 0, 0.7)") {}
3230
SwiftUISkia.Circle(cx: 200, cy: 220, r: 70, style: "stroke", color: "violet") {}
3331
SwiftUISkia.Circle(cx: 200, cy: 220, r: 50, style: "fill", color: "violet") {}
3432
SwiftUISkia.Text(text: "Hello SwiftUI Skia!",x: 80, y: 0, fontSize: 16, color: "black", maxWidth: 60) {}
35-
SwiftUISkia.Text(text: "Hello SwiftUI Skia!",x: 80, y: 60, fontSize: 16, color: "black") {}
3633
}
3734
}
3835
}

0 commit comments

Comments
 (0)