Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Software
Pixelyeet
Commits
455e0712
Commit
455e0712
authored
Apr 12, 2020
by
Nicolas Lenz
Browse files
commit stuff from long ago
parent
e4ee17c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Main.hs
View file @
455e0712
...
...
@@ -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
)
yeet
Pixel
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment