Can you please clarify how to add gradient color to the shape built with polyline? Help file is not very explanative.
The first question is adding Boundaries. Does it mean that I have to always use 2DBoundaryList to add them?
Can I add any entity as a border? And where I can find BoundaryType values?
I tryed the following code based on your examples for adding hatch (pline - existing 3D polyline)
Code: Select all
CADGradientPolygon entGrHatch = new CADGradientPolygon ();
CAD2DBoundaryList v2DBList = new CAD2DBoundaryList();
v2DBList.BoundaryType = 7;// Polyline type
CAD2DPolyline v2DPolyline = new CAD2DPolyline();
v2DBList.Add(v2DPolyline);
CAD2DPoint ent2DPoint;
DPoint Point;
for (int j = 0; j < pline.PolyPoints.Count; j++)
{
Point = (DPoint)pline.PolyPoints[j];
ent2DPoint = new CAD2DPoint(Point.X, Point.Y);
v2DPolyline.Vertexes.Add(ent2DPoint);
}
v2DPolyline.Closed = true;
entGrHatch .Color = Color.Coral;
entGrHatch .GradientColor = Color.Azure;
entGrHatch .Boundaries.Add(v2DBList);
Thanks a lot.
Elena