Skip to content

Instantly share code, notes, and snippets.

@ippa
Created November 4, 2010 15:01
Show Gist options
  • Save ippa/662583 to your computer and use it in GitHub Desktop.
Save ippa/662583 to your computer and use it in GitHub Desktop.
#
# Draws an unfilled circle, thanks shawn24!
#
CIRCLE_STEP = 10
def draw_circle(cx,cy,r,color)
0.step(360, CIRCLE_STEP) do |a1|
a2 = a1 + CIRCLE_STEP
$window.draw_line cx + Gosu.offset_x(a1, r), cy + Gosu.offset_y(a1, r), color, cx + Gosu.offset_x(a2, r), cy + Gosu.offset_y(a2, r), color, 9999
end
end
@shawn42
Copy link

shawn42 commented Nov 4, 2010

@ippa
Copy link
Author

ippa commented Nov 5, 2010

... right, still giving you credit everywhere I can for that snippet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment