DocumentCleanup

Interface for DocumentCleanup API. See class documentation for more details.

Inheritors

Functions

Link copied to clipboard
abstract fun canRedo(): Boolean

Returns whether a redo operation is currently available. This is true when at least one undo operation has been performed and not yet overwritten by a new cleanup.

Link copied to clipboard
abstract fun canUndo(): Boolean

Returns whether an undo operation is currently available. This is true when at least one cleanup operation has been performed and not yet fully undone.

Link copied to clipboard

Creates a copy of the current configuration value.

Link copied to clipboard
abstract fun redo(): Result<ImageRef>

Re-applies the last undone cleanup operation. If no operations are available to redo, returns the current image unchanged. Performing a new cleanup operation after undo will clear the redo history.

Link copied to clipboard
abstract fun reset(): Result<ImageRef>

Restores the original image, and clears the undo/redo history. After reset, both canUndo and canRedo return false.

Link copied to clipboard

cleans the masked areas up.

Link copied to clipboard
abstract fun setConfiguration(image: ImageRef, configuration: DocumentCleanupConfiguration = DocumentCleanupConfiguration( )): Result<Unit>

Inplace reconfigures the API instance with new settings.

Link copied to clipboard
abstract fun undo(): Result<ImageRef>

Reverts the last cleanup operation. If no operations are available to undo, returns the current image unchanged. The number of available undo operations is limited by maxUndoRedoStackSize. When the operation limit is exceeded, the oldest operations cannot be undone.