not sure if were asking how to do the "fancy" snap but if you're using (positive) integers only (ie, Screen coords), then ThisValue = (ThisValue/Size)*Size will return the nearest Snap position.
Since GetPointerX/Y() return Floats, ThisValue = FLOOR(GetPointerX()/Size)*Size will do the same while accounting for negative values (imagine a map editor using SetViewOffset() or the like where you may want Sprites, Text, etc, to Snap to position on both sides of 0,0).
for Atlas Decomposer, perhaps offering the option to Snap would be fitting. something like If ShiftKey() then Snap() else Dont while defining the Icon