1. A method, comprising: identifying, by a network device comprising a processor, a stroke associated with an image, a point within the stroke, and a radius associated with the point, wherein the stroke snaps to an image edge that is parallel to a stroke direction of the stroke resulting in the stroke being positioned near the image edge; applying, by the network device, a condition related to a magnitude of a gradient of the image; in response to the condition being determined to have been satisfied, removing, by the network device, a pixel of a set of pixels and identifying, by the network device, another pixel of the set of pixels; and sampling, by the network device, a position associated with the other pixel of the set of pixels.