module Brillo.Rendering (
Picture (..),
Point,
Vector,
Path,
Color,
makeColor,
makeColorI,
makeRawColor,
makeRawColorI,
rgbaOfColor,
clampColor,
Rectangle (..),
BitmapData,
bitmapSize,
BitmapFormat (..),
PixelFormat (..),
RowOrder (..),
bitmapOfForeignPtr,
bitmapDataOfForeignPtr,
bitmapOfByteString,
bitmapDataOfByteString,
bitmapOfBMP,
bitmapDataOfBMP,
loadBMP,
displayPicture,
renderPicture,
withModelview,
withClearBuffer,
RS.initState,
RS.State,
)
where
import Brillo.Internals.Data.Color
import Brillo.Internals.Data.Picture
import Brillo.Internals.Rendering.Common
import Brillo.Internals.Rendering.Picture
import Brillo.Internals.Rendering.State qualified as RS
displayPicture
:: (Int, Int)
-> Color
-> RS.State
-> Float
-> Picture
-> IO ()
displayPicture :: (Int, Int) -> Color -> State -> Float -> Picture -> IO ()
displayPicture (Int, Int)
windowSize Color
colorClear State
state Float
scale Picture
picture =
(Int, Int) -> IO () -> IO ()
withModelview (Int, Int)
windowSize (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
Color -> IO () -> IO ()
withClearBuffer Color
colorClear (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
State -> Float -> Picture -> IO ()
renderPicture State
state Float
scale Picture
picture