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:
- https://social.msdn.microsoft.com/forums/vstudio/en-us/d95c6b91-2a68-455b-b9d4-021bd5c96029/how-to-disable-smoothing-for-stroke-?forum=wpf
- 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
Post a Comment