Created
November 4, 2010 15:01
-
-
Save ippa/662583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
... right, still giving you credit everywhere I can for that snippet :)