The tiny C library of 2D computer graphics.

Related tags

Graphics c 2d vg
Overview

libcg

The tiny C library of 2D computer graphics.

Getting Started

The library's .c and .h files can be dropped into a project and compiled along with it. Just type make at the root directory, you will see a example binary file.

cd libcg
make

Screenshots

arc arc_negative clip clip_image curve_rectangle curve_to dash fill_and_stroke fill_style gradient image lines multi_segment_caps rounded_rectangle set_line_cap set_line_join smile texture_tiled

License

This library is free software; you can redistribute it and or modify it under the terms of the MIT license. See MIT License for details.

You might also like...
A library for high-performance, modern 2D graphics with SDL written in C.

SDL_gpu, a library for making hardware-accelerated 2D graphics easy. by Jonathan Dearborn SDL_gpu is licensed under the terms of the MIT License. See

3D engine from scratch (without OpenGL or any other 3D graphics library)
3D engine from scratch (without OpenGL or any other 3D graphics library)

Simple 3d engine based on SFML library. I tried to make this engine powerful and easy to understand.

A small cross-platform graphics library made in C
A small cross-platform graphics library made in C

minigfx Small graphics library made in C Intended to be: Simple to understand Intuitive Fun to use Features Cross platform: Windows and Linux. To see

Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻
Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻

Yet another Chip-8 interpreter, but this time with a beautiful interface 💻

modified Mesa 3D graphics library for Termux

Mesa - The 3D Graphics Library This repo contains the mesa 3d graphics library modified for zink to work on termux Source This repository lives at htt

Android studio native project template using cross platform raylib graphics library.

rayturbo Android studio native project template using cross platform raylib graphics library. https://www.raylib.com/ This project use Android Studio

A graphics library using SDL programmed in C++

2DGraphicsLib A graphics library using SDL programmed in C++ This project will serve multiple purposes: I aim to learn how to program with C++ To crea

Pathway is an Android library that provides new functionalities around the graphics Path API.

Pathway is an Android library that provides new functionalities around the graphics Path API.

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

Matplot++ A C++ Graphics Library for Data Visualization Data visualization can help programmers and scientists identify trends in their data and effic

Comments
  • 绘制时未调用cg_move_to会导致崩溃问题

    绘制时未调用cg_move_to会导致崩溃问题

    执行如下代码,当注释掉cg_move_to(ctx, 0, 0);时程序运行会崩溃 `static void crash_test(const char* filename) { struct cg_surface_t* surface = cg_surface_create(256, 256); struct cg_ctx_t* ctx = cg_create(surface);

    //cg_move_to(ctx, 0, 0);
    cg_line_to(ctx, 256.0, 256.0);
    
    cg_set_line_width(ctx, 10.0);
    cg_stroke(ctx);
    
    cg_surface_write_to_png(surface, filename);
    cg_destroy(ctx);
    cg_surface_destroy(surface);
    

    } `

    opened by zentelfong 1
Owner
xboot.org
xboot.org
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.5k Nov 28, 2022
A terminal-based graphics library for both 2D and 3D graphics.

TermGL A terminal-based graphics library for both 2D and 3D graphics. Written in C, created for terminals supporting ANSI escape codes. Table of Conte

null 211 Oct 31, 2022
My computer graphics playground. Currently has a raytracer implemented with D3D11 compute shader.

Graphics Playground I use this project as my "toy" engine. I'll be implementing various graphics projects in this repository. The code here is not sui

Berk Emre Sarıbaş 4 Aug 26, 2021
CS-GY 6533 A – Interactive Computer Graphics - Fall 2021

CS-GY 6533 A – Interactive Computer Graphics - Fall 2021 Course Instructors Cláudio Silva (instructor) 370 Jay Street, room 1153 [email protected] Offic

null 2 Nov 9, 2021
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics

Yocto/GL: Tiny C++ Libraries for Data-Oriented Physically-based Graphics Yocto/GL is a collection of small C++17 libraries for building physically-bas

Fabio Pellacini 2.4k Nov 23, 2022
kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics

kaun kaun is a replacement for löve's built-in love.graphics module intended for 3D graphics. It is a Lua module you can require from a shared library

Joel Schumacher 4 Apr 5, 2021
This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

DirectX-Graphics-Samples This repo contains the DirectX 12 Graphics samples that demonstrate how to build graphics intensive applications for Windows

Microsoft 4.9k Nov 24, 2022
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

bgfx - Cross-platform rendering library GitHub Discussions Discord Chat What is it? Cross-platform, graphics API agnostic, "Bring Your Own Engine/Fram

Бранимир Караџић 12.4k Nov 27, 2022
A modern cross-platform low-level graphics library and rendering framework

Diligent Engine A Modern Cross-Platform Low-Level 3D Graphics Library Diligent Engine is a lightweight cross-platform graphics API abstraction library

Diligent Graphics 2.6k Nov 28, 2022