Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hintak/skia-python-examples
Skia-python examples
https://github.com/hintak/skia-python-examples
Last synced: 17 days ago
JSON representation
Skia-python examples
- Host: GitHub
- URL: https://github.com/hintak/skia-python-examples
- Owner: HinTak
- Created: 2024-05-31T23:46:35.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T00:14:55.000Z (22 days ago)
- Last Synced: 2024-10-24T12:03:41.400Z (22 days ago)
- Language: Python
- Homepage:
- Size: 12 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CI](https://github.com/HinTak/skia-python-examples/actions/workflows/ci.yml/badge.svg)](https://github.com/HinTak/skia-python-examples/actions/workflows/ci.yml)
[![linux testing](https://github.com/HinTak/skia-python-examples/actions/workflows/linux.yml/badge.svg)](https://github.com/HinTak/skia-python-examples/actions/workflows/linux.yml)
[![windows testing](https://github.com/HinTak/skia-python-examples/actions/workflows/windows.yml/badge.svg)](https://github.com/HinTak/skia-python-examples/actions/workflows/windows.yml)
On Wayland-based platforms (i.e. very new Linux systems), setting `SDL_VIDEODRIVER=x11`
may be needed for the SDL example; the equivalent for the GLUT example is `PYOPENGL_PLATFORM=glx`.The `skparagraph-example` example generates the below as an example of multilingual paragraph layout.
Note on Linux, it is highly sensitive to locale, and you might need to unset `LANG` and `FC_LANG` if you have unusual
(non-English) settings.![test-en](https://github.com/user-attachments/assets/9ff6dff5-a684-46e9-9a30-cd91455845cb)
## SkSL examples
original:
![original](resources/images/example_5.png)
`SkSL_CoordinateSpaces.py`:
![CoordinateSpaces](SkSL_example_outputs/CoordinateSpaces.png)
`SkSL_EvaluatingImageShader.py` (swap red and blue):
![EvaluatingImageShader](SkSL_example_outputs/EvaluatingImageShader.png)
`SkSL_EvaluatingTwoShaders.py` (Image with Gradient):
![EvaluatingTwoShaders](SkSL_example_outputs/EvaluatingTwoShaders.png)
`SkSL_EvaluatingNestedShaders.py` (Image with same Gradient as shader too):
![EvaluatingNestedShaders](SkSL_example_outputs/EvaluatingNestedShaders.png)
`SkSL_MinifiedSkSL.py`: (this is not a separate SkSL example, but how to generate Minified SkSL with Skia's `minifier` tool
for the same result as `SkSL_PremultipliedAlpha.py` below):![MinifiedSkSL](SkSL_example_outputs/MinifiedSkSL.png)
`SkSL_PremultipliedAlpha.py`:
![PremultipliedAlpha](SkSL_example_outputs/PremultipliedAlpha.png)
`SkSL_LinearSRGB.py`:
![LinearSRGB](SkSL_example_outputs/LinearSRGB.png)