# Draw\_poly\_polygon

**URL:** <https://www.ruby-forum.com/t/draw-poly-polygon/130005>\
**Category:** wxRuby\
**Created:** [February 24, 2008, 3:16am UTC](https://www.ruby-forum.com/t/draw-poly-polygon/130005 "2008-02-24T03:16:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doncarlosx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@doncarlosx](https://www.ruby-forum.com/u/doncarlosx)\
**Post date:** [February 24, 2008, 3:16am UTC](https://www.ruby-forum.com/t/draw-poly-polygon/130005/1 "2008-02-24T03:16:18Z")

</div>

Hey everyone,

I keep getting

in `draw\_poly\_polygon’: in method ‘DrawPolyPolygon’, argument 3 of type  
‘int []’ (TypeError)

from the docs I think it wants

g.draw\_poly\_polygon 2, [1, 2, 3, 4, 5, 6], [Wx::Point.new(25, 0),  
Wx::Point.new(75, 0), Wx::Point.new(100, 50), Wx::Point.new(75, 100),  
Wx::Point.new(25, 100), Wx::Point.new(0, 50)]

but it just won’t fly.

Can anyone tell me how to use draw\_poly\_polygon correctly?

Thanks!  
Carl

---

<div class="post-metadata">

**Author:** ![doncarlosx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@doncarlosx](https://www.ruby-forum.com/u/doncarlosx)\
**Post date:** [February 27, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/draw-poly-polygon/130005/2 "2008-02-27T12:12:18Z")

</div>

Hi Carl

Carl Y. wrote:

> in `draw\_poly\_polygon’: in method ‘DrawPolyPolygon’, argument 3 of type  
> ‘int ’ (TypeError)
> 
> from the docs I think it wants
> 
> g.draw\_poly\_polygon 2, [1, 2, 3, 4, 5, 6], [Wx::Point.new(25, 0),  
> Wx::Point.new(75, 0), Wx::Point.new(100, 50), Wx::Point.new(75, 100),  
> Wx::Point.new(25, 100), Wx::Point.new(0, 50)]

Thanks for the report; seems this method isn’t currently set up  
correctly in wxRuby. Just stick to using draw\_polygon for now.

I’ll have a look at fixing this bug for the next release. I think the  
method signature in ruby would simply be:

draw\_poly\_polygon([[array of points], [array of points], [array of  
points]], offset\_x, offset\_y, rule)

alex
