Article | 60001572 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 12/8/2011 |
Submitted by | Paul Bawin |
Keywords |
private void Form1_Load(object sender, EventArgs e) { vdFramedControl1.BaseControl.ActiveDocument.OnDrawFigure += new vdDocument.FigureDrawEventHandler(ActiveDocument_OnDrawFigure); vdFramedControl1.BaseControl.ActiveDocument.FreezeEntityDrawEvents.Push(false); } void ActiveDocument_OnDrawFigure(object sender, VectorDraw.Render.vdRender render, ref bool cancel) { vdPoint pt = sender as vdPoint; if (pt != null) {// ok it is a vdPoint object double radius = render.PixelSize * 10; // 10 pixels radius !!!! vdCircle cir = new vdCircle(vdFramedControl1.BaseControl.ActiveDocument, pt.InsertionPoint, radius); cir.HatchProperties = new vdHatchProperties(VectorDraw.Professional.Constants.VdConstFill.VdFillModeSolid); cir.HatchProperties.FillColor.FromSystemColor(Color.Red); cir.HatchProperties.FillColor.AlphaBlending = 80; // make it also a bit transparent cir.Draw(render); cancel = true; // do not draw the "default" vdPoint } // else do nothing !!! }Note that this kind of points will slow down the draw/redraw of the screen if you have a lot of vdPoints in the drawing.