C# Класс SoundInTheory.DynamicImage.Filters.ImageReplacementFilter

Provides the abstract base class for a filter which replaces the entire image. Examples of this filter include SoundInTheory.DynamicImage.Filters.ResizeFilter and SoundInTheory.DynamicImage.Filters.RotationFilter.
Наследование: SoundInTheory.DynamicImage.Filters.Filter
Показать файл Открыть проект

Открытые методы

Метод Описание
ApplyFilter ( FastBitmap bitmap ) : void

Applies the filter to the specified bitmap. This method first calls ImageReplacementFilter.GetDestinationDimensions(FastBitmap, out Int32, out Int32) to calculate the size of the destination image. Then it calls ImageReplacementFilter.ApplyFilter(FastBitmap, DrawingContext, int, int) which is where the overridden class implements its filter algorithm.

Защищенные методы

Метод Описание
ApplyFilter ( FastBitmap source, System.Windows.Media.DrawingContext dc, int width, int height ) : void

When overridden in a derived class, applies the filter to the specified source.

CleanUpDrawingVisual ( FastBitmap source, System.Windows.Media.DrawingVisual drawingVisual ) : void

Inherited classes can use this to clean up the supplied DrawingVisual. For example, ShaderEffectFilter disposes the shader effect.

ConfigureDrawingVisual ( FastBitmap source, System.Windows.Media.DrawingVisual drawingVisual ) : void

Inherited classes can use this to configure the supplied DrawingVisual. For example, RotationFilter sets the BitmapScalingMode render option.

GetDestinationDimensions ( FastBitmap source, int &width, int &height ) : bool

When overridden in a derived class, returns the dimensions of the output image.

OnBeginApplyFilter ( FastBitmap bitmap ) : void

This method allows derived classes to perform actions prior to the filter being applied.

OnEndApplyFilter ( ) : void

This method allows derived classes to perform actions after the filter has been applied.

Описание методов

ApplyFilter() публичный закрытый Метод

Applies the filter to the specified bitmap. This method first calls ImageReplacementFilter.GetDestinationDimensions(FastBitmap, out Int32, out Int32) to calculate the size of the destination image. Then it calls ImageReplacementFilter.ApplyFilter(FastBitmap, DrawingContext, int, int) which is where the overridden class implements its filter algorithm.
public final ApplyFilter ( FastBitmap bitmap ) : void
bitmap SoundInTheory.DynamicImage.Util.FastBitmap /// Image to apply the to. ///
Результат void

ApplyFilter() защищенный абстрактный Метод

When overridden in a derived class, applies the filter to the specified source.
protected abstract ApplyFilter ( FastBitmap source, System.Windows.Media.DrawingContext dc, int width, int height ) : void
source SoundInTheory.DynamicImage.Util.FastBitmap The source image.
dc System.Windows.Media.DrawingContext A object, created from .
width int
height int
Результат void

CleanUpDrawingVisual() защищенный Метод

Inherited classes can use this to clean up the supplied DrawingVisual. For example, ShaderEffectFilter disposes the shader effect.
protected CleanUpDrawingVisual ( FastBitmap source, System.Windows.Media.DrawingVisual drawingVisual ) : void
source SoundInTheory.DynamicImage.Util.FastBitmap
drawingVisual System.Windows.Media.DrawingVisual
Результат void

ConfigureDrawingVisual() защищенный Метод

Inherited classes can use this to configure the supplied DrawingVisual. For example, RotationFilter sets the BitmapScalingMode render option.
protected ConfigureDrawingVisual ( FastBitmap source, System.Windows.Media.DrawingVisual drawingVisual ) : void
source SoundInTheory.DynamicImage.Util.FastBitmap
drawingVisual System.Windows.Media.DrawingVisual
Результат void

GetDestinationDimensions() защищенный абстрактный Метод

When overridden in a derived class, returns the dimensions of the output image.
protected abstract GetDestinationDimensions ( FastBitmap source, int &width, int &height ) : bool
source SoundInTheory.DynamicImage.Util.FastBitmap The source image.
width int The desired width of the output image.
height int The desired height of the output image.
Результат bool

OnBeginApplyFilter() защищенный Метод

This method allows derived classes to perform actions prior to the filter being applied.
protected OnBeginApplyFilter ( FastBitmap bitmap ) : void
bitmap SoundInTheory.DynamicImage.Util.FastBitmap
Результат void

OnEndApplyFilter() защищенный Метод

This method allows derived classes to perform actions after the filter has been applied.
protected OnEndApplyFilter ( ) : void
Результат void