merge method
Method for Basic Transformations @param mode Mode? (Default: overlay) @param image String (Default: ) @param transformation String (Default: ) @param background String (Default: "00000000") @param height int (Default: 0) @param width int (Default: 0) @param top int (Default: 0) @param left int (Default: 0) @param gravity Gravity? (Default: center) @param blend Blend? (Default: over) @param tile bool (Default: false) @param List of bboxes String @param List of Polygons String @return TransformationData.
Implementation
TransformationData merge(
Mode? mode,
String? image,
String? transformation,
String? background,
int? height,
int? width,
int? top,
int? left,
Gravity? gravity,
Blend? blend,
bool? tile,
String? listofbboxes,
String? listofpolygons,
) {
// Determine if there are values to add to the dictionary
var values = <String, String>{};
if (mode != null) {
values['m'] = mode.value;
}
if (image != null) {
values['i'] = image.toString();
}
if (transformation != null) {
values['tr'] = transformation.toString();
}
if (background != null && background.isNotEmpty) {
values['bg'] = background;
}
if (height != null) {
values['h'] = height.toString();
}
if (width != null) {
values['w'] = width.toString();
}
if (top != null) {
values['t'] = top.toString();
}
if (left != null) {
values['l'] = left.toString();
}
if (gravity != null) {
values['g'] = gravity.value;
}
if (blend != null) {
values['b'] = blend.value;
}
if (tile != null) {
values['r'] = tile.toString();
}
if (listofbboxes != null) {
values['bboxes'] = listofbboxes.toString();
}
if (listofpolygons != null) {
values['polys'] = listofpolygons.toString();
}
return TransformationData(plugin: 't', name: 'merge', values: values);
}