콘텐츠로 이동

DefaultFilterContext class

이 콘텐츠는 아직 번역되지 않았습니다.

Default IImageFilterContext for graph evaluation. Owns the scratch surface pool and tracks the current source layer (replaceable via WithSource for ComposeFilter sub-evaluations).

public sealed class DefaultFilterContext : IDisposable, IImageFilterContext
name description
DefaultFilterContext(…) Creates a context over sourceLayer that owns a scratch pool at the layer’s DPI; the scale factors map filter input units to source pixels.
Factory { get; }
LogicalToPixelScaleX { get; }
LogicalToPixelScaleY { get; }
Source { get; }
SourceBounds { get; }
AcquireScratch(…)
Dispose() Disposes the scratch pool when this context owns it; a sub-context from WithSource does not.
WithSource(…)

Construction takes the source IRenderSurface directly so the context can wrap it as a BorrowedFilterResult with both IImage access and optional CPU pixel access when the surface implements ICpuPixelSurface.