Sha256: 9306c5dbcf8a488a55db37d66dbb4084e9ce41f044cabe32cf9c27d89aeffaf7

Contents?: true

Size: 381 Bytes

Versions: 1

Compression:

Stored size: 381 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-1.0.0 examples/sample15.rb