How to draw a rectangle by using GoDiagram

Please give me a sample to draw some basic diagram,like a rectangle,a line,or a circle,thanks very much.I’m confused with this.

ps:for C#.net winform.

You don’t really draw with GoDiagram. You create graphical objects (GoObjects) and add them to a GoDocument, and associate that with a window (a GoView).



When a GoView needs to be painted it goes through the GoDocument and asks all the GoObjects to paint themselves.



so…



GoRectangle r = new GoRectangle();

r.Location = new PointF(50,50);

r.Size = new SizeF (100,100);

goView1.Document.Add®;



will cause a rectangle of size 100,100 to show up at location 50,50 (up in the top left of the window).



But… since that GoRectangle is also an “object” in the system, it can now be selected, resized, dragged, copied, etc. And, you can set Pen and Brush attributes on the rectangle to change its appearance.

Thanks very very very much.

Could you please show me the whole program about drawing rectangle,I’m afraid I can’t implement it.

We have over 30 sample programs in the evaluation kit.



You could take the MinimalApp sample and drop the code above into the initialization code.

ok,got it!Thanks