Conversation
|
@BambOoxX you might get a kick out of seeing where this is now. I'm going to try some deeper refactoring tomorrow, but now your core suggestion from #1660 of discretely drawing lines instead of placing text has been implemented 🚀
I reduced the size where necessary to make sure all the markers are the same size |
|
@swharden Very nice! The only one I would modify is the asterisk. I believe reducing the length of the diagonal lines by a sqrt(2) factor would make the marker rounder. |
|
I think it would be good that hollow / thin markers inherit the line width by default, in order to maintain consistency. I will try to add that and also the two marker types proposed in #1660 initially |
…TriangleDownPoints` - Replaced `(float)x` with `xf` syntax
…enTriangleDown` markers and associated methods
|
Here a the new markers from #1689 |
|
Regarding the |
This is a good point indeed! I'll keep refactoring the Marker system today and favor brush/pen re-use where possible. ...but t be honest I'm not terribly motivated to micro-optimize GDI rendering at this time since my biggest active goal right now is cutting GDI out of this library entirely (#1036). My coding goal for now is aimed at making rendering methods as easy to port to another rendering system as possible. |
|
@swharden I see you are moving a lot of stuff around. I'll let you finish this then open a new PR with the following modifications (that I implemented at the moment) unless you don't think they are relevant.
|
...to support Visual Studio 2019 which is still used by the GitHub Actions build pipeline
|
This landed in a weird spot. All marker logic is in The current solution is a little wonky but it works, doesn't break existing code, and these classes are ready to pick-up in ScottPlot 5 where breaking changes will be permitted. ScottPlot/src/ScottPlot/Marker/Marker.cs Lines 32 to 56 in d8af928 ScottPlot/src/ScottPlot/Marker/MarkerTools.cs Lines 10 to 27 in d8af928
@BambOoxX I'm going to merge this now, and if you'd still like to make these changes given the new class structure you're welcome to in a new PR 👍 🚀 |
All right it's on ! |




Currently
MarkerShapeis anenumandDrawMarker()uses a nastyswitchto draw each marker.Eventually (either here or ScottPlot 5) I want
Markerobjects to be classes that inheritIMarkerand canDraw()themselves. This will make the code easier to maintain, make it easier to add new markers, and allow users to add their own custom markers too.This PR will start by breaking apart the
RenderMarker()method into smaller static methods, and explore options for moving toward a class-based marker system that minimizes breaking changes. Drawing routines will be optimized where appropriate. Resolves #1668