Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
21
Task/Bitmap/Julia/bitmap-6.julia
Normal file
21
Task/Bitmap/Julia/bitmap-6.julia
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
function showpixel(a::Image, x::Int, y::Int)
|
||||
c = color(a, x, y)
|
||||
hex(c.r, 2)*hex(c.g, 2)*hex(c.b, 2)
|
||||
end
|
||||
|
||||
w = 5
|
||||
h = 7
|
||||
a = Image(w, h)
|
||||
|
||||
purple = Color(0xff, 0, 0xff)
|
||||
green = Color(0, 0xff, 0)
|
||||
|
||||
fill!(a, purple)
|
||||
splat!(a, 2, 3, green)
|
||||
|
||||
for i in 1:h
|
||||
for j in 1:w
|
||||
print(showpixel(a, j, i), " ")
|
||||
end
|
||||
println()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue