stefano1403#8840
We are evaluate your product trying to show object on a bitmapviewer. We follow your example adding this code to your main example:
The method renderedVObjects = vObj.RenderWorkspace(); raise a null reference error.
Why this appens?
thank's a lot
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