mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
25 lines
569 B
Swift
25 lines
569 B
Swift
/*
|
||
See LICENSE folder for this sample’s licensing information.
|
||
|
||
Abstract:
|
||
A view that clips an image to a circle and adds a stroke and shadow.
|
||
*/
|
||
|
||
import SwiftUI
|
||
|
||
struct CircleImage: View {
|
||
var image: Image
|
||
|
||
var body: some View {
|
||
image
|
||
.clipShape(/*@START_MENU_TOKEN@*/Circle()/*@END_MENU_TOKEN@*/)
|
||
.overlay(Circle().stroke(Color.white, lineWidth: 4))
|
||
.shadow(radius: 7)
|
||
}
|
||
}
|
||
|
||
struct CircleImage_Previews: PreviewProvider {
|
||
static var previews: some View {
|
||
CircleImage(image: Image("tbeam"))
|
||
}
|
||
}
|