Article | 60001443 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 7/5/2011 |
Submitted by | Jungtae Ji |
Keywords |
vdCircle cir = new vdCircle(); // assume that this is the circle with penwidth inside your block. cir.SetUnRegisterDocument(vdFramedControl1.BaseControl.ActiveDocument); cir.setDocumentDefaults(); cir.Center = new gPoint(3,3); cir.Radius=2; cir.PenWidth = .5; cir.PenColor.SystemColor = Color.Green; vdFramedControl1.BaseControl.ActiveDocument.Model.Entities.AddItem(cir); vdCircle cir1 = new vdCircle(); cir1=cir.Clone(vdFramedControl1.BaseControl.ActiveDocument) as vdCircle; cir1.Radius = cir.Radius - cir.PenWidth / 2.0; vdCircle cir2 = new vdCircle(); cir2 = cir.Clone(vdFramedControl1.BaseControl.ActiveDocument) as vdCircle; cir2.Radius = cir.Radius + cir.PenWidth / 2.0; vdPolyhatch hatch = new vdPolyhatch(); // replace the circle with this object hatch.SetUnRegisterDocument(vdFramedControl1.BaseControl.ActiveDocument); hatch.setDocumentDefaults(); VectorDraw.Professional.vdCollections.vdCurves curs = new VectorDraw.Professional.vdCollections.vdCurves(); curs.AddItem(cir1); curs.AddItem(cir2); hatch.HatchProperties = new vdHatchProperties(VdConstFill.VdFillModeSolid); hatch.HatchProperties.DrawBoundary = false; hatch.HatchProperties.FillColor = cir.PenColor; hatch.PolyCurves.AddItem(curs); vdFramedControl1.BaseControl.ActiveDocument.Model.Entities.AddItem(hatch);