view gui.d @ 1:c18e3f93d114

Implemented Rectangle2
author David Bryant <daveb@acres.com.au>
date Wed, 13 May 2009 17:50:25 +0930
parents e907d2c54ec3
children d6f44347373d
line wrap: on
line source

module gui;

import canvas;
import handler;

import gtk.Main;
import gtk.MainWindow;

import tk.geometry;
import tk.types;
import tk.events;

import std.stdio;
import tk.geometry2;

void main(string[] args) {
    /*
    Main.init(args);
    auto window = new MainWindow("Title");
    auto event_handler = new ToolStack();
    auto canvas = new Canvas(event_handler);
    window.add(canvas);
    window.showAll();
    Main.run();
    */

    Point2 p1 = Point2(3.0, 5.0);
    writefln("%s", p1);

    Point2 p2 = Point2(1.0, 2.0);
    writefln("%s", p2);

    writefln("%s", p1 - p2);

    Rectangle2 r = Rectangle2(p1, p2);
    writefln("%s", r);
}