public PixelOffset DrawPathPixelOffset { get; set; }
Public Property DrawPathPixelOffset As PixelOffset
Get
Set
public:
property PixelOffset DrawPathPixelOffset {
PixelOffset get ();
void set (PixelOffset value);
}
member DrawPathPixelOffset : PixelOffset with get, set
When drawing a shape, the pen width is applied around the path. When the value of this property is Half, the point coordinates of the path are shifted by half a pixel before applying the pen width.
When FastThinLines is and AntiAliasing is , and all points are at integer coordinates, the value of this property makes no difference.
The following images provide a few examples:
Description | Image Example |
---|---|
DrawPathPixelOffset = PixelOffset.None (default): When drawing paths, the point coordinates are not adjusted before applying the pen width. When AntiAliasing is , for polygons with every point at integer coordinates, this causes blurry horizontal and vertical lines for odd pen widths and sharp ones for even pen widths. The left rectangle was drawn with a 1 pixel wide pen, and the right one with a 2 pixel wide pen. | ![]() |
DrawPathPixelOffset = PixelOffset.Half: The point coordinates are shifted by a half pixel right and down before applying the pen width. When AntiAliasing is , for polygons with every point at integer coordinates, this causes sharp horizontal and vertical lines for odd pen widths and blurry ones for even pen widths. The left rectangle was drawn with a 1 pixel wide pen, and the right one with a 2 pixel wide pen. | ![]() |