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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users