From 9f3e7a43d57221208f39766e3f62fad536028f5e Mon Sep 17 00:00:00 2001 From: Keuin Date: Thu, 14 Apr 2022 16:54:18 +0800 Subject: Add text_policy for bitmap::print, supporting auto newline. --- main_simple_scanner.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main_simple_scanner.cpp') diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp index 91c036e..67a41d9 100644 --- a/main_simple_scanner.cpp +++ b/main_simple_scanner.cpp @@ -53,7 +53,7 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport if (!caption.empty()) { image.print(caption, pixel::from_normalized(1.0, 0.0, 0.0), - 10, 10, caption_scale, 0.8); + 10, 10, text_policy::newline, caption_scale, 0.8); } const auto image8b = bitmap8b::from(image); if (!std::getenv("NOPRINT")) { @@ -81,8 +81,8 @@ int main(int argc, char **argv) { } const auto image_width = std::stoul(iw); generate_image(image_width, std::stoul(ih), - std::stod(vw), std::stod(fl), - std::stod(sz), std::stod(sr), - std::stoul(sp), cap, - std::max((int) (1.0 * image_width * 0.015 / 8), 1)); + std::stod(vw), std::stod(fl), + std::stod(sz), std::stod(sr), + std::stoul(sp), cap, + std::max((int) (1.0 * image_width * 0.015 / 8), 1)); } \ No newline at end of file -- cgit v1.2.3