Package cnuphys.splot.style
Class SymbolDraw
java.lang.Object
cnuphys.splot.style.SymbolDraw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDraw a simple crossstatic voiddrawDiamond(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple diamondstatic voiddrawDownTriangle(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple down trianglestatic voiddrawGhostSymbol(Graphics g, int x, int y, IStyled style) Draws the appropriate symbol at the provided screen location.static voidDraw a simple ovalstatic voiddrawRectangle(Graphics g, int x, int y, int w2, int h2, Color lc, Color fc) Draw a simple rectanglestatic voiddrawSymbol(Graphics g, int x, int y, IStyled style) Draws the appropriate symbol at the provided screen location.static voiddrawSymbol(Graphics g, int x, int y, SymbolType symbol, int symbolSize, Color lineColor, Color fillColor) Draws the appropriate symbol at the provided screen location.static voiddrawUpTriangle(Graphics g, int x, int y, int s2, Color lc, Color fc) Draw a simple up trianglestatic voidDraw 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
-