serialize method
Implementation
@override
Map<String, dynamic> serialize() {
var _result = <String, dynamic>{};
_result.addAll(super.serialize());
if (horizontalResolution != null) {
_result['HorizontalResolution'] = horizontalResolution!;
}
if (imageBrightness != null) {
_result['ImageBrightness'] = imageBrightness!;
}
if (imageColorMode != null) {
switch (imageColorMode!) {
case ImageSaveOptionsData_ImageColorModeEnum.none:
_result['ImageColorMode'] = 'None';
break;
case ImageSaveOptionsData_ImageColorModeEnum.grayscale:
_result['ImageColorMode'] = 'Grayscale';
break;
case ImageSaveOptionsData_ImageColorModeEnum.blackAndWhite:
_result['ImageColorMode'] = 'BlackAndWhite';
break;
default:
break;
}
}
if (imageContrast != null) {
_result['ImageContrast'] = imageContrast!;
}
if (paperColor != null) {
_result['PaperColor'] = paperColor!;
}
if (pixelFormat != null) {
switch (pixelFormat!) {
case ImageSaveOptionsData_PixelFormatEnum.format16BppRgb555:
_result['PixelFormat'] = 'Format16BppRgb555';
break;
case ImageSaveOptionsData_PixelFormatEnum.format16BppRgb565:
_result['PixelFormat'] = 'Format16BppRgb565';
break;
case ImageSaveOptionsData_PixelFormatEnum.format16BppArgb1555:
_result['PixelFormat'] = 'Format16BppArgb1555';
break;
case ImageSaveOptionsData_PixelFormatEnum.format24BppRgb:
_result['PixelFormat'] = 'Format24BppRgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format32BppRgb:
_result['PixelFormat'] = 'Format32BppRgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format32BppArgb:
_result['PixelFormat'] = 'Format32BppArgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format32BppPArgb:
_result['PixelFormat'] = 'Format32BppPArgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format48BppRgb:
_result['PixelFormat'] = 'Format48BppRgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format64BppArgb:
_result['PixelFormat'] = 'Format64BppArgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format64BppPArgb:
_result['PixelFormat'] = 'Format64BppPArgb';
break;
case ImageSaveOptionsData_PixelFormatEnum.format1bppIndexed:
_result['PixelFormat'] = 'Format1bppIndexed';
break;
default:
break;
}
}
if (resolution != null) {
_result['Resolution'] = resolution!;
}
if (scale != null) {
_result['Scale'] = scale!;
}
if (useAntiAliasing != null) {
_result['UseAntiAliasing'] = useAntiAliasing!;
}
if (useHighQualityRendering != null) {
_result['UseHighQualityRendering'] = useHighQualityRendering!;
}
if (verticalResolution != null) {
_result['VerticalResolution'] = verticalResolution!;
}
if (imageHeight != null) {
_result['ImageHeight'] = imageHeight!;
}
if (imageWidth != null) {
_result['ImageWidth'] = imageWidth!;
}
if (useGdiEmfRenderer != null) {
_result['UseGdiEmfRenderer'] = useGdiEmfRenderer!;
}
return _result;
}