Skip to content
Aravinda VK edited this page Aug 12, 2026 · 5 revisions

CHITRA

Chitra is a 2D graphics library written in D. It uses Cairo and the Pango C bindings. Chitra(ಚಿತ್ರ) means "Drawing" in the Kannada(Karnataka, INDIA) language.

Hello Rectangle

import chitra;

void main()
{
    auto ctx = Chitra(700);
    with (ctx)
    {
        background(255);          // white background
        fill(0, 0, 255);          // Fill blue color
        rect(100, 100, 500, 200); // Draw Rectangle
        saveAs("rect.png");       // Save as PNG image
    }
}

Sponsors

Kadalu Technologies FOSS United

Thanks to the supporters who sponsored the Chitra project. If you use the Chitra project or are interested in helping it, a contribution would mean A LOT to me. With your help, I can continue my work sustainably. Thank you for your continued support!

Sponsor

Blog Posts

Clone this wiki locally