Class SymbolDraw

java.lang.Object
cnuphys.splot.style.SymbolDraw

public class SymbolDraw extends Object
  • Constructor Details

    • SymbolDraw

      public SymbolDraw()
  • Method Details

    • drawSymbol

      public static void drawSymbol(Graphics g, int x, int y, IStyled style)
      Draws the appropriate symbol at the provided screen location.
      Parameters:
      g - the graphics context
      x - the x screen coordinate.
      y - the y screen coordinate.
      style - the drawing style to use.
    • drawGhostSymbol

      public static void drawGhostSymbol(Graphics g, int x, int y, IStyled style)
      Draws the appropriate symbol at the provided screen location.
      Parameters:
      g - the graphics context
      x - the x screen coordinate.
      y - the y screen coordinate.
      style - the drawing style to use.
    • drawSymbol

      public static void drawSymbol(Graphics g, int x, int y, SymbolType symbol, int symbolSize, Color lineColor, Color fillColor)
      Draws the appropriate symbol at the provided screen location.
      Parameters:
      g - the graphics context
      x - the x screen coordinate.
      y - the y screen coordinate.
      symbol - the symbol to use.
      symbolSize - the size of the symbol in pixels--typically around 8.
      lineColor - the outline color.
      fillColor - the fill color, which is not relevant for some symbols.
    • drawRectangle

      public static void drawRectangle(Graphics g, int x, int y, int w2, int h2, Color lc, Color fc)
      Draw a simple rectangle
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      w2 - the half width
      h2 - the half height
      lc - tThe line color
      fc - tThe fillcolor
    • drawOval

      public static void drawOval(Graphics g, int x, int y, int w2, int h2, Color lc, Color fc)
      Draw a simple oval
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      w2 - the half width
      h2 - the half height
      lc - the line color
      fc - The fillcolor
    • drawUpTriangle

      public static void drawUpTriangle(Graphics g, int x, int y, int s2, Color lc, Color fc)
      Draw a simple up triangle
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      s2 - the half-width
      lc - the line color
      fc - the fillcolor
    • drawDownTriangle

      public static void drawDownTriangle(Graphics g, int x, int y, int s2, Color lc, Color fc)
      Draw a simple down triangle
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      s2 - the half-width
      lc - the line color
      fc - tThe fillcolor
    • drawCross

      public static void drawCross(Graphics g, int x, int y, int s2, Color lc)
      Draw a simple cross
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      s2 - the half-width
      lc - the line color
    • drawX

      public static void drawX(Graphics g, int x, int y, int s2, Color lc)
      Draw a simple X symbol.
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      s2 - the half-width width
      lc - the line color
    • drawDiamond

      public static void drawDiamond(Graphics g, int x, int y, int s2, Color lc, Color fc)
      Draw a simple diamond
      Parameters:
      g - the graphics context
      x - the horizontal center
      y - the vertical center
      s2 - the half-width
      lc - the line color
      fc - the fillcolor