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
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