Interface SelectionShapePainter

    • Method Detail

      • canAddTracePoint

        boolean canAddTracePoint​(ImagePanel.PaintPanel owner,
                                 List<Point> trace,
                                 Point p)
        Returns whether the current point is at leats the specified distance away from the last one.
        Parameters:
        owner - the panel this shape is used with
        trace - the trace so far
        p - the point to check
        Returns:
        true if can be added
      • paintSelectionShape

        void paintSelectionShape​(ImagePanel.PaintPanel owner,
                                 Graphics g,
                                 Point topLeft,
                                 Point bottomRight,
                                 List<Point> trace)
        Paints the selection shape.
        Parameters:
        owner - the panel this shape is used with
        g - the graphics context
        topLeft - the top-left corner
        bottomRight - the bottom-right corner
        trace - the mouse movement trace