New crop guide: square center, closes #6342 (#6345)

* New crop guide: square center, closes #6342

* Turn `CropParams::guide` into an `enum`

This saves recurring string comparisons.

Co-authored-by: Flössie <floessie.mail@gmail.com>
This commit is contained in:
Ingo Weyrich
2021-08-25 15:25:59 +02:00
committed by GitHub
parent 55ceb5b248
commit 8bd9bddfc7
8 changed files with 171 additions and 100 deletions

View File

@@ -831,15 +831,28 @@ struct SHParams {
* Parameters of the cropping
*/
struct CropParams {
bool enabled;
int x;
int y;
int w;
int h;
bool fixratio;
Glib::ustring ratio;
Glib::ustring orientation;
Glib::ustring guide;
enum class Guide {
NONE,
FRAME,
RULE_OF_THIRDS,
RULE_OF_DIAGONALS,
HARMONIC_MEANS,
GRID,
GOLDEN_TRIANGLE_1,
GOLDEN_TRIANGLE_2,
EPASSPORT,
CENTERED_SQUARE
};
bool enabled;
int x;
int y;
int w;
int h;
bool fixratio;
Glib::ustring ratio;
Glib::ustring orientation;
Guide guide;
CropParams();