Skip to content

abnore/Picasso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple software rasterization library in C, designed for use with Canopy on macOS.


About

Picasso is a lightweight 2D graphics library written in C.
It provides low-level framebuffer manipulation and basic drawing routines on the CPU — no GPU acceleration or external dependencies.

Originally created to work with the Canopy windowing system, Picasso is focused on simplicity, performance, and clarity.


Project Status

Picasso is actively under development and part of a learning-oriented project.
It is stable enough for small-scale use, but the API is still evolving and subject to change.

Warning

Not production-ready. The API is not stable and may change frequently.

Tip

Great for understanding pixel-level rendering and alpha blending in pure C!

Features

  • Software rendering to a pixel buffer (backbuffer)
  • Basic blitting and image compositing
  • Color filling and canvas clearing
  • Sprite sheet support (WIP)
  • BMP image loading (PNG/PPM support planned)
  • No external libraries — pure C
  • Alpha blending support

Design Goals

  • Be small, focused, and embeddable
  • Stay dependency-free
  • Serve as a CPU-based software rasterizer
  • Work seamlessly with the Canopy framebuffer system
  • Support real-world use cases like tilemaps and sprites

Quick Example

picasso_backbuffer* bf = picasso_create_backbuffer(400, 300);
picasso_clear_backbuffer(bf, CANOPY_BLACK);

color rect[100 * 100];
picasso_fill_backbuffer(&(picasso_backbuffer){ .width = 100, .height = 100, .pixels = (uint32_t*)rect }, CANOPY_GOLD);

picasso_blit_bitmap(bf, rect, 100, 100, 150, 100);
canopy_swap_backbuffer(win, (framebuffer*)bf);
canopy_present_buffer(win);

📌 Planned Features

  • CPU-based drawing
  • Bitmap loading (BMP)
  • Alpha blending
  • PNG and PPM image decoding
  • Sprite sheet support
  • 9-slice rendering
  • Text rendering using bitmap fonts
  • Image rotation and scaling
  • Basic shape drawing (lines, circles, rects)

Note

Picasso is intentionally minimal and built for use with Canopy, but can be used standalone in other C projects.



License & Usage

This project is free to use for educational and experimental purposes.

Note

This is a side project created to explore graphics pipelines and pixel rendering — not a general-purpose image library.

  • No dependencies or external libraries
  • Great for learning graphics from scratch
  • Not intended for use in production
  • A reference for building simple 2D renderers in C

Feel free to explore, fork, and build upon it!

About

Simple Graphical Library in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published