AE draws polygon and plane on mapconntrol

Source: Internet
Author: User
        ///   <Summary>          ///  Draw a polygon and a plane on mapcontrol.  ///   </Summary>          ///   <Param name = "activeview"> </param>          Public   Void  Drawpolygon (ESRI. ArcGIS. Carto. iactiveview activeview ){  If (Activeview = Null  ){ Return  ;} ESRI. ArcGIS. display. iscreendisplay screendisplay = Activeview. screendisplay;  //  Constant Screendisplay. startdrawing (screendisplay. HDC, (system. int16) ESRI. ArcGIS. display. esriscreencache. esrinoscreencache ); //  Explicit cast ESRI. ArcGIS. display. irgbcolor rgbcolor = New  ESRI. ArcGIS. display. rgbcolorclass (); rgbcolor. Red = 255 ; ESRI. ArcGIS. display. icolor color = Rgbcolor; //  Implicit cast ESRI. ArcGIS. display. isimplefillsymbol simplefillsymbol = New  ESRI. ArcGIS. display. simplefillsymbolclass (); simplefillsymbol. Color = Color; ESRI. ArcGIS. display. isymbol symbol = Simplefillsymbol As ESRI. ArcGIS. display. isymbol; //  Dynamic cast  // ESRI. ArcGIS. display. irubberband rubberband = new ESRI. ArcGIS. display. rubberpolygonclass ();  //  Polygon ESRI. ArcGIS. display. irubberband rubberband = New ESRI. ArcGIS. display. rubberlineclass (); //  Line  ESRI. ArcGIS. Geometry. igeometry Geometry = Rubberband. tracknew (screendisplay, symbol); screendisplay. setsymbol (Symbol );  //  Screendisplay. drawpolygon (geometry); Polygon Screendisplay. drawpolyline (geometry); screendisplay. finishdrawing ();}  Private   Void Axmapcontrolpoliconmousedown ( Object  Sender, ESRI. ArcGIS. Controls. imapcontrolevents2_onmousedownevent e) {drawpolygon (  This  . Axmapcontrol1.activeview );} 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.