Forums

Welcome Guest Search | Active Topics | Members

Error on renderworkspace Options
stefano1403
Posted: Tuesday, April 01, 2008 6:44:21 AM
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()
        {
            //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

Alex Kon
Posted: Wednesday, April 02, 2008 3:07:28 AM
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.
stefano1403
Posted: Thursday, April 03, 2008 12:58:41 AM
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.
Alex Kon
Posted: Monday, April 07, 2008 12:41:45 AM
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.
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.