Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/atypicalim/replot

a canvas library for c to draw shapes on images ...
https://github.com/atypicalim/replot

c canvas draw game image

Last synced: about 1 month ago
JSON representation

a canvas library for c to draw shapes on images ...

Awesome Lists containing this project

README

        

# Replot

### 0. Description

> a canvas library for c to draw shapes on images, you can save the canvas to and image or draw to a buffer with custom plot func.

### 1. Usage

> drawing some rect and save as an image

```c
// create a canvas
Replot *rplt = Replot_new(600, 600);
// print ascii text
Replot_printText(rplt, RPOINT(300, 100), 10, "WELCOME!");
// fill with stencil
Replot_setImage(rplt, "test.png");
Replot_fillRect(rplt, RPOINT(300, 400), RSIZE(200, 200));
// save as image
Replot_write(rplt, "test.jpg");
```

> for more info please visit `replot.c` file

![](./output.png)

### 2. Alternatives

- [Pntr: Image manipulation library for C, with a focus on ease of use.](https://github.com/RobLoach/pntr)

- [RSoft: software rendering library oriented around math.](https://github.com/ColleagueRiley/rsoft)

- [Silk: Single-Header CPU graphics library](https://github.com/itsYakub/Silk/)

- [Olive: Simple 2D Graphics Library for C](https://github.com/tsoding/olive.c)