# Drawing polygons with Ruby/SDL

**URL:** <https://www.ruby-forum.com/t/drawing-polygons-with-ruby-sdl/108962>\
**Category:** Ruby\
**Created:** [July 10, 2007, 2:36am UTC](https://www.ruby-forum.com/t/drawing-polygons-with-ruby-sdl/108962 "2007-07-10T02:36:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 10, 2007, 2:36am UTC](https://www.ruby-forum.com/t/drawing-polygons-with-ruby-sdl/108962/1 "2007-07-10T02:36:14Z")

</div>

Hi.  
I’m learning to use Ruby/SDL to write a simple game.  
However, I have a trouble to find methods that draws polygons (SDL has  
them  
and I thought Ruby/SDL also does.)  
How can I draw polygons using Ruby/SDL?  
Thank you.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 11, 2007, 4:06am UTC](https://www.ruby-forum.com/t/drawing-polygons-with-ruby-sdl/108962/2 "2007-07-11T04:06:40Z")

</div>

On Tue, 10 Jul 2007 09:34:31 +0900  
“Sun P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi.  
> I’m learning to use Ruby/SDL to write a simple game.  
> However, I have a trouble to find methods that draws polygons (SDL has them  
> and I thought Ruby/SDL also does.)  
> How can I draw polygons using Ruby/SDL?  
> Thank you.

If you are talking about drawing circles, squares, etc,  
you can use the Surface methods listed on the reference[1]

Steven D.

[1] [Ruby/SDL Reference Manual](http://www.kmc.gr.jp/~ohai/rubysdl_doc.en.html#label-59)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 11, 2007, 7:44am UTC](https://www.ruby-forum.com/t/drawing-polygons-with-ruby-sdl/108962/3 "2007-07-11T07:44:53Z")

</div>

Thanks, but what I want is drawing shapes with an array of points…

2007/7/11, Steven D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
