Why is this Haskell SDL line cyan when it should be white? -


To draw a diagonal line below, there is some code for using SDL. Haskell I get a CAN line when RGB is clear Must be white in appearance This is on Ubuntu, am I doing something wrong?

  Import the appropriate graphics. SDL Importable Graphics as UI SDL UI SDL Preferences as SDLP = SDL.init SDL.InitEverything] SDL.setVideoMode 640 480 32 [] SDL.setCaption "My Window" "My Test" Surf 0 & lt; - SDL.getVideoSurface white & lt; - SDL.mapRGB (SDL.surfaceGetPixelFormat Surf 0) 255 255 255 SDLP.line Surf 06040 480 White SDL Flip Surf 4 eventLoop SDL.quit print "done" where eventLoop = SDL.waitEventBlocking & gt; & Gt; = Check event event (SDL.KeyUp _) = return () Check the document _ = eventLoop  

< P> Maybe a less filthy hack (though maybe the platform / implementation dependent):

  Import Import GHC.Word Import Data Bits = One RGB Color: Word 8 → Word 8 → Word 8 → Pixels RGBAclore RGB = Pixels (Pertile (fi) 24. Transitions (fi) 16. Parallel (fi) 8. fi55))  

Comments