Rank: Newbie
Groups: Guest
Joined: 3/17/2008(UTC) Posts: 8
|
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()
{
//Create a rectangle object
Aurigma.GraphicsMill.WinControls.RectangleVObject rectangle = new
Aurigma.GraphicsMill.WinControls.RectangleVObject(100, 100, 200, 200);
//Modify stroke and fill parameters
rectangle.Pen = new System.Drawing.Pen(System.Drawing.Color.Black, 5F);
rectangle.Brush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
//Add the rectangle to a layer
vObj.Layers[0].VObjects.Clear();
vObj.Layers[0].VObjects.Add(rectangle);
//Render the rectangle to a bitmap
Aurigma.GraphicsMill.Bitmap renderedVObjects = new Aurigma.GraphicsMill.Bitmap();
[u]renderedVObjects = vObj.RenderWorkspace();[/u]
////Merge the two bitmaps
renderedVObjects.Draw(bitmapViewerMainView.Bitmap, 0, 0, bitmapViewerMainView.Bitmap.Width,
bitmapViewerMainView.Bitmap.Height, Aurigma.GraphicsMill.Transforms.CombineMode.Alpha,
1f, Aurigma.GraphicsMill.Transforms.InterpolationMode.HighSpeed);
////Clear the rubberband workspace
vObj.Layers[0].VObjects.Clear();
}
The method renderedVObjects = vObj.RenderWorkspace(); raise a null reference error. Why this appens? thank's a lot Edited by user Thursday, May 22, 2008 2:00:13 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
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 Edited by user Sunday, April 6, 2008 3:36:08 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 3/17/2008(UTC) Posts: 8
|
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: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
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 . Edited by user Thursday, May 22, 2008 2:01:20 PM(UTC)
| Reason: Not specified |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.