I'm having trouble finding example code that uses Regions in the
Haskell Graphics Library. But the following gives me a black window
when I think it should give me a black window with a square in it:

------------------ START CODE ------------------------------------------

import Graphics.HGL

main = runGraphics test

test = do
    w <- openWindow "Test" (100,100)
    drawInWindow w $ withRGB (RGB 255 255 255) testRegion
    getLBP w
    closeWindow w


testRegion = regionToGraphic $ rectangleRegion (5,5) (30,30)

------------------ END CODE ------------------------------------------

Am I using it correctly? If I am, then any other help is greatly appreciated.

I am on Debian Squeeze using GHC 6.12.1 (thanks debian maintainers!),
and using HGL-3.2.0.2

Thanks,
Brandon Simmons
http://coder.bsimmons.name
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to