Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Draw-a-pixel/Julia/draw-a-pixel.julia
Normal file
18
Task/Draw-a-pixel/Julia/draw-a-pixel.julia
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using Gtk, Graphics
|
||||
|
||||
const can = @GtkCanvas()
|
||||
const win = GtkWindow(can, "Draw a Pixel", 320, 240)
|
||||
|
||||
draw(can) do widget
|
||||
ctx = getgc(can)
|
||||
set_source_rgb(ctx, 255, 0, 0)
|
||||
move_to(ctx, 100, 100)
|
||||
line_to(ctx, 101,100)
|
||||
stroke(ctx)
|
||||
end
|
||||
|
||||
show(can)
|
||||
const cond = Condition()
|
||||
endit(w) = notify(cond)
|
||||
signal_connect(endit, win, :destroy)
|
||||
wait(cond)
|
||||
Loading…
Add table
Add a link
Reference in a new issue