|
|
Rank: Newbie Groups: Member
Joined: 3/18/2008 Posts: 8 Points: 24
|
We are evaluate your product trying to show object on a bitmapviewer. We follow your example adding this code to your main example: Code:
private void DrawObject()
{
Aurigma.GraphicsMill.WinControls.RectangleVObject rectangle = new
Aurigma.GraphicsMill.WinControls.RectangleVObject(100, 100, 200, 200);
rectangle.Pen = new System.Drawing.Pen(System.Drawing.Color.Black, 5F);
rectangle.Brush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
vObj.Layers[0].VObjects.Clear();
vObj.Layers[0].VObjects.Add(rectangle);
Aurigma.GraphicsMill.Bitmap renderedVObjects = new Aurigma.GraphicsMill.Bitmap();
[u]renderedVObjects = vObj.RenderWorkspace();[/u]
renderedVObjects.Draw(bitmapViewerMainView.Bitmap, 0, 0, bitmapViewerMainView.Bitmap.Width,
bitmapViewerMainView.Bitmap.Height, Aurigma.GraphicsMill.Transforms.CombineMode.Alpha,
1f, Aurigma.GraphicsMill.Transforms.InterpolationMode.HighSpeed);
vObj.Layers[0].VObjects.Clear();
}
The method renderedVObjects = vObj.RenderWorkspace(); raise a null reference error. Why this appens? thank's a lot
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 386 Points: 403
|
Hello, Because VObjectsRubberband should be connected to the BitmapViewer control during rendering. You should add such line to your code: Code:
bitmapViewerMainView.Rubberband = vObj;
Please, let me know if it will not work in your case. It works in mine
Best wishes, Alex.
|
|
Rank: Newbie Groups: Member
Joined: 3/18/2008 Posts: 8 Points: 24
|
Thank you for your answer, now it's work. While we are evaluating the product I explain the need of our application: 1) load images of various types, especially TIFF 2) zoom in and out and get mouse coordinate (This images are map images on wich we must put objects) 3) put objects (rectangle, line circle, or small image) on the map 4) using mouse to select, move and delete this objects 5) add propeties to this object and get them when we select the object 6) change object position and dimension by code 7) save image and object in a file to reload later 8) merge objects in the image.
Do you think that your product is able to do that?
Thank again.
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 386 Points: 403
|
Hello, Yes, I think that it will be possible to implement all points with Vector Objects. The main 2 questions - how large are these maps? And - in what format do you plan to save vector objects and TIFF? If you wish, we can dicsuss these questions via support case system instead of public forum. Just submit case with your answer .
Best wishes, Alex.
|
|
|
Guest |