Added SnapXToGrid et snapYToGrid