Class DrawnView
public class DrawnView : ContentView, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ILayout, ILayoutController, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IDrawnBase, IDisposable, ICanBeUpdatedWithContext, ICanBeUpdated, IAnimatorsManager, IVisualTreeElement, IDisposeManager, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable
- Inheritance
-
DrawnView
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
DrawnView()
public DrawnView()
Fields
CallbackScreenshot
protected Action<SKImage> CallbackScreenshot
Field Value
CanRenderOffScreenProperty
public static readonly BindableProperty CanRenderOffScreenProperty
Field Value
ClipEffectsProperty
public static readonly BindableProperty ClipEffectsProperty
Field Value
Diagnostics
public DrawnView.DiagnosticData Diagnostics
Field Value
DirtyChildrenTracker
protected ConcurrentDictionary<Guid, SkiaControl> DirtyChildrenTracker
Field Value
FrameTimeInterpolator
protected FrameTimeInterpolator FrameTimeInterpolator
Field Value
InvalidationActionsA
protected readonly Dictionary<Action, SkiaControl> InvalidationActionsA
Field Value
InvalidationActionsB
protected readonly Dictionary<Action, SkiaControl> InvalidationActionsB
Field Value
LastDrawnRect
protected SKRect LastDrawnRect
Field Value
LastFrameTimeNanos
protected long LastFrameTimeNanos
Field Value
LockDraw
protected object LockDraw
Field Value
LockIterateListeners
protected object LockIterateListeners
Field Value
LockStartOffscreenQueue
protected object LockStartOffscreenQueue
Field Value
OrientationProperty
public static readonly BindableProperty OrientationProperty
Field Value
RenderingModeProperty
public static readonly BindableProperty RenderingModeProperty
Field Value
RenderingScaleProperty
public static readonly BindableProperty RenderingScaleProperty
Field Value
RenderingSubscribers
For native controls over Canvas to be notified after every of their position
public Dictionary<SkiaControl, bool> RenderingSubscribers
Field Value
UpdateLocksProperty
public static readonly BindableProperty UpdateLocksProperty
Field Value
UpdateModeProperty
public static readonly BindableProperty UpdateModeProperty
Field Value
Value1Property
public static readonly BindableProperty Value1Property
Field Value
Value2Property
public static readonly BindableProperty Value2Property
Field Value
Value3Property
public static readonly BindableProperty Value3Property
Field Value
Value4Property
public static readonly BindableProperty Value4Property
Field Value
_fps
protected double _fps
Field Value
semaphoreOffscreenProcess
protected SemaphoreSlim semaphoreOffscreenProcess
Field Value
Properties
AnimatingControls
Tracking controls that what to be animated right now so we constantly refresh canvas until there is none left
public ConcurrentDictionary<Guid, ISkiaAnimator> AnimatingControls { get; }
Property Value
AvailableDestination
public SKRect AvailableDestination { get; set; }
Property Value
CanDraw
Indicates that it is allowed to be rendered by engine, internal use. Will check IsHiddenInViewTree.
public bool CanDraw { get; }
Property Value
CanRender
Underlying surface and engine are ready to render
public bool CanRender { get; }
Property Value
CanRenderOffScreen
If this is check you view will be refreshed even off-screen or hidden
public bool CanRenderOffScreen { get; set; }
Property Value
CanvasFps
Actual FPS
public double CanvasFps { get; }
Property Value
CanvasView
public ISkiaDrawable CanvasView { get; protected set; }
Property Value
Children
public IList<SkiaControl> Children { get; set; }
Property Value
ClipEffects
public bool ClipEffects { get; set; }
Property Value
Clipping
public Action<SKPath, SKRect> Clipping { get; set; }
Property Value
Count
Gets the number of elements contained in the ICollection<T>.
public int Count { get; }
Property Value
- int
The number of elements contained in the ICollection<T>.
Delayed
protected Grid Delayed { get; set; }
Property Value
Destination
public SKRect Destination { get; protected set; }
Property Value
DisposeManager
protected DisposableManager DisposeManager { get; }
Property Value
DrawingRect
public SKRect DrawingRect { get; }
Property Value
DrawingThreadId
Can use this to manage double buffering to detect if we are in the drawing thread or in background.
public int DrawingThreadId { get; protected set; }
Property Value
DrawingThreads
For debugging purposes check if dont have concurrent threads
public int DrawingThreads { get; protected set; }
Property Value
ExecuteAfterDraw
public Queue<Action> ExecuteAfterDraw { get; }
Property Value
ExecuteBeforeDraw
public KeyedActionQueue<long> ExecuteBeforeDraw { get; }
Property Value
FPS
Average FPS
public double FPS { get; protected set; }
Property Value
FocusLocked
public bool FocusLocked { get; set; }
Property Value
FocusedChild
Is set upon the consumer of the DOWN gesture. Calls ReportFocus methos when set.
public ISkiaGestureListener FocusedChild { get; set; }
Property Value
FrameNumber
public long FrameNumber { get; }
Property Value
FrameTime
Frame started rendering nanoseconds
public long FrameTime { get; protected set; }
Property Value
GestureListeners
Children we should check for touch hits
public SortedGestureListeners GestureListeners { get; }
Property Value
HasHandler
public bool HasHandler { get; set; }
Property Value
InvalidatedCanvas
A very important tracking prop to avoid saturating main thread with too many updates
protected long InvalidatedCanvas { get; set; }
Property Value
IsDirty
public bool IsDirty { get; set; }
Property Value
IsDisposed
public bool IsDisposed { get; protected set; }
Property Value
IsDisposing
public bool IsDisposing { get; set; }
Property Value
IsGhost
public bool IsGhost { get; set; }
Property Value
IsHiddenInViewTree
Indicates that view is either hidden or offscreen. This disables rendering. If you don't set CanRenderOffScreen to true
public bool IsHiddenInViewTree { get; set; }
Property Value
IsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
public bool IsReadOnly { get; }
Property Value
- bool
true if the ICollection<T> is read-only; otherwise, false.
IsRendering
public bool IsRendering { get; protected set; }
Property Value
IsUsingHardwareAcceleration
public bool IsUsingHardwareAcceleration { get; }
Property Value
this[int]
Gets or sets the element at the specified index.
public IView this[int index] { get; set; }
Parameters
indexintThe zero-based index of the element to get or set.
Property Value
- IView
The element at the specified index.
Exceptions
- ArgumentOutOfRangeException
indexis not a valid index in the IList<T>.- NotSupportedException
The property is set and the IList<T> is read-only.
MeasuredSize
public ScaledSize MeasuredSize { get; set; }
Property Value
NeedAutoHeight
public bool NeedAutoHeight { get; }
Property Value
NeedAutoSize
public bool NeedAutoSize { get; }
Property Value
NeedAutoWidth
public bool NeedAutoWidth { get; }
Property Value
NeedCheckParentVisibility
public bool NeedCheckParentVisibility { get; set; }
Property Value
NeedGlobalRefreshCount
public long NeedGlobalRefreshCount { get; set; }
Property Value
NeedMeasure
The virtual view needs native measurement
protected virtual bool NeedMeasure { get; set; }
Property Value
NeedMeasureDrawn
Underlying drawn views need measurement
protected bool NeedMeasureDrawn { get; set; }
Property Value
NeedRedraw
public bool NeedRedraw { get; set; }
Property Value
Orientation
public DeviceOrientation Orientation { get; set; }
Property Value
PaintSystem
protected SKPaint PaintSystem { get; set; }
Property Value
PostAnimators
Executed after the rendering
public List<IOverlayEffect> PostAnimators { get; }
Property Value
RenderingMode
Whether is using hardware acceleration or software rendering
public RenderingModeType RenderingMode { get; set; }
Property Value
RenderingScale
public float RenderingScale { get; set; }
Property Value
ShouldInvalidateByChildren
public virtual bool ShouldInvalidateByChildren { get; }
Property Value
StopDrawingWhenUpdateIsLocked
Set this to true if you do not want the canvas to be redrawn as transparent and showing content below the canvas (splash?..) when UpdateLocks is True
public bool StopDrawingWhenUpdateIsLocked { get; set; }
Property Value
SurfaceCacheManager
protected SurfaceCacheManager SurfaceCacheManager { get; set; }
Property Value
Tag
public string Tag { get; set; }
Property Value
TimeDrawingComplete
public DateTime TimeDrawingComplete { get; protected set; }
Property Value
TimeDrawingStarted
public DateTime TimeDrawingStarted { get; protected set; }
Property Value
Uid
public Guid Uid { get; }
Property Value
UpdateLocks
public int UpdateLocks { get; set; }
Property Value
UpdateMode
public UpdateMode UpdateMode { get; set; }
Property Value
Value1
public double Value1 { get; set; }
Property Value
Value2
public double Value2 { get; set; }
Property Value
Value3
public double Value3 { get; set; }
Property Value
Value4
public double Value4 { get; set; }
Property Value
Views
For code-behind access of children, XAML is using Children property
public List<SkiaControl> Views { get; }
Property Value
WasRendered
public bool WasRendered { get; set; }
Property Value
mLastFrameTime
public long mLastFrameTime { get; set; }
Property Value
Methods
Add(IView)
Adds an item to the ICollection<T>.
public void Add(IView item)
Parameters
itemIViewThe object to add to the ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
AddAnimator(ISkiaAnimator)
public void AddAnimator(ISkiaAnimator animator)
Parameters
animatorISkiaAnimator
AddOrRemoveView(SkiaControl, bool)
protected void AddOrRemoveView(SkiaControl subView, bool add)
Parameters
subViewSkiaControladdbool
AddSubView(SkiaControl)
Directly adds a view to the control, without any layouting. Use this instead of Views.Add() to avoid memory leaks etc
public void AddSubView(SkiaControl control)
Parameters
controlSkiaControl
Arrange(SKRect, double, double, double)
destination in PIXELS, requests in UNITS. resulting Destination prop will be filed in PIXELS.
public virtual void Arrange(SKRect destination, double widthRequest, double heightRequest, double scale = 1)
Parameters
CalculateLayout(SKRect, double, double, double)
destination in PIXELS, requests in UNITS. resulting Destination prop will be filed in PIXELS.
public SKRect CalculateLayout(SKRect destination, double widthRequest, double heightRequest, double scale = 1)
Parameters
Returns
CheckElementVisibility(VisualElement)
public void CheckElementVisibility(VisualElement element)
Parameters
elementVisualElement
Clear()
Removes all items from the ICollection<T>.
public virtual void Clear()
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
ClearChildren()
public virtual void ClearChildren()
ClipSmart(SKCanvas, SKPath, SKClipOperation)
Clip using internal custom settings of the control
public virtual void ClipSmart(SKCanvas canvas, SKPath path, SKClipOperation operation = SKClipOperation.Intersect)
Parameters
canvasSKCanvaspathSKPathoperationSKClipOperation
CommitInvalidations()
protected void CommitInvalidations()
ConnectedHandler()
public virtual void ConnectedHandler()
Contains(IView)
Determines whether the ICollection<T> contains a specific value.
public bool Contains(IView item)
Parameters
itemIViewThe object to locate in the ICollection<T>.
Returns
- bool
true if
itemis found in the ICollection<T>; otherwise, false.
CopyTo(IView[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
public void CopyTo(IView[] array, int arrayIndex)
Parameters
arrayIView[]The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in
arrayat which copying begins.
Exceptions
- ArgumentNullException
arrayis null.- ArgumentOutOfRangeException
arrayIndexis less than 0.- ArgumentException
The number of elements in the source ICollection<T> is greater than the available space from
arrayIndexto the end of the destinationarray.
CreateClip(object, bool, SKPath)
Creates a new disposable SKPath for clipping content according to the control shape and size. Create this control clip for painting content. Pass arguments if you want to use some time-frozen data for painting at any time from any thread.. If applyPosition is false will create clip without using drawing posiition, like if was drawing at 0,0.
public virtual SKPath CreateClip(object arguments, bool usePosition, SKPath path = null)
Parameters
Returns
CreateContext(SKSurface)
protected virtual SkiaDrawingContext CreateContext(SKSurface surface)
Parameters
surfaceSKSurface
Returns
CreateSkiaView()
Will safely destroy existing if any
protected void CreateSkiaView()
CreateSurface(int, int, bool)
public SKSurface CreateSurface(int width, int height, bool isGpu)
Parameters
Returns
DestroySkiaView()
protected void DestroySkiaView()
DisconnectedHandler()
public virtual void DisconnectedHandler()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
DisposeObject(IDisposable, string)
public void DisposeObject(IDisposable resource, string caller = null)
Parameters
resourceIDisposablecallerstring
Draw(DrawingContext)
protected virtual void Draw(DrawingContext context)
Parameters
contextDrawingContext
DumpLayersTree(VisualLayer, string, bool, int)
public void DumpLayersTree(VisualLayer node, string prefix = "", bool isLast = true, int level = 0)
Parameters
nodeVisualLayerprefixstringisLastboollevelint
ExecuteAnimators(long)
protected int ExecuteAnimators(long frameTime)
Parameters
frameTimelong
Returns
ExecutePostAnimators(DrawingContext)
public int ExecutePostAnimators(DrawingContext context)
Parameters
contextDrawingContext
Returns
~DrawnView()
protected ~DrawnView()
FixDensity()
protected void FixDensity()
GetBackInvalidations()
protected Dictionary<Action, SkiaControl> GetBackInvalidations()
Returns
GetDensity()
public static double GetDensity()
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<IView> GetEnumerator()
Returns
- IEnumerator<IView>
An enumerator that can be used to iterate through the collection.
GetFrontInvalidations()
protected Dictionary<Action, SkiaControl> GetFrontInvalidations()
Returns
GetGRContext()
public GRContext GetGRContext()
Returns
GetIsVisibleWithParent(VisualElement)
public bool GetIsVisibleWithParent(VisualElement element)
Parameters
elementVisualElement
Returns
GetOnScreenVisibleArea(DrawingContext, Vector2)
For virtualization. For this method to be conditional we introduced the pixelsDestination
parameter so that the Parent could return different visible areas upon context.
Normally pass your current destination you are drawing into as this parameter.
public virtual ScaledRect GetOnScreenVisibleArea(DrawingContext context, Vector2 inflateByPixels = default)
Parameters
contextDrawingContextinflateByPixelsVector2
Returns
GetOrderedSubviews()
For non templated simple subviews
public IReadOnlyList<SkiaControl> GetOrderedSubviews()
Returns
IndexOf(IView)
Determines the index of a specific item in the IList<T>.
public int IndexOf(IView item)
Parameters
Returns
- int
The index of
itemif found in the list; otherwise, -1.
InitFramework(bool)
protected virtual void InitFramework(bool subscribe)
Parameters
subscribebool
Insert(int, IView)
Inserts an item to the IList<T> at the specified index.
public void Insert(int index, IView item)
Parameters
indexintThe zero-based index at which
itemshould be inserted.itemIViewThe object to insert into the IList<T>.
Exceptions
- ArgumentOutOfRangeException
indexis not a valid index in the IList<T>.- NotSupportedException
The IList<T> is read-only.
Invalidate()
Makes the control dirty, in need to be remeasured and rendered but this doesn't call Update, it's up yo you
public virtual void Invalidate()
InvalidateByChild(SkiaControl)
This is needed by layout to track which child changed to sometimes avoid recalculating other children
public virtual void InvalidateByChild(SkiaControl child)
Parameters
childSkiaControl
InvalidateCanvas()
[Obsolete("Used by Update() when Super.UseLegacyLoop is True")]
protected void InvalidateCanvas()
InvalidateChildren()
We need to invalidate children maui changed our storyboard size
public void InvalidateChildren()
InvalidateParents()
If need the re-measure all parents because child-auto-size has changed
public void InvalidateParents()
InvalidateViewport()
public virtual void InvalidateViewport()
InvalidateViewsList()
To make GetOrderedSubviews() regenerate next result instead of using cached
public void InvalidateViewsList()
IsRootView(float, float, SKRect)
public bool IsRootView(float width, float height, SKRect destination)
Parameters
Returns
IsVisibleInViewTree()
public virtual bool IsVisibleInViewTree()
Returns
KickOffscreenCacheRendering()
Ensures offscreen rendering queue is running
public void KickOffscreenCacheRendering()
LinearGradientAngleToPoints(double)
public static (double X1, double Y1, double X2, double Y2) LinearGradientAngleToPoints(double direction)
Parameters
directiondouble
Returns
Measure(float, float)
public virtual ScaledSize Measure(float widthConstraintPts, float heightConstraintPts)
Parameters
Returns
NeedInvalidateCanvas(BindableObject, object, object)
protected static void NeedInvalidateCanvas(BindableObject bindable, object oldvalue, object newvalue)
Parameters
bindableBindableObjectoldvalueobjectnewvalueobject
OnBindingContextChanged()
Invoked whenever the binding context of the View changes.
protected override void OnBindingContextChanged()
Remarks
This method can be overridden to add class handling for this event. Overrides must call the base method.
OnCanRenderChanged(bool)
Invoked when IsHiddenInViewTree changes
public virtual void OnCanRenderChanged(bool state)
Parameters
statebool
OnCanvasViewChanged()
public virtual void OnCanvasViewChanged()
OnChangingtIsHiddenInViewTree(bool)
WIll set value, indicates that view is either hidden or offscreen. This disables rendering if CanRenderOffScreen is false. You can override this for a specific view to not stop rendering even if it is hidden in view tree, for example for debugging purposes or if you want to render something only on screen shot or something like that.
protected virtual bool OnChangingtIsHiddenInViewTree(bool value)
Parameters
valuebool
Returns
OnChildAdded(SkiaControl)
protected virtual void OnChildAdded(SkiaControl child)
Parameters
childSkiaControl
OnChildRemoved(SkiaControl)
protected virtual void OnChildRemoved(SkiaControl child)
Parameters
childSkiaControl
OnDensityChanged()
public virtual void OnDensityChanged()
OnDestroyingVew()
protected virtual void OnDestroyingVew()
OnDispose()
public virtual void OnDispose()
OnDisposing()
public virtual void OnDisposing()
OnFinalizeRendering()
protected virtual void OnFinalizeRendering()
OnHandlerChanged()
When overridden in a derived class, should raise the HandlerChanged event.
protected override void OnHandlerChanged()
Remarks
It is the implementor's responsibility to raise the HandlerChanged event.
OnHandlerChanging(HandlerChangingEventArgs)
When overridden in a derived class, should raise the HandlerChanging event.
protected override void OnHandlerChanging(HandlerChangingEventArgs args)
Parameters
argsHandlerChangingEventArgsProvides data for the HandlerChanging event.
Remarks
It is the implementor's responsibility to raise the HandlerChanging event.
OnHotReload()
public virtual void OnHotReload()
OnMeasured()
protected virtual void OnMeasured()
OnParentSet()
Raises the (internal) ParentSet event.
protected override void OnParentSet()
Remarks
Will set the NavigationProxy's inner navigation object to closest topmost element capable of handling navigation calls.
- See Also
OnPropertyChanged(string)
Method that is called when a bound property is changed.
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyNamestringThe name of the bound property that changed.
OnSizeChanged()
protected virtual void OnSizeChanged()
OnStartRendering(SKCanvas)
protected virtual bool OnStartRendering(SKCanvas canvas)
Parameters
canvasSKCanvas
Returns
OnSuperviewShouldRenderChanged(bool)
public virtual void OnSuperviewShouldRenderChanged(bool state)
Parameters
statebool
PaintTintBackground(SKCanvas)
public virtual void PaintTintBackground(SKCanvas canvas)
Parameters
canvasSKCanvas
PostponeExecutionAfterDraw(Action)
Postpone the action to be executed after the current frame is drawn. Exception-safe.
public void PostponeExecutionAfterDraw(Action action)
Parameters
actionAction
PostponeExecutionBeforeDraw(Action, long)
Postpone the action to be executed before the next frame being drawn. Exception-safe.
public void PostponeExecutionBeforeDraw(Action action, long key)
Parameters
PostponeInvalidation(SkiaControl, Action)
public void PostponeInvalidation(SkiaControl key, Action action)
Parameters
keySkiaControlactionAction
PrintDebug(string)
public void PrintDebug(string indent = "")
Parameters
indentstring
ProcessOffscreenCacheRenderingAsync()
public Task ProcessOffscreenCacheRenderingAsync()
Returns
PushToOffscreenRendering(SkiaControl, CancellationToken)
Push an offscreen rendering command without blocking the UI thread.
public void PushToOffscreenRendering(SkiaControl control, CancellationToken cancel = default)
Parameters
controlSkiaControlcancelCancellationToken
RedrawCanvas(BindableObject, object, object)
protected static void RedrawCanvas(BindableObject bindable, object oldvalue, object newvalue)
Parameters
bindableBindableObjectoldvalueobjectnewvalueobject
RegisterAnimator(ISkiaAnimator)
Called by a control that whats to be constantly animated or doesn't anymore, so we know whether we should refresh canvas non-stop
public bool RegisterAnimator(ISkiaAnimator animator)
Parameters
animatorISkiaAnimator
Returns
RegisterGestureListener(ISkiaGestureListener)
public void RegisterGestureListener(ISkiaGestureListener gestureListener)
Parameters
gestureListenerISkiaGestureListener
Remove(IView)
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(IView item)
Parameters
itemIViewThe object to remove from the ICollection<T>.
Returns
- bool
true if
itemwas successfully removed from the ICollection<T>; otherwise, false. This method also returns false ifitemis not found in the original ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
RemoveAnimator(Guid)
public void RemoveAnimator(Guid uid)
Parameters
uidGuid
RemoveAt(int)
Removes the IList<T> item at the specified index.
public void RemoveAt(int index)
Parameters
indexintThe zero-based index of the item to remove.
Exceptions
- ArgumentOutOfRangeException
indexis not a valid index in the IList<T>.- NotSupportedException
The IList<T> is read-only.
RemoveSubView(SkiaControl)
Directly removes a view from the control, without any layouting. Use this instead of Views.Remove() to avoid memory leaks etc
public void RemoveSubView(SkiaControl control)
Parameters
controlSkiaControl
Repaint()
public virtual void Repaint()
ReportFocus(ISkiaGestureListener, ISkiaGestureListener)
Internal call by control, after reporting will affect FocusedChild but will not get FocusedItemChanged as it was its own call
public void ReportFocus(ISkiaGestureListener value, ISkiaGestureListener setter = null)
Parameters
valueISkiaGestureListenersetterISkiaGestureListener
ReportHotreloadChildAdded(SkiaControl)
public virtual void ReportHotreloadChildAdded(SkiaControl child)
Parameters
childSkiaControl
ReportHotreloadChildRemoved(SkiaControl)
public virtual void ReportHotreloadChildRemoved(SkiaControl control)
Parameters
controlSkiaControl
ResetFocusWithDelay(int)
public void ResetFocusWithDelay(int ms)
Parameters
msint
ResetUpdate()
public void ResetUpdate()
ReturnSurface(SKSurface)
DO NOT call this for GPU surfaces use DisposeObject instead
public void ReturnSurface(SKSurface surface)
Parameters
surfaceSKSurface
SetChildAsDirty(SkiaControl)
public void SetChildAsDirty(SkiaControl child)
Parameters
childSkiaControl
SetChildren(IEnumerable<SkiaControl>)
public virtual void SetChildren(IEnumerable<SkiaControl> views)
Parameters
viewsIEnumerable<SkiaControl>
SetDeviceOrientation(DeviceOrientation)
public void SetDeviceOrientation(DeviceOrientation value)
Parameters
valueDeviceOrientation
SetMeasured(float, float, float)
protected ScaledSize SetMeasured(float width, float height, float scale)
Parameters
Returns
SetPauseStateOfAllAnimatorsByParent(SkiaControl, bool)
public virtual IEnumerable<ISkiaAnimator> SetPauseStateOfAllAnimatorsByParent(SkiaControl parent, bool state)
Parameters
parentSkiaControlstatebool
Returns
SetViewTreeVisibilityByParent(SkiaControl, bool)
TODO maybe use renderedNode tree
public virtual IEnumerable<ISkiaAnimator> SetViewTreeVisibilityByParent(SkiaControl parent, bool state)
Parameters
parentSkiaControlstatebool
Returns
StreamFromString(string)
public static MemoryStream StreamFromString(string value)
Parameters
valuestring
Returns
SubscribeToRenderingFinished(SkiaControl)
SetVisualTransform will be called after every frame
public void SubscribeToRenderingFinished(SkiaControl control)
Parameters
controlSkiaControl
SwapInvalidations()
protected void SwapInvalidations()
TakeScreenShot(Action<SKImage>)
public void TakeScreenShot(Action<SKImage> callback)
Parameters
TakeScreenShotInternal(SKSurface)
protected virtual void TakeScreenShotInternal(SKSurface surface)
Parameters
surfaceSKSurface
UnregisterAllAnimatorsByParent(SkiaControl)
public virtual IEnumerable<ISkiaAnimator> UnregisterAllAnimatorsByParent(SkiaControl parent)
Parameters
parentSkiaControl
Returns
UnregisterAllAnimatorsByType(Type)
public virtual IEnumerable<ISkiaAnimator> UnregisterAllAnimatorsByType(Type type)
Parameters
typeType
Returns
UnregisterAnimator(Guid)
public void UnregisterAnimator(Guid uid)
Parameters
uidGuid
UnregisterGestureListener(ISkiaGestureListener)
public void UnregisterGestureListener(ISkiaGestureListener gestureListener)
Parameters
gestureListenerISkiaGestureListener
Update()
Force redrawing, without invalidating the measured size
public virtual void Update()
UpdateByChild(SkiaControl)
To track dirty area when Updating parent
public virtual void UpdateByChild(SkiaControl child)
Parameters
childSkiaControl
UpdateGlobal()
protected virtual void UpdateGlobal()
UsubscribeFromRenderingFinished(SkiaControl)
public void UsubscribeFromRenderingFinished(SkiaControl control)
Parameters
controlSkiaControl
WillDispose()
protected virtual void WillDispose()
Events
FocusedItemChanged
public event EventHandler<DrawnView.FocusedItemChangedArgs> FocusedItemChanged
Event Type
HandlerWasSet
public event EventHandler<bool> HandlerWasSet
Event Type
Measured
public event EventHandler<ScaledSize> Measured
Event Type
OrientationChanged
public event EventHandler<DeviceOrientation> OrientationChanged
Event Type
ViewDisposing
public event EventHandler ViewDisposing
Event Type
WasDrawn
OnDrawSurface will call that
public event EventHandler<SkiaDrawingContext?> WasDrawn
Event Type
WillDraw
OnDrawSurface will call that
public event EventHandler<SkiaDrawingContext?> WillDraw
Event Type
WillFirstTimeDraw
OnDrawSurface will call that if never been drawn yet
public event EventHandler<SkiaDrawingContext?> WillFirstTimeDraw