Sha256: 6a3b9efe85590e32a7776366d19df196cc053d75f647e06de2b80acb33365d41

Contents?: true

Size: 357 Bytes

Versions: 1

Compression:

Stored size: 357 Bytes

Contents

require "sgl"

def setup
  window 100, 100
end

def my_rect(x1, y1, x2, y2, outline, fill)
  color fill
  rect x1, y1, x2, y2
  color outline
  line x1, y1, x2, y1
  line x2, y1, x2, y2
  line x2, y2, x1, y2
  line x1, y2, x1, y1
end

def display
  mx = mouseX
  my = mouseY
  my_rect(20, 20, 40, 30, 80, 50)
  my_rect(60, 60, 80, 90, 90, 30)
end

mainloop

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sgl-0.4.0 examples/sample15.rb