Table of Contents

Class SkiaSprite.SpriteFrameImage

Namespace
DrawnUi.Controls
Assembly
DrawnUi.Maui.dll
public class SkiaSprite.SpriteFrameImage : SkiaImage, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ISkiaDisposable, IDisposable
Inheritance
SkiaSprite.SpriteFrameImage
Implements
Inherited Members
Extension Methods

Constructors

SpriteFrameImage()

public SpriteFrameImage()

Properties

ContentHeightPixels

public int ContentHeightPixels { get; set; }

Property Value

int

ContentOffsetXPixels

public int ContentOffsetXPixels { get; set; }

Property Value

int

ContentOffsetYPixels

public int ContentOffsetYPixels { get; set; }

Property Value

int

ContentWidthPixels

public int ContentWidthPixels { get; set; }

Property Value

int

FrameHeightPixels

public int FrameHeightPixels { get; set; }

Property Value

int

FrameWidthPixels

public int FrameWidthPixels { get; set; }

Property Value

int

FrameX

public int FrameX { get; set; }

Property Value

int

FrameY

public int FrameY { get; set; }

Property Value

int

RenderAnchorX

public float RenderAnchorX { get; set; }

Property Value

float

RenderAnchorY

public float RenderAnchorY { get; set; }

Property Value

float

RenderHeightUnits

public float RenderHeightUnits { get; set; }

Property Value

float

RenderUnitsPerPixel

public float RenderUnitsPerPixel { get; set; }

Property Value

float

RenderWidthUnits

public float RenderWidthUnits { get; set; }

Property Value

float

Methods

DrawSource(DrawingContext, LoadedImageSource, TransformAspect, DrawImageAlignment, DrawImageAlignment, SKPaint)

Updated DrawSource with professional-quality resizing

protected override void DrawSource(DrawingContext ctx, LoadedImageSource source, TransformAspect stretch, DrawImageAlignment horizontal = DrawImageAlignment.Center, DrawImageAlignment vertical = DrawImageAlignment.Center, SKPaint paint = null)

Parameters

ctx DrawingContext
source LoadedImageSource
stretch TransformAspect
horizontal DrawImageAlignment
vertical DrawImageAlignment
paint SKPaint

OnMeasuring(float, float, float)

Input in POINTS

public override ScaledSize OnMeasuring(float widthRequest, float heightRequest, float dscale)

Parameters

widthRequest float
heightRequest float
dscale float

Returns

ScaledSize

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

SetMeasuredAsEmpty(float)

protected override ScaledSize SetMeasuredAsEmpty(float scale)

Parameters

scale float

Returns

ScaledSize

SetupBackgroundPaint(SKPaint, SKRect)

Applies Background and BackgroundColor properties to paint inside destination. Returns false if there is nothing to paint painted.

protected override bool SetupBackgroundPaint(SKPaint paint, SKRect destination)

Parameters

paint SKPaint
destination SKRect

Returns

bool