ウィンドウに完全な画像を表示するためにwxHaskellを使用しています。私のコードは次のとおりです。
import Graphics.UI.WX
import Graphics.UI.WXCore
main :: IO ()
main = start testimg
testimg :: IO ()
testimg = do
f <- frame [text := "Test Image"]
p <- panel f []
image <- bitmapCreateFromFile "landscape.png"
imagep <- panel p [ on paint := onPaint image ]
set f [ layout:= fill $ container p $ widget imagep ]
where
onPaint image dc rect = drawBitmap dc image pointZero True []
とにかく、アプリを実行すると何も表示されません (ウィンドウの境界線も表示されません)。どうすればそれを機能させることができますか?