From d4beb46f28e4011fdba48248ae31fb31b1e9e849 Mon Sep 17 00:00:00 2001 From: Manuel Dewald Date: Thu, 4 Mar 2021 14:40:11 +0100 Subject: [PATCH] Add text overlays --- README.md | 15 ++++- src/main.cpp | 11 +++- src/mainwindow.cpp | 28 +++++++++ src/mainwindow.h | 6 ++ src/overlay.cpp | 144 +++++++++++++++++++++++++++++++++++++++++++++ src/overlay.h | 60 +++++++++++++++++++ src/slide.pro | 2 + 7 files changed, 262 insertions(+), 4 deletions(-) create mode 100644 src/overlay.cpp create mode 100644 src/overlay.h diff --git a/README.md b/README.md index cb6d081..af2ea9a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This project is maintained by myself during my spare time. If you like and use i ## Usage ``` -slide [-t rotation_seconds] [-o background_opacity(0..255)] [-b blur_radius] -p image_folder -r +slide [-t rotation_seconds] [-o background_opacity(0..255)] [-b blur_radius] -p image_folder [-r] [-O overlay_string] ``` * `image_folder`: where to search for images (.jpg files) @@ -26,7 +26,18 @@ slide [-t rotation_seconds] [-o background_opacity(0..255)] [-b blur_radius] -p * `rotation_seconds(default=30)`: time until next random image is chosen from the given folder * `background_opacity(default=150)`: opacity of the background filling image between 0 (black background) and 255 * `blur_radius(default=20)`: blur radius of the background filling image - +* `-O` is used to create a overlay string. + * It defines overlays for all four edges in the order `top-left;top-right;bottom-left;bottom-right` + * All edges overlays are separated by `;` + * Each edge can either be just a test or contain formatting in the form `margin|fontsize|text` + * the text can contain special strings which are replaced during rendering: + * `