Table of Contents

Class Layer

Namespace
PaintDotNet
Assembly
PaintDotNet.Data.dll
public abstract class Layer : IIsDisposed, IDisposable, ICloneable
Inheritance
Layer
Implements
Derived
Inherited Members

Constructors

Layer(Layer)

Properties

BlendMode
Bounds
Height
IsBackground

The background layer is generally opaque although it doesn't have to be. For example, the Canvas Size action distinguishes between background and non-background layers such that it fills the background layer with opaque and the non-background layers with transparency. The value of this property should not be used to disallow the user from performing an action.

IsDisposed
Metadata
Name

A user-definable name.

Opacity
Size
Visible

Determines whether the layer is part of a document's composition. If this property is false, the composition engine will ignore this layer.

Width

Methods

Clone()
CreateBackgroundLayer(SizeInt32)
CreateBackgroundLayer(SizeInt32, string)
CreateBackgroundLayer(Surface)
CreateBackgroundLayer(Surface, bool)
CreateBackgroundLayer(Surface, bool, string)
CreateBackgroundLayer(int, int)
CreateBackgroundLayer(int, int, string)
CreateRenderer()
CreateThumbnailRenderer(int)

Creates a renderer for a thumbnail of the underlying object.

Dispose()
Dispose(bool)
Invalidate()

Causes the entire layer surface to be invalidated.

Invalidate(RectInt32)
Invalidate(Rectangle)

Causes a portion of the layer surface to be invalidated.

InvalidateRenderer()
LoadProperties(object)
LoadProperties(object, bool)
OnInvalidated(RectInt32)
OnPropertyChanged(string)
OnPropertyChanging(string)
OnRendererInvalidated()
PerformPropertyChanged()

You can call this to raise the PropertyChanged event. Note that is will raise the event with an empty string for the property name description. Thus it is useful only for syncing up UI elements that require notification of events but that otherwise don't really track it.

PopSuppressPropertyChanged()
PushSuppressPropertyChanged()
SaveProperties()

Allows you to save the mutable properties of the layer so you can restore them later (esp. important for undo!). Mutable properties include the layer's name, whether it's visible, and the metadata. This list might expand later.