Interface IReadOnlyFileTypeDocument<TPixel>
- Namespace
- PaintDotNet.FileTypes
- Assembly
- PaintDotNet.FileTypes.dll
Represents a read-only document (image) that consists of metadata and layers.
public interface IReadOnlyFileTypeDocument<TPixel> : IReadOnlyFileTypeDocument, IObjectRef, IIsDisposed, IDisposable, IInternalImpl where TPixel : unmanaged, INaturalPixelInfo
Type Parameters
TPixel
- Inherited Members
- Extension Methods
Remarks
The IReadOnlyFileTypeDocument and IFileTypeDocument interfaces support pixel format speciation.
For example, if the pixel format is Bgra32, then you can use the CreateRef
extension method to obtain a strongly-typed IReadOnlyFileTypeDocument<TPixel> or
IFileTypeDocument<TPixel> with TPixel set to ColorBgra32:
IReadOnlyFileTypeDocument document = GetDocument();
if (document.PixelFormat == PixelFormats.Bgra32)
{
IReadOnlyFileTypeDocument<ColorBgra32> docBgra32 = document.CreateRef<IReadOnlyFileTypeDocument<ColorBgra32>>();
....
}
This allows you to work with the pixel data in a type-safe manner.
Properties
- Layers
Gets the top-level layers list of the document.