https://github.com/rogchap/skiago
https://github.com/rogchap/skiago
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rogchap/skiago
- Owner: rogchap
- Created: 2024-03-06T10:05:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-04T07:02:05.000Z (about 1 year ago)
- Last Synced: 2025-02-16T05:38:27.827Z (4 months ago)
- Language: C++
- Size: 6.16 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Skia Go
Skia Go provides a binding to the 2D graphics library [Skia](https://skia.org/).
Skia Go's main purpose is to support [PDF Go](https://rogchap.com/pdf); a feature rich PDF generation library backed by the [Skia PDF backend](https://skia.org/docs/user/sample/pdf/).
As such, only a small subset of bindings are required for the PDF Go project. Feature bindings will be added on a needs basis; either by the PDF Go project or by the community wishing to make use of these binding.## Features
* "go get-able" module; no need to build skia yourself
* Idiomatic Go API, for example: output to an `io.Writer`
* Latest Skia release (chrome/m124)## Usage
This project is currently WIP, and currently has no releases; this will change in the near future.
## Example
```go
var buf bytes.Buffer
doc := skia.NewDocument(buf)
canvas := doc.BeginPage(400, 600, nil)
// Draw using the canvas
doc.EndPage()
doc.Close()
os.WriteFile("output.pdf", buf.Bytes(), 0o666)
```