What is PixelOffsetMode?

During painting you're using double values to present your logical graphic objects, for example lines, circles, etc.

But during rendering, framework should convert your logical doubles into physical integer pixels.

During this process framework uses some kind of rounding, smoothing (anti-aliasing)

So, during anti-aliasing you can have different algorithms which will provide different results; Usually all they need to calculate "distance" between logical pixel and its physical coordinates, so different modes of this setting affects precision of this distance.

Here is nice example of different modes (basically different shades of gray - different distance):

enter image description here

NOTE: .net framework also has setting for actual smoothing (SmoothingMode) which basically means - how we smooth, not how we calculate distance internally

Tags:

C#

.Net

Image