Sha256: a085e4a03f5be954f4adee5d89a6fe7b994aeeb2d7b629e5174738119e0d4808

Contents?: true

Size: 535 Bytes

Versions: 1

Compression:

Stored size: 535 Bytes

Contents

#!/usr/bin/env ruby
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.

require "sgl/cocoa"

def setup
  window 700, 700
  backgroundHSV 66, 100, 20
  $font1 = font("Helvetica", 25)
end

def display
  x, y = mouseX, mouseY
  colorHSV 0, 50, 100
  lineWidth 3
  line   0,   0, x, y
  line 700,   0, x, y
  line   0, 700, x, y
  line 700, 700, x, y
  colorHSV 0, 100, 100

  translate x, y
  rotateZ y
  colorHSV y, 100, 100
  $font1.text(10, 10, "hello")
  rect -10, -10, +10, +10
end

mainloop

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sgl-1.0.0 examples/cocoa3-affine.rb