Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregoiresage/pebble-antialiasing-lib
Antialiasing Library for Pebble Time
https://github.com/gregoiresage/pebble-antialiasing-lib
Last synced: 18 days ago
JSON representation
Antialiasing Library for Pebble Time
- Host: GitHub
- URL: https://github.com/gregoiresage/pebble-antialiasing-lib
- Owner: gregoiresage
- Created: 2015-03-06T21:43:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-15T20:34:07.000Z (over 9 years ago)
- Last Synced: 2024-07-31T22:55:58.742Z (3 months ago)
- Language: C
- Size: 207 KB
- Stars: 27
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pebble-antialiasing-lib
Implementation of the [Xiaolin Wu's line algorithm] [1]# API
```c
void graphics_draw_line_antialiased(GContext* ctx, GPoint p0, GPoint p1, GColor8 stroke_color);
void graphics_draw_circle_antialiased(GContext* ctx, GPoint p, uint16_t radius, GColor8 stroke_color);
void graphics_fill_circle_antialiased(GContext* ctx, GPoint p, uint16_t radius, GColor8 fill_color);
void gpath_draw_filled_antialiased(GContext* ctx, GPath *path, GColor8 fill_color);
void gpath_draw_outline_antialiased(GContext* ctx, GPath *path, GColor8 stroke_color);
```
# ExampleTop lines are antialiased and bottom lines are drawn with the Pebble draw_line method.
![Alt text](/both-big.bmp?raw=true "Example")
# TODOs
- ~~Implement graphics_draw_circle_antialiased~~
- ~~Implement graphics_fill_circle_antialiased~~
- ~~Implement gpath_draw_filled_antialiased~~
- ~~Implement gpath_draw_outline_antialiased~~
- ~~Remove float usage~~ thanks to @dwrose[1]:http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm