Table of Contents

Class SkiaImageTiles

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class SkiaImageTiles : 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
SkiaImageTiles
Implements
Inherited Members
Extension Methods

Fields

CalculatedForDest

protected SKRect CalculatedForDest

Field Value

SKRect

CalculatedForTile

protected SKSize CalculatedForTile

Field Value

SKSize

TileAspectProperty

public static readonly BindableProperty TileAspectProperty

Field Value

BindableProperty

TileCacheTypeProperty

public static readonly BindableProperty TileCacheTypeProperty

Field Value

BindableProperty

TileHeightProperty

public static readonly BindableProperty TileHeightProperty

Field Value

BindableProperty

TileOffsetXProperty

public static readonly BindableProperty TileOffsetXProperty

Field Value

BindableProperty

TileOffsetYProperty

public static readonly BindableProperty TileOffsetYProperty

Field Value

BindableProperty

TileWidthProperty

public static readonly BindableProperty TileWidthProperty

Field Value

BindableProperty

Properties

DrawTiles

Whether tiles are setup for rendering

protected bool DrawTiles { get; set; }

Property Value

bool

Tile

Cached image that will be used as tile

protected SkiaImage Tile { get; set; }

Property Value

SkiaImage

TileAspect

Apspect to render image with, default is AspectFitFill.

public TransformAspect TileAspect { get; set; }

Property Value

TransformAspect

TileCacheType

public SkiaCacheType TileCacheType { get; set; }

Property Value

SkiaCacheType

TileHeight

public double TileHeight { get; set; }

Property Value

double

TileHeightPixels

protected float TileHeightPixels { get; set; }

Property Value

float

TileOffsetX

public double TileOffsetX { get; set; }

Property Value

double

TileOffsetY

public double TileOffsetY { get; set; }

Property Value

double

TileWidth

public double TileWidth { get; set; }

Property Value

double

TileWidthPixels

protected float TileWidthPixels { get; set; }

Property Value

float

WillClipBounds

Used to check whether to apply IsClippedToBounds property

public override bool WillClipBounds { get; }

Property Value

bool

Methods

CalculateTileSize(LoadedImageSource, SKRect, float, DrawImageAlignment, DrawImageAlignment)

protected void CalculateTileSize(LoadedImageSource source, SKRect dest, float scale, DrawImageAlignment horizontal = DrawImageAlignment.Center, DrawImageAlignment vertical = DrawImageAlignment.Center)

Parameters

source LoadedImageSource
dest SKRect
scale float
horizontal DrawImageAlignment
vertical DrawImageAlignment

CreateTile(double, double, LoadedImageSource)

protected virtual SkiaImage CreateTile(double width, double height, LoadedImageSource source)

Parameters

width double
height double
source LoadedImageSource

Returns

SkiaImage

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

InvalidateMeasure()

Marks the current measure of an element as invalidated.

protected override void InvalidateMeasure()

OnDisposing()

Base performs some cleanup actions with Superview

public override void OnDisposing()

OnMeasured()

protected override void OnMeasured()

OnPropertyChanged(string)

Method that is called when a bound property is changed.

protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName string

The name of the bound property that changed.

OnSuccess(string)

Source was loaded, we can create tile

public override void OnSuccess(string source)

Parameters

source string

SetupTiles()

protected virtual void SetupTiles()