Class AbstractStrokeSelectionShapePainter

    • Field Detail

      • m_StrokeThickness

        protected float m_StrokeThickness
        the thickness of the stroke.
    • Constructor Detail

      • AbstractStrokeSelectionShapePainter

        public AbstractStrokeSelectionShapePainter()
    • Method Detail

      • strokeThicknessTipText

        public String strokeThicknessTipText()
        Returns the tip text for this property.
        Specified by:
        strokeThicknessTipText in interface StrokeSelectionShapePainter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getStrokeWidth

        protected float getStrokeWidth​(Graphics g,
                                       float defValue)
        Returns the thickness of the stroke.
        Parameters:
        g - graphics context to get the thickness from
        defValue - the default value to return in case of failure
        Returns:
        the stroke, default value if failed to extract
      • applyStroke

        protected void applyStroke​(Graphics g,
                                   float stroke)
        Applies the stroke thickness.
        Parameters:
        stroke - the thickness to apply
      • doPaintSelectionShapeWithStroke

        protected abstract void doPaintSelectionShapeWithStroke​(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