Table of Contents

Class Sk3dView

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

Custom implementation of Android's Camera 3D helper for SkiaSharp

public class Sk3dView
Inheritance
Sk3dView
Inherited Members
Extension Methods

Constructors

Sk3dView()

public Sk3dView()

Fields

CameraDistance

3D camera distance (8 inches in pixels, similar to Android implementation)

public float CameraDistance

Field Value

float

Invalidated

protected bool Invalidated

Field Value

bool

Properties

Matrix

Gets the current transformation matrix

public SKMatrix Matrix { get; }

Property Value

SKMatrix

Methods

ApplyToCanvas(SKCanvas)

Applies the current 3D transformation to the canvas

public void ApplyToCanvas(SKCanvas canvas)

Parameters

canvas SKCanvas

OnReset()

protected virtual void OnReset()

OnRestore()

protected virtual void OnRestore()

Reset()

Resets the current state and clears all saved states

public void Reset()

Restore()

Restores the previously saved transformation state

public void Restore()

RotateXDegrees(float)

Rotates around the X axis

public void RotateXDegrees(float degrees)

Parameters

degrees float

RotateYDegrees(float)

Rotates around the Y axis

public void RotateYDegrees(float degrees)

Parameters

degrees float

RotateZDegrees(float)

Rotates around the Z axis

public void RotateZDegrees(float degrees)

Parameters

degrees float

Save()

Saves the current transformation state

public void Save()

Translate(float, float, float)

Translates along all axes

public void Translate(float x, float y, float z)

Parameters

x float
y float
z float

TranslateX(float)

Translates along the X axis

public void TranslateX(float value)

Parameters

value float

TranslateY(float)

Translates along the Y axis

public void TranslateY(float value)

Parameters

value float

TranslateZ(float)

Translates along the Z axis

public void TranslateZ(float value)

Parameters

value float