summaryrefslogtreecommitdiff
path: root/main_simple_scanner.cpp
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-14 16:54:18 +0800
committerKeuin <[email protected]>2022-04-14 16:54:18 +0800
commit9f3e7a43d57221208f39766e3f62fad536028f5e (patch)
tree4d3eee22b92824db850b15fdc1c88cff3cad149a /main_simple_scanner.cpp
parentbbe3917ed18fa164dd31a0f3bfcc9d4362b8f545 (diff)
Add text_policy for bitmap::print, supporting auto newline.
Diffstat (limited to 'main_simple_scanner.cpp')
-rw-r--r--main_simple_scanner.cpp10
1 files changed, 5 insertions, 5 deletions
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<T>::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<T>(image);
if (!std::getenv("NOPRINT")) {
@@ -81,8 +81,8 @@ int main(int argc, char **argv) {
}
const auto image_width = std::stoul(iw);
generate_image<uint16_t>(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