From: Chris M. <ch...@cm...> - 2006-12-15 01:41:13
|
Hi, I am using the wxHaskell library built from the Darcs repository at haskell.org, with wxWidgets "gtk-2.6.3" and GHC 6.6. I am trying to draw a polygon with the "polygon" function, but it isn't doing what I expected. I wrote the following program: > import Graphics.UI.WX > > main = start go > > go = frame [on paint := p] > > p dc view = polygon dc [(pt 50 50), (pt 100 50), (pt 75 100)] [] and I expected to get a an isosceles triangle like this (ASCII art): ------- \ / \ / v but instead, I get this: http://www.cmears.id.au/triangle.png >From some experimentation, it seems that the first line is drawn correctly, but the subsequent ones are drawn from the origin instead of from the previous point, and the last point is ignored altogether. Also, I ran the "Camels" sample program in samples/contrib/ and it looks like this: http://www.cmears.id.au/camels.png Can anyone help me understand what is happening? Thanks, Chris |