examples/cocoa10-transparent.rb in sgl-0.4.0 vs examples/cocoa10-transparent.rb in sgl-1.0.0

- old
+ new

@@ -1,26 +1,26 @@ -#!/usr/bin/env ruby -# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved. - -require "sgl/cocoa" - -def setup - $windowBorder = 0 - $windowShadow = 0 - window 700, 700 - backgroundHSV 66, 100, 20, 100 -end - -def display - x, y = mouseX, mouseY - colorHSV 0, 50, 100 - backgroundHSV 66, 100, 20, y/7 - 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 - rect x-10, y-10, x+10, y+10 -end - -mainloop +#!/usr/bin/env ruby +# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved. + +require "sgl/cocoa" + +def setup + $windowBorder = 0 + $windowShadow = 0 + window 700, 700 + backgroundHSV 66, 100, 20, 100 +end + +def display + x, y = mouseX, mouseY + colorHSV 0, 50, 100 + backgroundHSV 66, 100, 20, y/7 + 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 + rect x-10, y-10, x+10, y+10 +end + +mainloop