public PixelOffset ScanPathPixelOffset { get; set; }
Public Property ScanPathPixelOffset As PixelOffset
Get
Set
public:
property PixelOffset ScanPathPixelOffset {
PixelOffset get ();
void set (PixelOffset value);
}
member ScanPathPixelOffset : PixelOffset with get, set
When filling a Path instance, the region is scanned by horizontal lines (scanlines) to determine which pixels are inside the path. When the value of this property is None, the scanning is performed at the top of the pixels, whereas when it is Half, the scanning is performed at the center of the pixels.
When AntiAliasing is , the pixel offset refers to the subpixels, and the difference is much less noticeable.
The following images provide a few examples:
Description | Image Example |
---|---|
ScanPathPixelOffset = PixelOffset.None, AntiAliasing = : When filling shapes, the scanning of edges occurs at the top of the pixels. The shape in the example has integer vertex coordinates, the top edge is descending, whereas the bottom is ascending 1 pixel from the left to the right. The example is enlarged to show the effect. | ![]() |
ScanPathPixelOffset = PixelOffset.Half, AntiAliasing = (default): The scanning of edges occurs at the center of the pixels. The shape is the same as above. The example is enlarged to show the effect. | ![]() |
ScanPathPixelOffset = PixelOffset.None, AntiAliasing = : When filling shapes, the scanning of edges occurs at the top of the subpixels. When anti-aliasing is enabled, ScanPathPixelOffset makes a much less noticeable difference, though the gradients of the top and bottom lines are a bit different. The example is enlarged to show the effect. | ![]() |
ScanPathPixelOffset = PixelOffset.Half, AntiAliasing = : The scanning of edges occurs at the center of the subpixels. The result is almost the same as above, though the gradients of the top and bottom lines are more symmetric. The example is enlarged to show the effect. | ![]() |