ArcEngine flashes point, line, and surface

Source: Internet
Author: User

// Flickering line
Static void flashline (axmapcontrol mapcontrol, iscreendisplay, igeometry)
{
Isimplelinesymbol ilinesymbol;
Isymbol;
Irgbcolor;

Ilinesymbol = new simplelinesymbol ();
Ilinesymbol. width = 4;
Irgbcolor = new rgbcolor ();
Irgbcolor. red= 255;
Ilinesymbol. Color = irgbcolor;
Isymbol = (isymbol) ilinesymbol;
Isymbol. ROP2 = esrirasteropcode. esriropnotxorpen;
Mapcontrol. flashshape (igeometryry, 3,200, isymbol );
}

// Blinking Area
Static void flashpolygon (axmapcontrol mapcontrol, iscreendisplay, igeometry)
{
Isimplefillsymbol ifillsymbol;
Isymbol;
Irgbcolor;

Ifillsymbol = new simplefillsymbol ();
Ifillsymbol. Style = esrisimplefillstyle. esrisfssolid;
Ifillsymbol. outline. width = 12;

Irgbcolor = new rgbcolor ();
Irgbcolor. RGB = system. Drawing. color. fromargb (100,180,180). toargb ();
Ifillsymbol. Color = irgbcolor;

Isymbol = (isymbol) ifillsymbol;
Isymbol. ROP2 = esrirasteropcode. esriropnotxorpen;
Iscreendisplay. setsymbol (isymbol );
MapControl. FlashShape (igeometryry, 3,200, iSymbol );
}

// Flickering point
Static void FlashPoint (AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
{
ISimpleMarkerSymbol iMarkerSymbol;
ISymbol iSymbol;
IRgbColor iRgbColor;

IMarkerSymbol = new SimpleMarkerSymbol ();
IMarkerSymbol. Style = esriSimpleMarkerStyle. esriSMSCircle;
IRgbColor = new RgbColor ();
IRgbColor. RGB = System. Drawing. Color. FromArgb (0, 0, 0). ToArgb ();
IMarkerSymbol. Color = iRgbColor;
ISymbol = (ISymbol) iMarkerSymbol;
ISymbol. ROP2 = esriRasterOpCode. esriROPNotXOrPen;
MapControl. FlashShape (igeometryry, 3,200, iSymbol );
}
// Blinking target
Public static void FlashFeature (AxMapControl mapControl, IFeature iFeature, IMap iMap)
{
IActiveView iActiveView = iMap as IActiveView;
If (iActiveView! = Null)
{
IActiveView. ScreenDisplay. StartDrawing (0, (short) esriScreenCache. esriNoScreenCache );
// Call different processes based on the geometric type
Switch (iFeature. Shape. GeometryType)
{
Case esriGeometryType. esriGeometryPolyline:
FlashLine (mapControl, iActiveView. ScreenDisplay, iFeature. Shape );
Break;
Case esriGeometryType. esriGeometryPolygon:
FlashPolygon (mapControl, iActiveView. ScreenDisplay, iFeature. Shape );
Break;
Case esriGeometryType. esriGeometryPoint:
FlashPoint (mapControl, iActiveView. ScreenDisplay, iFeature. Shape );
Break;
Default:
Break;
}
IActiveView. ScreenDisplay. FinishDrawing ();
}
}

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.