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
파일 보기 프로젝트 열기: sitdap/dynamic-image

공개 메소드들

메소드 설명
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