Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luncher/agg-canvas-adapter
antigrain html5 canvas adaptor
https://github.com/luncher/agg-canvas-adapter
antigrain canvas html5
Last synced: 24 days ago
JSON representation
antigrain html5 canvas adaptor
- Host: GitHub
- URL: https://github.com/luncher/agg-canvas-adapter
- Owner: Luncher
- License: mit
- Created: 2018-04-26T03:11:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T08:06:24.000Z (over 6 years ago)
- Last Synced: 2024-11-13T17:47:16.540Z (3 months ago)
- Topics: antigrain, canvas, html5
- Language: C++
- Size: 1.1 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## agg canvas adapter
### Draw Line
```javascript
context->begin_path();
context->set_line_width(8);
context->set_stroke_color(0.1, 0.1, 0.5, 0.8);
context->move_to(30, 30);
context->set_line_cap("round");
context->line_to(100, 100);
context->stroke();
```### Draw Rectangle
```javascript
context->set_line_width(2);
context->rect(20, 20, 50, 50, 3);
context->stroke();
context->fill_rect(220, 220, 60, 60);
context->stroke_rect(30, 100, 60, 60);
context->clear_rect(230, 230, 40, 40);```
### Transform
```javascript
context->stroke_rect(450,5,25,15);
context->scale(2,2);
context->stroke_rect(450,5,25,15);
```---
## [MIT License](https://opensource.org/licenses/MIT)