项目作者: onureozcan

项目描述 :
a simple 2d graphics library written from scratch
高级语言: C
项目地址: git://github.com/onureozcan/imLib.git
创建时间: 2020-05-28T00:27:41Z
项目社区:https://github.com/onureozcan/imLib

开源协议:

下载


imLib

Poor man’s graphics library.

It is not intended to be a production-grade project. I will use it in my hobby os to provide it a GUI and will try to make it portable as much as I can.

Currently supports brushes with different sizes and basic line drawing with antialiasing and alpha blending.

Also can parse glyph data from TTF files and draw them using bezier curves. No other features, however, supported yet.

Examples:

  1. image2d *image = image2d_new(800, 800);
  2. // draw a circular point of size 20 and hardness 1
  3. // hardness is defined within (0 to 1)
  4. image2d_draw_point(image, im_point(150, 50), im_color(255, 255, 255, 255), im_brush(20, 1, IM_BRUSH_SHAPE_CIRCULAR));
  5. // draw a line
  6. mage2d_draw_line(image, im_point(20, 200), im_point(500, 500), im_color(255, 255, 255, 255), im_brush(3, 1, IM_BRUSH_SHAPE_CIRCULAR));

image