Table of Contents

Class SkiaBackdrop

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

Warning with CPU-rendering edges will not be blurred: https://issues.skia.org/issues/40036320

public class SkiaBackdrop : ContentLayout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IDisposable, IVisibilityAware, IWithContent, ISkiaGestureListener
Inheritance
SkiaBackdrop
Implements
Inherited Members
Extension Methods

Fields

BlurProperty

public static readonly BindableProperty BlurProperty

Field Value

BindableProperty

BrightnessProperty

public static readonly BindableProperty BrightnessProperty

Field Value

BindableProperty

CacheSourceProperty

public static readonly BindableProperty CacheSourceProperty

Field Value

BindableProperty

ImagePaint

Reusing this

protected SKPaint ImagePaint

Field Value

SKPaint

PaintColorFilter

Reusing this

protected SKColorFilter PaintColorFilter

Field Value

SKColorFilter

PaintImageFilter

Reusing this

protected SKImageFilter PaintImageFilter

Field Value

SKImageFilter

UseContextProperty

public static readonly BindableProperty UseContextProperty

Field Value

BindableProperty

Properties

Blur

public double Blur { get; set; }

Property Value

double

Brightness

public double Brightness { get; set; }

Property Value

double

CacheSource

public SkiaControl CacheSource { get; set; }

Property Value

SkiaControl

CanUseCacheDoubleBuffering

Indended to prohibit background rendering, useful for streaming controls like camera, gif etc. SkiaBackdrop has it set to True as well.

public override bool CanUseCacheDoubleBuffering { get; }

Property Value

bool

HasEffects

public bool HasEffects { get; }

Property Value

bool

NeedInvalidateColorFilter

protected bool NeedInvalidateColorFilter { get; set; }

Property Value

bool

NeedInvalidateImageFilter

protected bool NeedInvalidateImageFilter { get; set; }

Property Value

bool

Snapshot

protected SKImage Snapshot { get; set; }

Property Value

SKImage

UseContext

Use either context of global Superview background, default is True.

public bool UseContext { get; set; }

Property Value

bool

Methods

AttachSource()

Designed to be just one-time set

protected void AttachSource()

BuildPaint()

protected virtual void BuildPaint()

GetImage()

Returns the snapshot that was used for drawing the backdrop. If we have no effects or the control has not yet been drawn the return value will be null. You are responsible to dispose the returned image!

public virtual SKImage GetImage()

Returns

SKImage

InvalidateColorFilter()

public virtual void InvalidateColorFilter()

InvalidateImageFilter()

public virtual void InvalidateImageFilter()

OnDisposing()

Base performs some cleanup actions with Superview

public override void OnDisposing()

OnMeasuring(float, float, float)

If you call this while measurement is in process (IsMeasuring==True) will return last measured value.

public override ScaledSize OnMeasuring(float widthConstraint, float heightConstraint, float scale)

Parameters

widthConstraint float
heightConstraint float
scale float

Returns

ScaledSize

OnScaleChanged()

public override void OnScaleChanged()

Paint(DrawingContext)

This is the main drawing routine you should override to draw something. Base one paints background color inside DrawingRect that was defined by Arrange inside base.Draw. Pass arguments if you want to use some time-frozen data for painting at any time from any thread..

protected override void Paint(DrawingContext ctx)

Parameters

ctx DrawingContext

ProcessGestures(SkiaGesturesParameters, GestureEventProcessingInfo)

public override ISkiaGestureListener ProcessGestures(SkiaGesturesParameters args, GestureEventProcessingInfo apply)

Parameters

args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

ISkiaGestureListener