Example #1
0
        void ESRI.ArcGIS.Display.ISymbol.QueryBoundary(int hDC, ESRI.ArcGIS.Geometry.ITransformation displayTransform, ESRI.ArcGIS.Geometry.IGeometry Geometry, ESRI.ArcGIS.Geometry.IPolygon Boundary)
        {
            // Check input parameters. Boundary may be a preexisting Polygon, so
            // make sure it's geometry is cleared.
            if (Geometry == null | Boundary == null)
                return;
            if (!(Geometry is ESRI.ArcGIS.Geometry.IPoint))
                return;
            Boundary.SetEmpty();

            IPoint point = (IPoint)Geometry;
            IDisplayTransformation displayTransformation = (IDisplayTransformation)displayTransform;

            QueryBoundsFromGeom(hDC, ref displayTransformation, ref Boundary, ref point);
        }
Example #2
0
        void ESRI.ArcGIS.Display.IMarkerMask.QueryMarkerMask(int hDC, ESRI.ArcGIS.Geometry.ITransformation Transform, ESRI.ArcGIS.Geometry.IGeometry Geometry, ESRI.ArcGIS.Geometry.IPolygon Boundary)
        {
            //  Code QueryBoundary using same steps as Draw. But add a step where
            //  Points are converted to Map units, and then build an appropriate Polygon.
            if (Geometry == null | Boundary == null)
                return;
            if (!(Transform is ESRI.ArcGIS.Display.IDisplayTransformation))
                return;
            if (!(Geometry is ESRI.ArcGIS.Geometry.IPoint))
                return;
            Boundary.SetEmpty();

            IPoint point = Geometry as IPoint;
            IDisplayTransformation displayTrans = (IDisplayTransformation)Transform;
            QueryBoundsFromGeom(hDC, ref displayTrans, ref Boundary, ref point);

            // Unlike ISymbol.QueryBoundary, QueryMarkerMask requires a Simple geometry.
            ITopologicalOperator topo = Boundary as ITopologicalOperator;
            if (!topo.IsKnownSimple)
            {
                if (!topo.IsSimple)
                    topo.Simplify();
            }
        }