Skip to content

robb/ImageInvalidationIssue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ImageInvalidationIssue

When initializing an Image with a size and a a renderer, the resulting image is not consistently re-rendered when the Environment changes its colorScheme.

let bounds = CGRect(x: 0, y: 0, width: 128, height: 128)

Image(size: bounds.size) { context in
  // `.primary` should render white in dark mode and black in light mode.
  context.fill(Path(ellipseIn: bounds), with: .color(.primary))

  context.stroke(Path(ellipseIn: bounds), with: .color(.blue))
}

FB22457224 (Image created with renderer does not update when Environment changes)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages