a441700e6fc78598c157f143fe63f1edfa3bb7f1,labelme/canvas.py,Canvas,mouseMoveEvent,#Canvas#Any#,121

Before Change


        // Polygon drawing.
        if self.drawing():
            self.overrideCursor(CURSOR_DRAW)
            if self.current:
                color = self.lineColor
                if self.outOfPixmap(pos):
                    // Don"t allow the user to draw outside the pixmap.
                    // Project the point to the pixmap"s edges.
                    pos = self.intersectionPoint(self.current[-1], pos)
                elif len(self.current) > 1 and \
                        self.closeEnough(pos, self.current[0]):
                    // Attract line to starting point and
                    // colorise to alert the user.
                    pos = self.current[0]
                    color = self.current.line_color
                    self.overrideCursor(CURSOR_POINT)
                    self.current.highlightVertex(0, Shape.NEAR_VERTEX)
                self.line[0] = self.current[-1]
                self.line[1] = pos
                self.line.line_color = color
                self.repaint()
                self.current.highlightClear()
            return

        // Polygon copy moving.
        if QtCore.Qt.RightButton & ev.buttons():

After Change


                color = self.current.line_color
                self.overrideCursor(CURSOR_POINT)
                self.current.highlightVertex(0, Shape.NEAR_VERTEX)
            if self.createMode == "polygon":
                self.line[0] = self.current[-1]
                self.line[1] = pos
            elif self.createMode == "rectangle":
                self.line.points = list(self.getRectangleFromLine(
                    (self.current[0], pos)
                ))
                self.line.close()
            else:
                raise ValueError
            self.line.line_color = color
            self.repaint()
            self.current.highlightClear()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: wkentaro/labelme
Commit Name: a441700e6fc78598c157f143fe63f1edfa3bb7f1
Time: 2018-06-14
Author: www.kentaro.wada@gmail.com
File Name: labelme/canvas.py
Class Name: Canvas
Method Name: mouseMoveEvent


Project Name: NTMC-Community/MatchZoo
Commit Name: f640854cdaa14fede8b48a3c11072a211bad349d
Time: 2017-08-14
Author: fanyixing111@hotmail.com
File Name: matchzoo/inputs/preprocess.py
Class Name:
Method Name:


Project Name: google/deepvariant
Commit Name: 7ed8c6bbcfb2dc0da9b1011ba21d12791239de79
Time: 2019-10-21
Author: gunjanbaid@google.com
File Name: deepvariant/postprocess_variants.py
Class Name:
Method Name: main