I am writing a desktop application which need vectorial graphics with zoom an pan.
Forum readings show that Group2D is a handy way to do that.
So I have :
- a windows with a canvas named Canvas1
- a picture PictGraph
- a Group2d VectGraph
Into Canvas1.paint I have
g.DrawPicture PictGraph, 0, 0
In windows.opening :
Var VectGraph as new Group2D Var PictGraph as new Picture (1000,1000,32) // Add a rectangle to VectGraph Var a as new RectShape a.Height = 50 a.Width = 20 a.X = 100 a.Y = 50 a.FillColor = color.rgb(255, 0, 0) VectGraph.AddObject(a) // Add the Group2D to PictGraph PictGraph.Graphics.DrawObject VectGraph, 0, 0 // Update Canvas1 Canvas1.Invalidate
The app is running but I expect to get a rectangle into the canvas and… nothing displayed !
For sure I do something wrong but I dont understand what.
Any help appreciated.