public override CompositeGraphic SelectRect(Rect r, double left = 0.0f, double top = 0.0f)
 {
     CompositeGraphic cg = new CompositeGraphic();
     cg.isTemporary = true;
     RectangleGeometry rg = new RectangleGeometry(r);
     Geometry g = getGeometry(left, top);
     if (g.FillContainsWithDetail(rg) != IntersectionDetail.Empty)
     {
         cg.Add(this, left, top);
         return cg;
     }
     return null;
 }
        public override CompositeGraphic SelectRect(Rect r, double left = 0.0f, double top = 0.0f)
        {
            CompositeGraphic cg = new CompositeGraphic();

            cg.isTemporary = true;
            RectangleGeometry rg = new RectangleGeometry(r);
            Geometry          g  = getGeometry(left, top);

            if (g.FillContainsWithDetail(rg) != IntersectionDetail.Empty)
            {
                cg.Add(this, left, top);
                return(cg);
            }
            return(null);
        }
Exemple #3
0
        /// <summary>
        /// 全选
        /// </summary>
        public CompositeGraphic SelectAll()
        {
            CompositeGraphic cg = new CompositeGraphic();

            cg.Width  = this.Width;
            cg.Height = this.Height;
            List <_graphicpos> l = new List <_graphicpos>(_list);

            for (int i = 0; i < l.Count; i++)
            {
                _graphicpos gp = l[i];
                cg.Add(gp.g, gp.left, gp.top);
            }
            this.Add(cg);
            return(cg);
        }
Exemple #4
0
        public override MyGraphic Clone()
        {
            CompositeGraphic cg = new CompositeGraphic(backgroundmode);

            cg.isVisible = this.isVisible;
            foreach (_graphicpos gp in _list)
            {
                MyGraphic g = gp.g.Clone();
                cg.Add(g, gp.left, gp.top);
            }
            cg.Width       = this.Width;
            cg.Height      = this.Height;
            cg.isCombined  = this.isCombined;
            cg.isTemporary = this.isTemporary;
            return(cg);
        }
 /// <summary>
 /// 全选
 /// </summary>
 public CompositeGraphic SelectAll()
 {
     CompositeGraphic cg = new CompositeGraphic();
     cg.Width = this.Width;
     cg.Height = this.Height;
     List<_graphicpos> l = new List<_graphicpos>(_list);
     for (int i = 0; i < l.Count; i++)
     {
         _graphicpos gp = l[i];
         cg.Add(gp.g, gp.left, gp.top);
     }
     this.Add(cg);
     return cg;
 }
 public override MyGraphic Clone()
 {
     CompositeGraphic cg = new CompositeGraphic(backgroundmode);
     cg.isVisible = this.isVisible;
     foreach (_graphicpos gp in _list)
     {
         MyGraphic g = gp.g.Clone();
         cg.Add(g, gp.left, gp.top);
     }
     cg.Width = this.Width;
     cg.Height = this.Height;
     cg.isCombined = this.isCombined;
     cg.isTemporary = this.isTemporary;
     return cg;
 }