merge method
Method for Basic Transformations
-
mode
: mode (Default: overlay) -
image
: image (Default: ) -
transformation
: transformation (Default: ) -
background
: background (Default: "00000000") -
height
: height (Default: 0) -
width
: width (Default: 0) -
top
: top (Default: 0) -
left
: left (Default: 0) -
gravity
: gravity (Default: center) -
blend
: blend (Default: over) -
tile
: tile (Default: false) -
listofbboxes
: List of bboxes (Default: ) -
listofpolygons
: List of Polygons (Default: )
Returns 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);
}