Table of Contents

Method CreateSaveOptionsForDocument

Namespace
PaintDotNet.FileTypes
Assembly
PaintDotNet.FileTypes.dll

CreateSaveOptionsForDocument(IReadOnlyFileTypeDocument, IFileTypeSaveOptions, IReadOnlyFileTypePropertyBag)

Customizes the proposed save options for the given document. This allows the FileType to inspect the document and adjust the options accordingly. This is typically used with special metadata that was provided at load time by the same FileType.

IFileTypeSaveOptions CreateSaveOptionsForDocument(IReadOnlyFileTypeDocument document, IFileTypeSaveOptions proposedOptions, IReadOnlyFileTypePropertyBag metadataFromLoad)

Parameters

document IReadOnlyFileTypeDocument

The document to inspect.

proposedOptions IFileTypeSaveOptions

The save options that should be customized for the given document.

metadataFromLoad IReadOnlyFileTypePropertyBag

The metadata that was established by the FileType's loader, if available.

Returns

IFileTypeSaveOptions

Either the proposedOptions if no customization is needed, or a new IFileTypeSaveOptions object with the options that should be used instead. These options will then be presented to the user for further configuration.