This is a migrated thread and some comments may be shown as answers.

Shape - Programmatic creation with dynamic vertices and points

0 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
rei
Top achievements
Rank 1
rei asked on 16 Nov 2010, 07:02 AM
Hi,

I'm trying to  use Telerik reporting to generate a report which plots the coordinates of an area on a table. I already have the function which converts the lat/long to X, Y values but im having trouble drawing the shape in my report.

Is it possible  to  programmatically create a shape and specify the points (x,y values)  ?
I was able to create the shape programmatically, but it is always displayed as a regular shaped polygon. 

 Please see my sample code below

PolygonShape shape1 = new PolygonShape ();
shape1.addLine (new PointF(0,0), new PointF(2,0));
shape1.addLine (new PointF(2,0), new PointF(3,2));
shape1.addLine (new PointF(3,2), new PointF(1,2));
shape1.addLine (new PointF(1,2), new PointF(0,0));

Shape shape2 =  new Shape();
shape2.ShapeType  = shape1 ;

Thanks




No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
rei
Top achievements
Rank 1
Share this question
or