MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / draw

Method draw

src/org/opensourcephysics/display/Circle.java:66–72  ·  view source on GitHub ↗

Draws the circle. @param panel @param g

(DrawingPanel panel, Graphics g)

Source from the content-addressed store, hash-verified

64 * @param g
65 */
66 @Override
67public void draw(DrawingPanel panel, Graphics g) {
68 int xpix = panel.xToPix(x)-pixRadius;
69 int ypix = panel.yToPix(y)-pixRadius;
70 g.setColor(color);
71 g.fillOval(xpix, ypix, 2*pixRadius, 2*pixRadius); // draw the circle onto the screen
72 }
73
74 /**
75 * Gets the x coordinate.

Callers

nothing calls this directly

Calls 4

fillOvalMethod · 0.80
xToPixMethod · 0.45
yToPixMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected