https://github.com/hintak/skia-python-examples
Skia-python examples
https://github.com/hintak/skia-python-examples
Last synced: 3 months 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T03:03:46.000Z (7 months ago)
- Last Synced: 2025-04-06T07:57:02.383Z (3 months ago)
- Language: Python
- Homepage:
- Size: 12 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/HinTak/skia-python-examples/actions/workflows/ci.yml)
[](https://github.com/HinTak/skia-python-examples/actions/workflows/linux.yml)
[](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` (not needed on Fedora 40 Wayland).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.
## SkSL examples
original:

`SkSL_CoordinateSpaces.py`:

`SkSL_EvaluatingImageShader.py` (swap red and blue):

`SkSL_EvaluatingTwoShaders.py` (Image with Gradient):

`SkSL_EvaluatingNestedShaders.py` (Image with same Gradient as shader too):

`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):
`SkSL_PremultipliedAlpha.py`:

`SkSL_LinearSRGB.py`:

`SkSL_Uniforms.py`:

`SkSL_RawImageShaders.py`:
