c# - WPF InkCanvas: how to disable antialiasing -


i'm using inkcanvas in project , noticed whenever draw something, stroke sharp, , once release mouse button becomes blurry.

is there way can keep stroke identical looks i'm drawing it?

right i'm going through array image , remove pixel doesn't match color.red (i.e., argb: 255,255,0,0)... , i'm sure there's smarter way this!

thanks in advance.

ok. found answer!

sources:

  1. https://social.msdn.microsoft.com/forums/vstudio/en-us/d95c6b91-2a68-455b-b9d4-021bd5c96029/how-to-disable-smoothing-for-stroke-?forum=wpf
  2. rendering sharp lines in wpf

i tried add renderoptions.edgemode="aliased" directly xaml (the property doesn't show in properties window, when selecting inkcanvas) , works. this:

<inkcanvas x:name="myinkcanvas" moveenabled="false" ...> 

to:

<inkcanvas x:name="myinkcanvas" moveenabled="false" renderoptions.edgemode = "aliased" ...> 

on mouseup, stroke stille "moves" bit, stroke sharp!


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -