@@ -16,9 +16,7 @@ throwing an 'SDLException' in case it encounters an error.
1616
1717-}
1818
19- {-# LANGUAGE DeriveGeneric #-}
20- {-# LANGUAGE LambdaCase #-}
21- {-# LANGUAGE OverloadedStrings #-}
19+ {-# LANGUAGE DeriveGeneric, LambdaCase, OverloadedStrings #-}
2220
2321module SDL.Font
2422 (
@@ -86,27 +84,27 @@ module SDL.Font
8684 , blendedWrapped
8785 ) where
8886
89- import Control.Exception (throwIO )
90- import Control.Monad (unless )
87+ import Control.Exception (throwIO )
88+ import Control.Monad (unless )
9189import Control.Monad.IO.Class (MonadIO , liftIO )
92- import Data.Bits ((.&.) , (.|.) )
93- import Data.ByteString (ByteString )
94- import Data.ByteString.Unsafe (unsafeUseAsCStringLen , unsafePackCString )
95- import Data.Text (Text )
96- import Data.Text.Encoding (decodeUtf8 )
97- import Data.Text.Foreign (lengthWord16 , unsafeCopyToPtr )
98- import Data.Word ( Word8 , Word16 )
99- import Foreign.C.String (CString , withCString )
100- import Foreign.C.Types ( CUShort , CInt )
101- import Foreign.Marshal.Alloc ( allocaBytes , alloca )
102- import Foreign.Marshal.Utils ( with , fromBool , toBool )
103- import Foreign.Ptr (Ptr , castPtr , nullPtr )
104- import Foreign.Storable (peek , pokeByteOff )
105- import GHC.Generics (Generic )
106- import SDL ( Surface ( .. ), SDLException ( SDLCallFailed ))
90+ import Data.Bits ((.&.) , (.|.) )
91+ import Data.ByteString (ByteString )
92+ import Data.ByteString.Unsafe (unsafePackCString , unsafeUseAsCStringLen )
93+ import Data.Text (Text )
94+ import Data.Text.Encoding (decodeUtf8 )
95+ import Data.Text.Foreign (lengthWord16 , unsafeCopyToPtr )
96+ import Data.Word ( Word16 , Word8 )
97+ import Foreign.C.String (CString , withCString )
98+ import Foreign.C.Types ( CInt , CUShort )
99+ import Foreign.Marshal.Alloc ( alloca , allocaBytes )
100+ import Foreign.Marshal.Utils ( fromBool , toBool , with )
101+ import Foreign.Ptr (Ptr , castPtr , nullPtr )
102+ import Foreign.Storable (peek , pokeByteOff )
103+ import GHC.Generics (Generic )
104+ import SDL ( SDLException ( SDLCallFailed ), Surface ( .. ))
107105import SDL.Internal.Exception
108- import SDL.Raw.Filesystem (rwFromConstMem )
109- import SDL.Vect (V4 (.. ))
106+ import SDL.Raw.Filesystem (rwFromConstMem )
107+ import SDL.Vect (V4 (.. ))
110108
111109import qualified SDL.Raw
112110import qualified SDL.Raw.Font
@@ -505,7 +503,7 @@ blendedGlyph (Font font) (V4 r g b a) ch =
505503 with (SDL.Raw. Color r g b a) $ \ fg ->
506504 SDL.Raw.Font. renderGlyph_Blended font (fromChar ch) fg
507505
508- -- | Same as 'blended', but renders across multiple lines.
506+ -- | Same as 'blended', but renders across multiple lines.
509507-- Text is wrapped to multiple lines on line endings and on word boundaries
510508-- if it extends beyond wrapLength in pixels.
511509blendedWrapped :: MonadIO m => Font -> Color -> Int -> Text -> m SDL. Surface
0 commit comments