Created
April 23, 2009 13:00
-
-
Save ldfallas/100488 to your computer and use it in GitHub Desktop.
A small example of creating a Gtk# DrawingArea with Boo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BooGtkTest | |
import System | |
import Gtk | |
import Cairo | |
class DrawingTestWidget(DrawingArea): | |
public def constructor(): | |
self.ExposeEvent += ExposeHandler | |
def ExposeHandler(o as object, ea as ExposeEventArgs): | |
Console.WriteLine("Aqui") | |
area = o as DrawingArea | |
using context = Gdk.CairoHelper.Create (area.GdkWindow): | |
context.Color = Color (0,0255,0) | |
context.Rectangle (0, 0, 90, 90) | |
context.Fill() | |
(context.Target as IDisposable).Dispose() | |
ea.RetVal = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment