docstr: Moves a point x,y to within the boundaries of the canvas.
  :return: (x,y,snapped) where snapped is True if x or y were changed, False if not.
docstr_tok: ["Moves","a","point","x",",","y","to","within","the","boundaries","of","the","canvas",".",":","return",":","(","x",",","y",",","snapped",")","where","snapped","is","True","if","x","or","y","were","changed",",","False","if","not","."]
code: def snapPointToCanvas(self, x, y):
      """
      Moves a point x,y to within the boundaries of the canvas.
      :return: (x,y,snapped) where snapped is True if x or y were changed, False if not.
      """
      if (
          x < 0
          or x > self.pixmap.width()
          or y < 0
          or y > self.pixmap.height()
      ):
          x = max(x, 0)
          y = max(y, 0)
          x = min(x, self.pixmap.width())
          y = min(y, self.pixmap.height())
          return x, y, True
  
      return x, y, False
  
imports: import copy
  from PyQt5.QtCore import Qt, pyqtSignal, QPointF, QPoint
  from PyQt5.QtGui import QPainter, QBrush, QColor, QPixmap
  from PyQt5.QtWidgets import QWidget, QMenu, QApplication
  from libs.shape import Shape
  from libs.utils import distance
label_desc: Use image node_id 24 for calling the Canvas obj's underlying member method code with example usage: obj.snapPointToCanvas(x, y) and returns: x,  y,  False, x,  y,  True