Class ChangeCanvasSize

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ImageTransformer<BufferedImageContainer>, FlowContextHandler, Serializable, Comparable

    public class ChangeCanvasSize
    extends AbstractBufferedImageTransformer
    Places the image on a canvas of specified size based on the anchor.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -canvas-width <int> (property: canvasWidth)
        The width of the canvas in pixels.
        default: 100
        minimum: 1
     
    -canvas-height <int> (property: canvasHeight)
        The height of the canvas in pixels.
        default: 100
        minimum: 1
     
    -anchor <TOP_LEFT|TOP_CENTER|TOP_RIGHT|MIDDLE_LEFT|MIDDLE_CENTER|MIDDLE_RIGHT|BOTTOM_LEFT|BOTTOM_CENTER|BOTTOM_RIGHT> (property: anchor)
        Defines where to anchor the position on the canvas.
        default: TOP_LEFT
     
    -background <java.awt.Color> (property: background)
        The background color to use.
        default: #ffffff
     
    Version:
    $Revision: 9648 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_CanvasWidth

        protected int m_CanvasWidth
        the width of the canvas.
      • m_CanvasHeight

        protected int m_CanvasHeight
        the height of the canvas.
      • m_Anchor

        protected ImageAnchor m_Anchor
        where to anchor the position on the canvas.
      • m_Background

        protected Color m_Background
        the background color.
    • Constructor Detail

      • ChangeCanvasSize

        public ChangeCanvasSize()
    • Method Detail

      • setCanvasWidth

        public void setCanvasWidth​(int value)
        Sets the width of the canvase.
        Parameters:
        value - the width
      • getCanvasWidth

        public int getCanvasWidth()
        Returns the width of the canvas.
        Returns:
        the width
      • canvasWidthTipText

        public String canvasWidthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setCanvasHeight

        public void setCanvasHeight​(int value)
        Sets the height of the canvas.
        Parameters:
        value - the height
      • getCanvasHeight

        public int getCanvasHeight()
        Returns the height of the canvas.
        Returns:
        the height
      • canvasHeightTipText

        public String canvasHeightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setAnchor

        public void setAnchor​(ImageAnchor value)
        Sets where to anchor the position on the rectangle.
        Parameters:
        value - the anchor
      • getAnchor

        public ImageAnchor getAnchor()
        Returns where to anchor the position on the rectangle.
        Returns:
        the anchor
      • anchorTipText

        public String anchorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setBackground

        public void setBackground​(Color value)
        Sets the background color to use.
        Parameters:
        value - the color
      • getBackground

        public Color getBackground()
        Returns the background color to use.
        Returns:
        the color
      • backgroundTipText

        public String backgroundTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.