mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
rename script functions
This commit is contained in:
@@ -202,7 +202,8 @@ SCRIPT_FUNCTION(crop) {
|
||||
SCRIPT_PARAM(int, height);
|
||||
SCRIPT_PARAM(double, offset_x);
|
||||
SCRIPT_PARAM(double, offset_y);
|
||||
return make_intrusive<CropImage>(input, width, height, offset_x, offset_y);
|
||||
SCRIPT_OPTIONAL_PARAM_(Color, background_color);
|
||||
return make_intrusive<CropImage>(input, width, height, offset_x, offset_y, background_color);
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(flip_horizontal) {
|
||||
@@ -215,6 +216,13 @@ SCRIPT_FUNCTION(flip_vertical) {
|
||||
return make_intrusive<FlipImageVertical>(input);
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(flip_image) {
|
||||
SCRIPT_PARAM_C(GeneratedImageP, input);
|
||||
SCRIPT_PARAM(bool, horizontal);
|
||||
if (horizontal) return make_intrusive<FlipImageHorizontal>(input);
|
||||
else return make_intrusive<FlipImageVertical>(input);
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(rotate) {
|
||||
SCRIPT_PARAM_C(GeneratedImageP, input);
|
||||
SCRIPT_PARAM(Degrees, angle);
|
||||
@@ -314,18 +322,23 @@ void init_script_image_functions(Context& ctx) {
|
||||
ctx.setVariable(_("set_alpha"), script_set_alpha);
|
||||
ctx.setVariable(_("set_combine"), script_set_combine);
|
||||
ctx.setVariable(_("saturate"), script_saturate);
|
||||
ctx.setVariable(_("saturate_image"), script_saturate);
|
||||
ctx.setVariable(_("invert_image"), script_invert_image);
|
||||
ctx.setVariable(_("recolor_image"), script_recolor_image);
|
||||
ctx.setVariable(_("enlarge"), script_enlarge);
|
||||
ctx.setVariable(_("enlarge_image"), script_enlarge);
|
||||
ctx.setVariable(_("add_stroke_effect"),script_add_stroke_effect);
|
||||
ctx.setVariable(_("add_bleed_edge"), script_add_bleed_edge);
|
||||
ctx.setVariable(_("resize_image"), script_resize_image);
|
||||
ctx.setVariable(_("crop"), script_crop);
|
||||
ctx.setVariable(_("crop_image"), script_crop);
|
||||
ctx.setVariable(_("flip_horizontal"), script_flip_horizontal);
|
||||
ctx.setVariable(_("flip_vertical"), script_flip_vertical);
|
||||
ctx.setVariable(_("flip_image"), script_flip_image);
|
||||
ctx.setVariable(_("rotate"), script_rotate);
|
||||
ctx.setVariable(_("rotate_image"), script_rotate);
|
||||
ctx.setVariable(_("drop_shadow"), script_drop_shadow);
|
||||
ctx.setVariable(_("add_drop_shadow"), script_drop_shadow);
|
||||
ctx.setVariable(_("symbol_variation"), script_symbol_variation);
|
||||
ctx.setVariable(_("built_in_image"), script_built_in_image);
|
||||
ctx.setVariable(_("import_image"), script_import_image);
|
||||
|
||||
Reference in New Issue
Block a user