private SmoothingMode m_mode = SmoothingMode.AntiAlias; public MapForm1() { InitializeComponent(); } private void axMapControl1_OnAfterScreenDraw(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEvent e) { Graphics g = Graphics.FromHdc(new IntPtr(e.hdc)); DrawEllipse(g); g.Dispose(); } private void DrawEllipse(Graphics g) { g.SmoothingMode = m_mode; Pen sdPen = new Pen(Brushes.Red, (float)10.0); g.DrawEllipse(sdPen, new Rectangle(100, 100, 200, 200)); sdPen.Dispose(); } private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e) { if (m_mode == SmoothingMode.AntiAlias) m_mode = SmoothingMode.HighSpeed; else m_mode = SmoothingMode.AntiAlias; axMapControl1.Refresh(); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.