Example #1
0
            public override IShapeVisitor.VisitResult Visit(ShapeBase shape)
            {
                BoundingBox bbox = shape.AbsoluteBoundingBox;

                if (bbox == null || !bbox.Valid)
                {
                    return(VisitResult.VisitOk);
                }

                if (_bTouching)
                {
                    if (!visBBox.Intersects(bbox))
                    {
                        return(VisitResult.VisitOk);
                    }
                }
                else
                {
                    if (!visBBox.IsInside(bbox))
                    {
                        return(VisitResult.VisitOk);
                    }
                }

                foreach (LinkTarget tgt in shape.LinkTargets)
                {
                    if (shape.CanLink(_srcLink, tgt) && !shape.IsLinkedBySource(_srcLink))
                    {
                        RelevantTargets.Add(tgt);
                    }
                }

                return(VisitResult.VisitOk);
            }
      public override IShapeVisitor.VisitResult Visit(ShapeBase shape)
      {
        BoundingBox bbox = shape.AbsoluteBoundingBox;
        if (bbox==null || !bbox.Valid)
          return VisitResult.VisitOk;

        if (_bTouching)
        {
          if (!visBBox.Intersects(bbox))
            return VisitResult.VisitOk;
        }
        else
        {
          if (!visBBox.IsInside(bbox))
            return VisitResult.VisitOk;
        }

        foreach (LinkTarget tgt in shape.LinkTargets)
          if (shape.CanLink(_srcLink, tgt) && !shape.IsLinkedBySource(_srcLink))
            RelevantTargets.Add(tgt);

        return VisitResult.VisitOk;
      }