Skip to content

CImg Notes

rsouth edited this page Aug 24, 2020 · 1 revision

Font Sizes

Example of CImg rendering a bunch of font sizes.

CImg<unsigned char> img(1000, 1000, 1, 3);
img.fill(255);
for (int i = 1; i < 30; i++) {
    img.draw_text(10, (25*i), std::string(std::to_string(i) + " Test Message! (TESTing) [ ]").c_str(), RenderingUtils::BLACK, RenderingUtils::WHITE, 1, i);
}
img.display();

Clone this wiki locally