mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Implemented SkiaSharp layer rendering
This commit is contained in:
1 parent
de45bcb443
commit
2e96d796a8
6 files changed
+126
-39
No files matched your search
@@ -27,21 +27,43 @@ namespace Artemis.Core.Plugins.LayerElement
|
||||
/// Called before rendering every frame, write your update logic here
|
||||
/// </summary>
|
||||
/// <param name="deltaTime"></param>
|
||||
public abstract void Update(double deltaTime);
|
||||
public virtual void Update(double deltaTime)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before rendering, in the order configured on the layer
|
||||
/// Allows you to perform rendering on the surface <see cref="SKCanvas" /> before any layer-clipping is applied
|
||||
/// <para>Called before rendering, in the order configured on the layer</para>
|
||||
/// </summary>
|
||||
public abstract void RenderPreProcess(ArtemisSurface surface, SKCanvas canvas);
|
||||
/// <param name="surface">The surface the layer is rendered on</param>
|
||||
/// <param name="canvas">The entire surface canvas</param>
|
||||
public virtual void RenderPreProcess(ArtemisSurface surface, SKCanvas canvas)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called during rendering, in the order configured on the layer
|
||||
/// The main method of rendering anything to the layer. The provided <see cref="SKCanvas" /> is specific to the layer
|
||||
/// and matches it's width and height.
|
||||
/// <para>Called during rendering, in the order configured on the layer</para>
|
||||
/// </summary>
|
||||
public abstract void Render(ArtemisSurface surface, SKCanvas canvas);
|
||||
/// <param name="surface">The surface the layer is rendered on</param>
|
||||
/// <param name="canvas">The layer canvas</param>
|
||||
public virtual void Render(ArtemisSurface surface, SKCanvas canvas)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called after rendering, in the order configured on the layer
|
||||
/// Allows you to modify the <see cref="SKShader" /> used to draw the layer's <see cref="SKBitmap" /> on the
|
||||
/// <see cref="SKCanvas" />.
|
||||
/// <para>Called after rendering, in the order configured on the layer.</para>
|
||||
/// </summary>
|
||||
public abstract void RenderPostProcess(ArtemisSurface surface, SKCanvas canvas);
|
||||
/// <param name="surface">The surface the layer is rendered on</param>
|
||||
/// <param name="bitmap">The bitmap created from the layer canvas</param>
|
||||
/// <param name="shader">The current shader used to draw the bitmap on the surface canvas</param>
|
||||
/// <returns>The resulting shader used to draw the bitmap on the surface canvas</returns>
|
||||
public virtual SKShader RenderPostProcess(ArtemisSurface surface, SKBitmap bitmap, SKShader shader)
|
||||
{
|
||||
return shader;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user