AngularGradient issue

Hello! I'm trying to replicate a 4 point gradient you see on the left, but I'm getting this weird line that doesn't let black and red connect and it looks like that colors do not start from corners, but are a bit off. Any help is appreciated
AngularGradient(
gradient: Gradient(colors: [.black, .black, .white, .red]),
center: .center, startAngle: .degrees(0), endAngle: .degrees(360) )
.frame(width: 200, height: 200)
AngularGradient(
gradient: Gradient(colors: [.black, .black, .white, .red]),
center: .center, startAngle: .degrees(0), endAngle: .degrees(360) )
.frame(width: 200, height: 200)
No description
No description
1 Reply
Mr. Sam
Mr. Sam15mo ago
i fixed it by making 2 lineargradients in zstack
ZStack {
LinearGradient(colors: [.white, .red], startPoint: .leading, endPoint: .trailing)
LinearGradient(colors: [.black, .clear], startPoint: .bottom, endPoint: .top)
}
.frame(width: 200, height: 150)
ZStack {
LinearGradient(colors: [.white, .red], startPoint: .leading, endPoint: .trailing)
LinearGradient(colors: [.black, .clear], startPoint: .bottom, endPoint: .top)
}
.frame(width: 200, height: 150)
Want results from more Discord servers?
Add your server