Package cnuphys.splot.style
Class SymbolDraw
java.lang.Object
cnuphys.splot.style.SymbolDraw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Draw a simple crossstatic void
drawDiamond
(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple diamondstatic void
drawDownTriangle
(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple down trianglestatic void
drawGhostSymbol
(Graphics g, int x, int y, IStyled style) Draws the appropriate symbol at the provided screen location.static void
Draw a simple ovalstatic void
drawRectangle
(Graphics g, int x, int y, int w2, int h2, Color lc, Color fc) Draw a simple rectanglestatic void
drawSymbol
(Graphics g, int x, int y, IStyled style) Draws the appropriate symbol at the provided screen location.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.static void
drawUpTriangle
(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple up trianglestatic void
Draw a simple X symbol.
-
Constructor Details
-
SymbolDraw
public SymbolDraw()
-
-
Method Details
-
drawSymbol
Draws the appropriate symbol at the provided screen location.- Parameters:
g
- the graphics contextx
- the x screen coordinate.y
- the y screen coordinate.style
- the drawing style to use.
-
drawGhostSymbol
Draws the appropriate symbol at the provided screen location.- Parameters:
g
- the graphics contextx
- 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 contextx
- 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
Draw a simple rectangle- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centerw2
- the half widthh2
- the half heightlc
- tThe line colorfc
- tThe fillcolor
-
drawOval
Draw a simple oval- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centerw2
- the half widthh2
- the half heightlc
- the line colorfc
- The fillcolor
-
drawUpTriangle
Draw a simple up triangle- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centers2
- the half-widthlc
- the line colorfc
- the fillcolor
-
drawDownTriangle
Draw a simple down triangle- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centers2
- the half-widthlc
- the line colorfc
- tThe fillcolor
-
drawCross
Draw a simple cross- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centers2
- the half-widthlc
- the line color
-
drawX
Draw a simple X symbol.- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centers2
- the half-width widthlc
- the line color
-
drawDiamond
Draw a simple diamond- Parameters:
g
- the graphics contextx
- the horizontal centery
- the vertical centers2
- the half-widthlc
- the line colorfc
- the fillcolor
-