Quantcast
Channel: WPF Paint App with WriteableBitmap
Viewing all articles
Browse latest Browse all 4

WPF Paint App with WriteableBitmap

$
0
0

Instead of drawing a line, use interpolation. Store the last "n" mouse points that have been received and pass them into an interpolation algorithm that spits out a list of points. Then loop over the points and draw each one.

Photoshop and most other drawing applications work this way. Fire up Photoshop, select the brush tool. Click the "Brushes" tab then "Brush Tip Shape". Disable "Spacing" and try to draw - it will look exactly like the sample image you posted above.

The nice thing about using interpolation over line drawing is that you can swap in more advanced algorithms in the future, such as curve smoothing.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>