Commit 455e0712 authored by Nicolas Lenz's avatar Nicolas Lenz

commit stuff from long ago

parent e4ee17c1
......@@ -9,6 +9,7 @@ import Codec.Picture
main :: IO ()
main = do
[file] <- getArgs
ctx <- initConnectionContext
con <- connectTo ctx $ ConnectionParams
{ connectionHostname = "localhost"
......@@ -16,15 +17,9 @@ main = do
, connectionUseSecure = Nothing
, connectionUseSocks = Nothing
}
yeet con 20 30 (PixelRGB8 255 0 0)
yeetPixel con 20 30 (PixelRGB8 255 0 0)
connectionClose con
data Pixel = Pixel {
pixelX :: Int,
pixelY :: Int,
pixelColor :: PixelRGB8
}
yeet :: Connection -> Int -> Int -> PixelRGB8 -> IO ()
yeet con x y (PixelRGB8 r g b) = connectionPut con $ T.encodeUtf8
yeetPixel :: Connection -> Int -> Int -> PixelRGB8 -> IO ()
yeetPixel con x y (PixelRGB8 r g b) = connectionPut con $ T.encodeUtf8
$ T.pack $ printf "PX %d %d %02x%02x%02x\n" x y r g b
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment