Search code examples
c#writeablebitmapwriteablebitmapex

Dashed line using writeablebitmap


Are there a way when using writeablebitmap with writeablebitmapEx to draw a dashed line? Without having to manually calculate the dashes and create multiple lines to create the dashing effect?


Solution

  • Yes, use DrawLinePenned with a BitmapContext pen. You can use another image as pen or just create it on the fly.