Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexito4/raster
Rasterize SwiftUI views into bitmap images.
https://github.com/alexito4/raster
swift swiftui
Last synced: about 2 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T11:03:37.000Z (about 2 years ago)
- Last Synced: 2024-05-01T21:49:34.042Z (8 months ago)
- Topics: swift, swiftui
- Language: Swift
- Homepage:
- Size: 187 KB
- Stars: 24
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Raster
![CI](https://github.com/alexito4/Raster/workflows/CI/badge.svg)
![Mac](https://img.shields.io/badge/platforms-mac-brightgreen.svg?style=flat)Rasterize a SwiftUI view into an image.
![testExample.1](image.png)
# 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)