Class AbstractShapeTool

    • Field Detail

      • m_LastPoint

        protected Point m_LastPoint
        the last point that was drawn on.
    • Constructor Detail

      • AbstractShapeTool

        public AbstractShapeTool()
    • Method Detail

      • doDrawShape

        protected void doDrawShape​(Point p)
        Draws the currently selected shape at the specified location.
        Parameters:
        p - the location
      • doDrawShape

        protected abstract void doDrawShape​(List<Point> points)
        Draws the currently selected shape at the specified locations.
        Parameters:
        points - the locations
      • drawShape

        protected void drawShape​(Point p)
        Draws the currently selected shape at the specified location. Skips drawing if no active layer. Updates the canvas after a successful draw.
        Parameters:
        p - the location
      • drawShape

        protected void drawShape​(Point from,
                                 Point to)
        Draws the shape along the line between the two points.
        Parameters:
        from - the starting point
        to - the end point