cafhaf22/cgfx

0.0.1

Latest
uploaded 10 hours ago
A primitive graphics library for lcd display with esp lcd

Readme

## CGFX

A primitive graphics library for ESP-IDF compatible displays using `esp_lcd_panel_handle_t`.

## Features

- Line drawing (Bresenham's algorithm)
- Rectangle (frame and filled)
- Triangle (frame and filled)
- Circle (frame and filled)

## Dependencies

- ESP-IDF >= 5.0

## Usage

```c
#include "cgfx.h"

// Draw a line
LineDraw(panel, 0xF81F, (point_t){10, 10}, (point_t){100, 80});

// Draw a filled circle
CircleDraw(panel, 0xF81F, true, (circle_t){.center = {80, 64}, .r = 30});
```

## API

| Function | Description |
|---|---|
| `LineDraw` | Draw a line between two points |
| `RectangleDraw` | Draw a rectangle (frame or filled) |
| `TriangleDraw` | Draw a triangle (frame or filled) |
| `CircleDraw` | Draw a circle (frame or filled) |

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "cafhaf22/cgfx^0.0.1"

download archive

Stats

  • Archive size
    Archive size ~ 4.34 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

cafhaf22/cgfx version: 0.0.1
|