/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from xplatforms/schemas/document_scanner/ModifyPageOptions.yaml import { ImageRotation } from '../core/image/ImageTypes'; import { ParametricFilter } from '../core/image_processing/ParametricFilters'; import type { Point } from '../core/utils/utils'; import { DeepPartial } from '../core/utils/utils'; /** Options for modifying a page within a document. */ export class ModifyPageOptions { /** The type of rotation to apply. Default is NONE */ public rotation: ImageRotation = 'NONE'; /** The polygon to which the page will be cropped. If not specified, no cropping is applied. */ public polygon: Point[] | null = null; /** The list of filters applied to the page. If not specified, no filters are applied. */ public filters: ParametricFilter[] | null = null; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { if (source.rotation !== undefined) { this.rotation = source.rotation; } if (source.polygon !== undefined) { this.polygon = source.polygon != null ? source.polygon.map((it: DeepPartial) => { return { x: it.x, y: it.y }; }) : null; } if (source.filters !== undefined) { this.filters = source.filters != null ? source.filters.map((it: DeepPartial) => { return ParametricFilter.from(it); }) : null; } } }