Class CachedObject
public class CachedObject : ISkiaDisposable, IDisposable
- Inheritance
-
CachedObject
- Implements
- Inherited Members
- Extension Methods
Constructors
CachedObject(SkiaCacheType, SKPicture, SKRect, SKRect)
public CachedObject(SkiaCacheType type, SKPicture picture, SKRect bounds, SKRect recordingArea)
Parameters
typeSkiaCacheTypepictureSKPictureboundsSKRectrecordingAreaSKRect
CachedObject(SkiaCacheType, SKSurface, SKRect, SKRect)
public CachedObject(SkiaCacheType type, SKSurface surface, SKRect bounds, SKRect recordingArea)
Parameters
typeSkiaCacheTypesurfaceSKSurfaceboundsSKRectrecordingAreaSKRect
Fields
Id
public Guid Id
Field Value
LastDestination
Actual destination rect where cache was drawn (for gesture coordinate translation)
public SKRect LastDestination
Field Value
LastDrawnAt
Stores the canvas-relative draw position(x, y), not the actual destination rect, these are relative offsets for the drawing operation, not absolute screen position.
public SKRect LastDrawnAt
Field Value
Properties
Bounds
public SKRect Bounds { get; set; }
Property Value
Children
public List<VisualLayer> Children { get; set; }
Property Value
Image
public SKImage Image { get; set; }
Property Value
IsAlive
public ObjectAliveType IsAlive { get; set; }
Property Value
IsDisposed
public bool IsDisposed { get; protected set; }
Property Value
Picture
public SKPicture Picture { get; set; }
Property Value
PreserveSourceFromDispose
public bool PreserveSourceFromDispose { get; set; }
Property Value
RecordingArea
public SKRect RecordingArea { get; set; }
Property Value
Surface
public SKSurface Surface { get; set; }
Property Value
SurfaceIsRecycled
An existing surface was reused for creating this object
public bool SurfaceIsRecycled { get; set; }
Property Value
Tag
public string Tag { get; set; }
Property Value
Type
public SkiaCacheType Type { get; protected set; }
Property Value
Methods
CalculatePositionOffset(SKPoint)
public SKPoint CalculatePositionOffset(SKPoint drawingRect)
Parameters
drawingRectSKPoint
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Draw(SKCanvas, SKRect, SKPaint)
This will draw with destination corrected by offset that it had when was recorded
public void Draw(SKCanvas canvas, SKRect destination, SKPaint paint)
Parameters
Draw(SKCanvas, float, float, SKPaint)
Will draw at exact x,y coordinated without any adjustments
public void Draw(SKCanvas canvas, float x, float y, SKPaint paint)
Parameters
GetBitmap()
public SKBitmap GetBitmap()
Returns
Test(SKRect)
public SKPoint Test(SKRect drawingRect)
Parameters
drawingRectSKRect
Returns
TranslateInputCoords(SKRect)
public SKPoint TranslateInputCoords(SKRect drawingRect)
Parameters
drawingRectSKRect