I am working on a painting app in wpf. I implemented several features such as painting with images:
This is done by just drawing Image controls onto a canvas on mouse move, and rasterizing that canvas into a rendertargetbitmap on mouse up. Once rasterized I just replace the canvas background. This works for the most part, but its quite slow, especially when the resolution increases.
Now I need to implement traditional painting features. Like a simple paint brush, pencil, eraser, ect. I originally thought I could just use the same approach as above, for example just use a 1x1 pixel image for a pencil tool. This doesnt work well because the above approach is too slow, I need to be able to directly paint onto the bitmap. I saw that there is an inkcanvas in wpf, but this is vector painting which I do not want.
Is there a library I can use in wpf that does simple painting? I looked into writablebitmapex but its a little too simple. I also saw that GDI is a good .Net library, but I also read some people recommend against using GDI in wpf. I also saw Direct2D comeup in my research.