Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kivy-garden/garden.smaa
SMAA widget - Subpixel Morphological Antialiasing
https://github.com/kivy-garden/garden.smaa
Last synced: about 1 month ago
JSON representation
SMAA widget - Subpixel Morphological Antialiasing
- Host: GitHub
- URL: https://github.com/kivy-garden/garden.smaa
- Owner: kivy-garden
- License: mit
- Created: 2014-02-17T13:05:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-23T07:37:55.000Z (about 10 years ago)
- Last Synced: 2023-03-30T19:42:52.449Z (over 1 year ago)
- Language: C
- Size: 242 KB
- Stars: 5
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SMAA widget
This widget applies a Subpixel Morphological Antialiasing (SMAA) to all the
children. It's a 3-pass shader and works currently only on Desktop. You need at
minimum OpenGL 4.3 or 4.4 drivers. It also require at least Kivy 1.8.1 from git.It has been tested only on Linux with NVIDIA card (GTX 560, 310.44 drivers)
Read more about SMAA:
- Official Website: http://www.iryoku.com/smaa/
- Source code: https://github.com/iryoku/smaa# Usage
The widget is intended to be used with vector graphics. Don't use it with text
or images in it, cause if you have already anti-aliasing on the font or image,
it will add more AA, which result to bad AA. Ie for a text, it will shrink more
the font's weight.You need to pass the size of the SMAA widget from the start. It doesn't support
any resizing at the moment.![Comparaison](/screenshot.png)
Example:
```python
from kivy.garden.smaa import SMAA
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.widget import Widget
from kivy.graphics import Color, Triangleclass SMAAApp(App):
def build(self):
smaa = SMAA(size=Window.size)wid = Widget()
w, h = Window.size
with wid.canvas:
Color(1, 1, 1)
Triangle(points=(
w / 2 - w * .25, h / 2 - h * .25,
w / 2, h / 2 + h * .25,
w / 2 + w * .25, h / 2 - h * .25))
smaa.add_widget(wid)return smaa
SMAAApp().run()
```