Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)