Esempio n. 1
0
 void ISelectable.DrawSelection(MapGraphics g, RectangleF clipRect, bool designTimeSelection)
 {
     if (this.Shapes.Count != 0)
     {
         MapCore mapCore = this.GetMapCore();
         using (GraphicsPath graphicsPath = this.GetPath(g, false))
         {
             if (graphicsPath != null)
             {
                 RectangleF bounds = graphicsPath.GetBounds();
                 RectangleF rect   = bounds;
                 rect.Inflate(6f, 6f);
                 if (clipRect.IntersectsWith(rect) && !bounds.IsEmpty)
                 {
                     g.DrawSelection(bounds, designTimeSelection, mapCore.SelectionBorderColor, mapCore.SelectionMarkerColor);
                     PointF       centerPointInContentPixels = this.GetCenterPointInContentPixels(g);
                     AntiAliasing antiAliasing = g.AntiAliasing;
                     g.AntiAliasing = AntiAliasing.None;
                     g.DrawLine(Pens.Red, (float)(centerPointInContentPixels.X - 8.0), centerPointInContentPixels.Y, (float)(centerPointInContentPixels.X + 8.0), centerPointInContentPixels.Y);
                     g.DrawLine(Pens.Red, centerPointInContentPixels.X, (float)(centerPointInContentPixels.Y - 8.0), centerPointInContentPixels.X, (float)(centerPointInContentPixels.Y + 8.0));
                     g.AntiAliasing = antiAliasing;
                 }
             }
         }
     }
 }
Esempio n. 2
0
        void ISelectable.DrawSelection(MapGraphics g, RectangleF clipRect, bool designTimeSelection)
        {
            RectangleF selectionRectangle = ((ISelectable)this).GetSelectionRectangle(g, clipRect);

            if (!selectionRectangle.IsEmpty)
            {
                g.DrawSelection(selectionRectangle, designTimeSelection, Common.MapCore.SelectionBorderColor, Common.MapCore.SelectionMarkerColor);
            }
        }
Esempio n. 3
0
        void ISelectable.DrawSelection(MapGraphics g, RectangleF clipRect, bool designTimeSelection)
        {
            MapCore mapCore = GetMapCore();

            if (mapCore != null && IsVisible())
            {
                RectangleF selectionRectangle = ((ISelectable)this).GetSelectionRectangle(g, clipRect);
                if (!selectionRectangle.IsEmpty)
                {
                    g.DrawSelection(selectionRectangle, designTimeSelection, mapCore.SelectionBorderColor, mapCore.SelectionMarkerColor);
                }
            }
        }