Skip to content

Experimental rendering system using Maui.Graphics, SkiaSharp, and OpenGL#1561

Merged
swharden merged 15 commits intomasterfrom
maui-testing
Feb 5, 2022
Merged

Experimental rendering system using Maui.Graphics, SkiaSharp, and OpenGL#1561
swharden merged 15 commits intomasterfrom
maui-testing

Conversation

@swharden
Copy link
Member

@swharden swharden commented Jan 16, 2022

This PR explores feasibility of cutting the dependency on System.Drawing.Common in favor of a rendering system using Microsoft.Maui.Graphics (#1036). Depending on what is discovered here, code here may evolve into the next major version of ScottPlot (version 5).

Goals of this PR

  • Support back to .NET Standard 2.0 and .NET Framework 4.6.2
  • no System.Drawing anywhere in the project
  • nullable support throughout the code base C# 8 nullable support #691
  • hardware-accelerated rendering in controls using SkiaSharp and OpenGL
  • stateless rendering system to improve support for multi-threading and testing
    • size will never be stored - it will be passed-in and the layout will be recalculated on each render
    • mouse positions or state should not be stored - mouse actions (e.g., click/drag) will be built by controls and passed in

Major Limitations

These limitations are because Maui.Graphics is not fully mature yet, but:

  • There is no Microsoft.Maui.Graphics.ICanvas.MeasureString()
  • Microsoft.Maui.Graphics.ICanvas.DrawString() does not support custom fonts

Resources

@swharden swharden marked this pull request as ready for review February 5, 2022 04:07
@swharden swharden marked this pull request as draft February 5, 2022 04:08
@swharden swharden marked this pull request as ready for review February 5, 2022 04:12
@swharden
Copy link
Member Author

swharden commented Feb 5, 2022

This is far from done, but I'm going to merge it now so I can work on the CI system (using separate workflows to test ScottPlot 4 vs ScottPlot 5), then I'll open a new PR

@swharden swharden merged commit 5cf46af into master Feb 5, 2022
@swharden swharden deleted the maui-testing branch February 5, 2022 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant