-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | A Haskell binding to a subset of the GD graphics library
--   
--   This is a binding to a (currently very small) subset of the GD
--   graphics library.
@package gd
@version 3000.7.3

module Graphics.GD
data Image
type Size = (Int, Int)
type Point = (Int, Int)
type Color = CInt

-- | To access the definition gdBrush from GD
newtype PCREOption
PCREOption :: CInt -> PCREOption
[unPCREOption] :: PCREOption -> CInt

-- | Create a new empty image.
newImage :: Size -> IO Image

-- | Make a copy of an image.
copyImage :: Image -> IO Image

-- | Copy a region of one image into another
copyRegion :: Point -> Size -> Image -> Point -> Image -> IO ()

-- | Copy a region of one image into another, rescaling the region
copyRegionScaled :: Point -> Size -> Image -> Point -> Size -> Image -> IO ()

-- | Creates an image, performs an operation on the image, and frees it.
--   This function allows block scoped management of Image objects.
--   If you are handling large images, the delay before the finalizer which
--   frees the image runs may cause significant temporary extra memory use.
--   Use this function to force the image to be freed as soons as you are
--   done with it. Note that it is unsafe to hold on to the Image
--   after the function is done.
withImage :: IO Image -> (Image -> IO b) -> IO b

-- | Load a JPEG image from a file.
loadJpegFile :: FilePath -> IO Image

-- | Load a JPEG image from a buffer.
loadJpegData :: Int -> Ptr a -> IO Image

-- | Load a JPEG image from a ByteString
loadJpegByteString :: ByteString -> IO Image

-- | Load a PNG image from a file.
loadPngFile :: FilePath -> IO Image

-- | Load a PNG image from a buffer.
loadPngData :: Int -> Ptr a -> IO Image

-- | Load a PNG image from a ByteString
loadPngByteString :: ByteString -> IO Image

-- | Load a GIF image from a file.
loadGifFile :: FilePath -> IO Image

-- | Load a GIF image from a buffer.
loadGifData :: Int -> Ptr a -> IO Image

-- | Load a GIF image from a ByteString
loadGifByteString :: ByteString -> IO Image

-- | Save an image as a JPEG file.
saveJpegFile :: Int -> FilePath -> Image -> IO ()

-- | Write a JPEG format ByteString of an image.
saveJpegByteString :: Int -> Image -> IO ByteString

-- | Save an image as a PNG file.
savePngFile :: FilePath -> Image -> IO ()

-- | Write a PNG format ByteString of an image.
savePngByteString :: Image -> IO ByteString

-- | Save an image as a GIF file.
saveGifFile :: FilePath -> Image -> IO ()

-- | Write a GIF format ByteString of an image.
saveGifByteString :: Image -> IO ByteString

-- | Get the size of an image.
imageSize :: Image -> IO (Int, Int)

-- | Retrieves the color index or the color values of a particular pixel.
getPixel :: (Int, Int) -> Image -> IO Color

-- | Resize an image to a give size.
resizeImage :: Int -> Int -> Image -> IO Image

-- | Rotate an image by a multiple of 90 degrees counter-clockwise.
rotateImage :: Int -> Image -> IO Image

-- | Special character for gdBrushed
brushed :: PCREOption

-- | Set an Image as a brush for an Image
setBrush :: Image -> Image -> IO ()

-- | Fill the entire image with the given color.
fillImage :: Color -> Image -> IO ()
drawFilledRectangle :: Point -> Point -> Color -> Image -> IO ()
drawFilledEllipse :: Point -> Size -> Color -> Image -> IO ()
drawLine :: Point -> Point -> Color -> Image -> IO ()
drawArc :: Point -> Size -> Int -> Int -> Color -> Image -> IO ()

-- | Use anti-aliasing when performing the given drawing function. This can
--   cause a segault with some gd versions.
antiAliased :: (Color -> Image -> IO a) -> Color -> Image -> IO a
setPixel :: Point -> Color -> Image -> IO ()
colorAllocate :: CInt -> CInt -> CInt -> CInt -> Image -> IO Color

-- | Globally switch from using font file names to fontconfig paths | for
--   fonts in drawString (and measureString).
useFontConfig :: Bool -> IO Bool

-- | Draw a string using the FreeType 2.x library
drawString :: String -> Double -> Double -> Point -> String -> Color -> Image -> IO (Point, Point, Point, Point)

-- | Measure a string using the FreeType 2.x library. This computes the
--   bounding box but does not actually draw the string to any image.
measureString :: String -> Double -> Double -> Point -> String -> Color -> IO (Point, Point, Point, Point)

-- | Draw strings around the top and bottom of a torus
drawStringCircle :: Point -> Double -> Double -> Double -> String -> Double -> String -> String -> Color -> Image -> IO ()
rgb :: Int -> Int -> Int -> Color
rgba :: Int -> Int -> Int -> Int -> Color
toRGBA :: Color -> (Int, Int, Int, Int)
saveAlpha :: Bool -> Image -> IO ()
alphaBlending :: Bool -> Image -> IO ()
instance GHC.Show.Show Graphics.GD.PCREOption
instance GHC.Classes.Eq Graphics.GD.PCREOption

module Graphics.GD.ByteString.Lazy
data Image
type Size = (Int, Int)
type Point = (Int, Int)
type Color = CInt

-- | Create a new empty image.
newImage :: Size -> IO Image

-- | Make a copy of an image.
copyImage :: Image -> IO Image

-- | Copy a region of one image into another
copyRegion :: Point -> Size -> Image -> Point -> Image -> IO ()

-- | Copy a region of one image into another, rescaling the region
copyRegionScaled :: Point -> Size -> Image -> Point -> Size -> Image -> IO ()

-- | Creates an image, performs an operation on the image, and frees it.
--   This function allows block scoped management of Image objects.
--   If you are handling large images, the delay before the finalizer which
--   frees the image runs may cause significant temporary extra memory use.
--   Use this function to force the image to be freed as soons as you are
--   done with it. Note that it is unsafe to hold on to the Image
--   after the function is done.
withImage :: IO Image -> (Image -> IO b) -> IO b

-- | Load a JPEG image from a file.
loadJpegFile :: FilePath -> IO Image

-- | Load a JPEG image from a buffer.
loadJpegData :: Int -> Ptr a -> IO Image

-- | Load a JPEG image from a ByteString
loadJpegByteString :: ByteString -> IO Image

-- | Load a PNG image from a file.
loadPngFile :: FilePath -> IO Image

-- | Load a PNG image from a buffer.
loadPngData :: Int -> Ptr a -> IO Image

-- | Load a PNG image from a ByteString
loadPngByteString :: ByteString -> IO Image

-- | Load a GIF image from a file.
loadGifFile :: FilePath -> IO Image

-- | Load a GIF image from a buffer.
loadGifData :: Int -> Ptr a -> IO Image

-- | Load a GIF image from a ByteString
loadGifByteString :: ByteString -> IO Image

-- | Save an image as a JPEG file.
saveJpegFile :: Int -> FilePath -> Image -> IO ()

-- | Write a JPEG format ByteString of an image.
saveJpegByteString :: Int -> Image -> IO ByteString

-- | Save an image as a PNG file.
savePngFile :: FilePath -> Image -> IO ()

-- | Write a PNG format ByteString of an image.
savePngByteString :: Image -> IO ByteString

-- | Save an image as a GIF file.
saveGifFile :: FilePath -> Image -> IO ()

-- | Write a GIF format ByteString of an image.
saveGifByteString :: Image -> IO ByteString

-- | Get the size of an image.
imageSize :: Image -> IO (Int, Int)

-- | Retrieves the color index or the color values of a particular pixel.
getPixel :: (Int, Int) -> Image -> IO Color

-- | Resize an image to a give size.
resizeImage :: Int -> Int -> Image -> IO Image

-- | Rotate an image by a multiple of 90 degrees counter-clockwise.
rotateImage :: Int -> Image -> IO Image

-- | Fill the entire image with the given color.
fillImage :: Color -> Image -> IO ()
drawFilledRectangle :: Point -> Point -> Color -> Image -> IO ()
drawFilledEllipse :: Point -> Size -> Color -> Image -> IO ()
drawLine :: Point -> Point -> Color -> Image -> IO ()
drawArc :: Point -> Size -> Int -> Int -> Color -> Image -> IO ()

-- | Use anti-aliasing when performing the given drawing function. This can
--   cause a segault with some gd versions.
antiAliased :: (Color -> Image -> IO a) -> Color -> Image -> IO a
setPixel :: Point -> Color -> Image -> IO ()

-- | Globally switch from using font file names to fontconfig paths | for
--   fonts in drawString (and measureString).
useFontConfig :: Bool -> IO Bool

-- | Draw a string using the FreeType 2.x library
drawString :: ByteString -> Double -> Double -> Point -> ByteString -> Color -> Image -> IO (Point, Point, Point, Point)

-- | Measure a string using the FreeType 2.x library. This computes the
--   bounding box but does not actually draw the string to any image.
measureString :: ByteString -> Double -> Double -> Point -> ByteString -> Color -> IO (Point, Point, Point, Point)

-- | Draw strings around the top and bottom of a torus
drawStringCircle :: Point -> Double -> Double -> Double -> ByteString -> Double -> ByteString -> ByteString -> Color -> Image -> IO ()
rgb :: Int -> Int -> Int -> Color
rgba :: Int -> Int -> Int -> Int -> Color
toRGBA :: Color -> (Int, Int, Int, Int)

module Graphics.GD.ByteString
data Image
type Size = (Int, Int)
type Point = (Int, Int)
type Color = CInt

-- | Create a new empty image.
newImage :: Size -> IO Image

-- | Make a copy of an image.
copyImage :: Image -> IO Image

-- | Copy a region of one image into another
copyRegion :: Point -> Size -> Image -> Point -> Image -> IO ()

-- | Copy a region of one image into another, rescaling the region
copyRegionScaled :: Point -> Size -> Image -> Point -> Size -> Image -> IO ()

-- | Creates an image, performs an operation on the image, and frees it.
--   This function allows block scoped management of Image objects.
--   If you are handling large images, the delay before the finalizer which
--   frees the image runs may cause significant temporary extra memory use.
--   Use this function to force the image to be freed as soons as you are
--   done with it. Note that it is unsafe to hold on to the Image
--   after the function is done.
withImage :: IO Image -> (Image -> IO b) -> IO b

-- | Load a JPEG image from a file.
loadJpegFile :: FilePath -> IO Image

-- | Load a JPEG image from a buffer.
loadJpegData :: Int -> Ptr a -> IO Image

-- | Load a JPEG image from a ByteString
loadJpegByteString :: ByteString -> IO Image

-- | Load a PNG image from a file.
loadPngFile :: FilePath -> IO Image

-- | Load a PNG image from a buffer.
loadPngData :: Int -> Ptr a -> IO Image

-- | Load a PNG image from a ByteString
loadPngByteString :: ByteString -> IO Image

-- | Load a GIF image from a file.
loadGifFile :: FilePath -> IO Image

-- | Load a GIF image from a buffer.
loadGifData :: Int -> Ptr a -> IO Image

-- | Load a GIF image from a ByteString
loadGifByteString :: ByteString -> IO Image

-- | Save an image as a JPEG file.
saveJpegFile :: Int -> FilePath -> Image -> IO ()

-- | Write a JPEG format ByteString of an image.
saveJpegByteString :: Int -> Image -> IO ByteString

-- | Save an image as a PNG file.
savePngFile :: FilePath -> Image -> IO ()

-- | Write a PNG format ByteString of an image.
savePngByteString :: Image -> IO ByteString

-- | Save an image as a GIF file.
saveGifFile :: FilePath -> Image -> IO ()

-- | Write a GIF format ByteString of an image.
saveGifByteString :: Image -> IO ByteString

-- | Get the size of an image.
imageSize :: Image -> IO (Int, Int)

-- | Retrieves the color index or the color values of a particular pixel.
getPixel :: (Int, Int) -> Image -> IO Color

-- | Resize an image to a give size.
resizeImage :: Int -> Int -> Image -> IO Image

-- | Rotate an image by a multiple of 90 degrees counter-clockwise.
rotateImage :: Int -> Image -> IO Image

-- | Fill the entire image with the given color.
fillImage :: Color -> Image -> IO ()
drawFilledRectangle :: Point -> Point -> Color -> Image -> IO ()
drawFilledEllipse :: Point -> Size -> Color -> Image -> IO ()
drawLine :: Point -> Point -> Color -> Image -> IO ()
drawArc :: Point -> Size -> Int -> Int -> Color -> Image -> IO ()

-- | Use anti-aliasing when performing the given drawing function. This can
--   cause a segault with some gd versions.
antiAliased :: (Color -> Image -> IO a) -> Color -> Image -> IO a
setPixel :: Point -> Color -> Image -> IO ()

-- | Globally switch from using font file names to fontconfig paths | for
--   fonts in drawString (and measureString).
useFontConfig :: Bool -> IO Bool

-- | Draw a string using the FreeType 2.x library
drawString :: ByteString -> Double -> Double -> Point -> ByteString -> Color -> Image -> IO (Point, Point, Point, Point)

-- | Measure a string using the FreeType 2.x library. This computes the
--   bounding box but does not actually draw the string to any image.
measureString :: ByteString -> Double -> Double -> Point -> ByteString -> Color -> IO (Point, Point, Point, Point)

-- | Draw strings around the top and bottom of a torus
drawStringCircle :: Point -> Double -> Double -> Double -> ByteString -> Double -> ByteString -> ByteString -> Color -> Image -> IO ()
rgb :: Int -> Int -> Int -> Color
rgba :: Int -> Int -> Int -> Int -> Color
toRGBA :: Color -> (Int, Int, Int, Int)
