mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
add bleed margin in print menu
This commit is contained in:
@@ -55,9 +55,10 @@ Image export_image(const SetP& set, const CardP& card, const bool write_metadata
|
||||
|
||||
/// rotate
|
||||
img = rotate_image(img, angle_radians);
|
||||
int width = img.GetWidth(), height = img.GetHeight();
|
||||
|
||||
/// add print bleed edge
|
||||
int width = img.GetWidth(), height = img.GetHeight();
|
||||
bleed = max(0, min(width-1, min(height-1, bleed)));
|
||||
if (size.width < bleed + 2 || size.height < bleed + 2) {
|
||||
queue_message(MESSAGE_ERROR, _("Image too small to add bleed edge"));
|
||||
}
|
||||
@@ -200,7 +201,7 @@ Image export_image( const SetP& set, const vector<CardP>& cards,
|
||||
Byte* pixels = global_img.GetData();
|
||||
Byte* alpha = global_img.GetAlpha();
|
||||
// fill with transparent
|
||||
for (UInt i = 0; i < global_width*global_height; ++i) {
|
||||
for (int i = 0; i < global_width*global_height; ++i) {
|
||||
pixels[3 * i + 0] = 0;
|
||||
pixels[3 * i + 1] = 0;
|
||||
pixels[3 * i + 2] = 0;
|
||||
|
||||
@@ -197,6 +197,7 @@ Settings::Settings()
|
||||
, symbol_grid (true)
|
||||
, symbol_grid_snap (false)
|
||||
, print_spacing (0.33)
|
||||
, print_bleed (0.0)
|
||||
, print_cutter_lines (CUTTER_ALL)
|
||||
, dark_mode_type (DARKMODE_SYSTEM)
|
||||
, import_scale_selection (0)
|
||||
@@ -334,6 +335,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(Settings) {
|
||||
REFLECT(symbol_grid_snap);
|
||||
REFLECT(default_game);
|
||||
REFLECT(print_spacing);
|
||||
REFLECT(print_bleed);
|
||||
REFLECT(print_cutter_lines);
|
||||
REFLECT(dark_mode_type);
|
||||
REFLECT(apprentice_location);
|
||||
|
||||
@@ -209,6 +209,7 @@ public:
|
||||
// --------------------------------------------------- : Printing
|
||||
|
||||
double print_spacing;
|
||||
double print_bleed;
|
||||
CutterLinesType print_cutter_lines;
|
||||
|
||||
// --------------------------------------------------- : Dark Mode
|
||||
|
||||
Reference in New Issue
Block a user