https://github.com/alexito4/raster
Rasterize SwiftUI views into bitmap images.
https://github.com/alexito4/raster
swift swiftui
Last synced: 3 months ago
JSON representation
Rasterize SwiftUI views into bitmap images.
- Host: GitHub
- URL: https://github.com/alexito4/raster
- Owner: alexito4
- License: mit
- Created: 2020-12-27T10:47:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T11:03:37.000Z (over 2 years ago)
- Last Synced: 2025-04-23T16:24:02.171Z (3 months ago)
- Topics: swift, swiftui
- Language: Swift
- Homepage:
- Size: 187 KB
- Stars: 25
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Raster

Rasterize a SwiftUI view into an image.

# How to use
```swift
import Rasterlet view = ... any SwiftUI view
let image = view.rasterize(at: size)
```# Installation
```swift
dependencies: [
.package(url: "https://github.com/alexito4/Raster.git", from: "0.0.1")
],
...
.target(
dependencies: [
"Raster"
],
),
```# Author
Alejandro Martinez | http://alejandromp.com | [@alexito4](https://twitter.com/alexito4)