[Gtk-sharp-list] Some diacanvas# extension

Mario Carrion marioc@unixmexico.org
Tue, 27 Jul 2004 23:58:40 -0500 (CDT)


Hello list

I've been trying to extend the diacanvas# for starting a new project, but
I still can't draw my own DiaItems, does anyone knows why?

--- code start --
using Dia;
using System;
using GLib;

namespace UML
{
        public class Comment :  CanvasElement
        {
                Shape myShape, myShape1;

                public Comment()
                {
                        this.Height = 100;
                        this.Width = 100;
                        this.Move(50.0, 50.0);
                }

                protected override void OnNeedUpdate()
                {

                        this.myShape = new Shape(Dia.ShapeType.Path);
                        this.myShape.Color = 8327327;
                        this.myShape.Line(new Dia.Point(50.0,0.0), new
Dia.Point(50.0,0.0));
                        this.myShape.Visibility =
Dia.ShapeVisibility.Visible;

                        this.myShape1 = new Shape(Dia.ShapeType.Path);
                        this.myShape1.Color = 8327327;
                        this.myShape1.Line(new Dia.Point(170.0,0.0), new
Dia.Point(150.0,100.0));
                }
     }

}
--- code end --

Thanks to all
---
Mario Carrion