Skip to content

Leverage Skia Context outside of the GUI #4

Answered by MrJul
ShadowMarker789 asked this question in Q&A
Discussion options

You must be logged in to vote

You can get access to Skia's SkCanvas for a given Avalonia control by using a ICustomDrawOperation: see Avalonia's Custom Skia Page sample.

You can also leverage Avalonia's geometry support without using Skia directly: use any Shape-derived control, such as Path, or override Render and use the various DrawX methods to render your geometry.

That said, your use case seems very specific and probably not what Estragonia was made for: if you have no interest in Avalonia's capabilities and only want to use Skia, it might be easier to create a Skia surface directly from a Godot texture (Vulkan image). You can use GodotVkSkiaGpu to get started.

I'm converting this issue to a discussion.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ShadowMarker789
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3 on July 31, 2023 09:41.