When should I use SnapsToDevicePixels in WPF 4.0?

前端 未结 4 2007
梦如初夏
梦如初夏 2020-11-29 23:10

Can anyone suggest a guideline on when to use SnapsToDevicePixels in WPF 4.0?

Should it only be used occasionally if there is an issue, liberally throug

4条回答
  •  时光说笑
    2020-11-29 23:14

    One case is if you are displaying an image or video. If you don't snap to device pixels (ie to the video screen's pixels) then some algorithm (interpolation, anti-aliasing) is used to position your image's pixels "in between" your screen's pixels, and what is displayed won't look as good as the original image would. The image would lose some sharpness.

提交回复
热议问题