leviathan
Adding a CommaToken in a code fix
I'm trying to write a code fix that just adds a comma to the end of an InitializerExpressionSyntax (which was previously flagged by an analyzer). I've followed this guide and tried adapting it to my use case, but for some reason it's not working. This is my first time working with Roslyn, and I don't know what I could be doing wrong.
Here's the relevant method:
And I've also attached the whole file in case it's helpful.
4 replies
Simple 2D graphics in C#
I want to make a 2D physics engine (mostly for learning), and I need a way to visualise the simulations I run. I want something that is simple to use, lightweight and (ideally) cross-platform. I need it to provide a direct way to open a window and draw basic shapes onto a canvas (circles/ellipses, polygons), providing me with full control over aspects like colour and line width. In brief, I'm looking for something like Processing but for C#.
7 replies
Rendering and updating a colormap
I'm developing a library related to real-time image generation. To test it, I'm trying to make an app that can convert a
Color[,]
into an image and display it, updating at 60 fps (Color is a class with 3 float fields).
Ideally, I'd want my code to be like this:
where imageDisplay would probably be a PictureBox in a WPF app (with which I have no experience at all).
(This is of course pseudocode)
Any help is greatly appreciated.113 replies