34#include "ramCanvas.hpp"
38 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
39 const char *str1 =
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO";
40 const char *str2 =
" PQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
41 mjr::ramCanvas3c8b theRamCanvas(1600, 540);
42 theRamCanvas.setIntAxOrientationY(mjr::ramCanvas3c8b::intAxisOrientation::INVERTED);
44 theRamCanvas.drawFillRectangle(0, 0, 2500, 600,
"cyan");
45 theRamCanvas.drawStringBox(
"GREEK_SL_SANSERIF", mjr::hershey::font::ROMAN_SL_SANSERIF, 50, y,
"red",
"green", 1, 20);
46 theRamCanvas.drawString(str1, mjr::hershey::font::GREEK_SL_SANSERIF, 400, y,
"red", 1, 20); y+=50;
47 theRamCanvas.drawString(str2, mjr::hershey::font::GREEK_SL_SANSERIF, 400, y,
"red", 1, 20); y+=50;
48 theRamCanvas.drawStringBox(
"GREEK_DL_SERIF", mjr::hershey::font::ROMAN_SL_SANSERIF, 50, y,
"red",
"green", 1, 20);
49 theRamCanvas.drawString(str1, mjr::hershey::font::GREEK_DL_SERIF, 400, y,
"red", 1, 23); y+=50;
50 theRamCanvas.drawString(str2, mjr::hershey::font::GREEK_DL_SERIF, 400, y,
"red", 1, 23); y+=50;
51 theRamCanvas.drawStringBox(
"ROMAN_SL_SANSERIF", mjr::hershey::font::ROMAN_SL_SANSERIF, 50, y,
"red",
"green", 1, 20);
52 theRamCanvas.drawString(str1, mjr::hershey::font::ROMAN_SL_SANSERIF, 400, y,
"red", 1, 20); y+=50;
53 theRamCanvas.drawString(str2, mjr::hershey::font::ROMAN_SL_SANSERIF, 400, y,
"red", 1, 20); y+=50;
54 theRamCanvas.drawStringBox(
"ROMAN_DL_SERIF", mjr::hershey::font::ROMAN_SL_SANSERIF, 50, y,
"red",
"green", 1, 20);
55 theRamCanvas.drawString(str1, mjr::hershey::font::ROMAN_DL_SERIF, 400, y,
"red", 1, 23); y+=50;
56 theRamCanvas.drawString(str2, mjr::hershey::font::ROMAN_DL_SERIF, 400, y,
"red", 1, 23); y+=50;
57 theRamCanvas.drawStringBox(
"ROMAN_TL_SERIF", mjr::hershey::font::ROMAN_SL_SANSERIF, 50, y,
"red",
"green", 1, 20);
58 theRamCanvas.drawString(str1, mjr::hershey::font::ROMAN_TL_SERIF, 400, y,
"red", 1, 25); y+=50;
59 theRamCanvas.drawString(str2, mjr::hershey::font::ROMAN_TL_SERIF, 400, y,
"red", 1, 25); y+=50;
60 theRamCanvas.writeTIFFfile(
"test_draw_fonts.tiff");
61 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
62 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])