1
- <img width =" 1440 " alt = " 截屏2024-06-15 19 26 35-min " src =" https://github.com/rustq/swiftui-skia /assets/11075892/7c25b3c9-2fa9-48e7-8f44-e47819611073 " >
1
+ <img width =" 1440 " src =" https://github.com/user-attachments /assets/a9ec1f8c-cfd0-4c4c-8219-4ba8292ee543 " >
2
2
3
3
# SwiftUI Skia
4
4
@@ -18,7 +18,7 @@ struct ContentView: View {
18
18
var body: some View {
19
19
SwiftUISkia.Surface (width : 360 , height : 360 ) {
20
20
SwiftUISkia.Rect (x : 10 , y : 220 , width : 30 , height : 30 , style : " fill" , color : " cyan" ) {}
21
- SwiftUISkia.Line ( p1 : [ 100 , 260 ], p2 : [ 50 , 285 ], strokeWidth : 8 , color : " black " ) {}
21
+ 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 ) {}
22
22
SwiftUISkia.RoundRect (x : 220 , y : 50 , r : 10 , width : 80 , height : 80 , style : " stroke" , color : " fuchsia" ) {}
23
23
SwiftUISkia.Points (points : [
24
24
[138 , 10 ],
@@ -32,7 +32,7 @@ struct ContentView: View {
32
32
[10 , 103 ],
33
33
[98 , 90 ],
34
34
[138 , 10 ],
35
- ], strokeWidth : 1 , style : " fill" , color : " rgba(200, 255, 0, 0.7)" ) {}
35
+ ], strokeWidth : 1 , style : " fill" , color : " rgba(200, 255, 0, 0.7)" ) {}
36
36
SwiftUISkia.Circle (cx : 200 , cy : 220 , r : 70 , style : " stroke" , color : " violet" ) {}
37
37
SwiftUISkia.Circle (cx : 200 , cy : 220 , r : 50 , style : " fill" , color : " violet" ) {}
38
38
SwiftUISkia.Text (text : " Hello SwiftUI Skia!" ,x : 80 , y : 0 , fontSize : 16 , color : " black" , maxWidth : 60 ) {}
0 commit comments