Module ij
Package ij.gui

Class Arrow

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Point>

public class Arrow extends Line
This is an Roi subclass for creating and displaying arrows.
See Also:
  • Field Details

  • Constructor Details

    • Arrow

      public Arrow(double ox1, double oy1, double ox2, double oy2)
    • Arrow

      public Arrow(int sx, int sy, ImagePlus imp)
  • Method Details

    • draw

      public void draw(Graphics g)
      Draws this arrow on the image.
      Overrides:
      draw in class Line
    • getMask

      public ImageProcessor getMask()
      Description copied from class: Roi
      Always returns null for rectangular Roi's
      Overrides:
      getMask in class Roi
    • drawPixels

      public void drawPixels(ImageProcessor ip)
      Description copied from class: Line
      If the width of this line is less than or equal to one, draws the line. Otherwise draws the outline of the area of this line.
      Overrides:
      drawPixels in class Line
      See Also:
    • contains

      public boolean contains(int x, int y)
      Description copied from class: Roi
      Returns whether the center of pixel (x,y) is contained in the Roi. The position of a pixel center determines whether a pixel is selected. Points exactly at the left (right) border are considered outside (inside); points exactly on horizontal borders are considered outside (inside) at the border with the lower (higher) y. This convention is opposite to that of the java.awt.Shape class.
      Overrides:
      contains in class Line
    • getBounds

      public Rectangle getBounds()
      Return the bounding rectangle of this arrow.
      Overrides:
      getBounds in class Roi
    • handleMouseDown

      protected void handleMouseDown(int sx, int sy)
      Overrides:
      handleMouseDown in class Line
    • clipRectMargin

      protected int clipRectMargin()
      Overrides:
      clipRectMargin in class Line
    • isDrawingTool

      public boolean isDrawingTool()
      Description copied from class: Roi
      Returns 'true' if this is an ROI primarily used from drawing (e.g., TextRoi or Arrow).
      Overrides:
      isDrawingTool in class Roi
    • setDefaultWidth

      public static void setDefaultWidth(double width)
    • getDefaultWidth

      public static double getDefaultWidth()
    • setStyle

      public void setStyle(int style)
    • setStyle

      public void setStyle(String style)
    • getStyle

      public int getStyle()
    • setDefaultStyle

      public static void setDefaultStyle(int style)
    • getDefaultStyle

      public static int getDefaultStyle()
    • setHeadSize

      public void setHeadSize(double headSize)
    • getHeadSize

      public double getHeadSize()
    • setDefaultHeadSize

      public static void setDefaultHeadSize(double size)
    • getDefaultHeadSize

      public static double getDefaultHeadSize()
    • setDoubleHeaded

      public void setDoubleHeaded(boolean b)
    • getDoubleHeaded

      public boolean getDoubleHeaded()
    • setDefaultDoubleHeaded

      public static void setDefaultDoubleHeaded(boolean b)
    • getDefaultDoubleHeaded

      public static boolean getDefaultDoubleHeaded()
    • setOutline

      public void setOutline(boolean b)
    • getOutline

      public boolean getOutline()
    • setDefaultOutline

      public static void setDefaultOutline(boolean b)
    • getDefaultOutline

      public static boolean getDefaultOutline()
    • copyAttributes

      public void copyAttributes(Roi roi2)
      Description copied from class: Roi
      Copy the attributes (outline color, fill color, outline width) of 'roi2' to the this selection.
      Overrides:
      copyAttributes in class Roi