Exemplo n.º 1
0
        public RectD GetBoundingSquare()
        {
            RectD rect = GetBoundingSquareUnit().ScaledFromCenter(_scale);

            rect.Offset(_position.X, _position.Y);
            return(rect);
        }
Exemplo n.º 2
0
 public void MoveBy(int xdiff, int ydiff)
 {
     //apply translation
     //TODO: review here again, not to use new VertexStore()
     this.vxs = vxs.TranslateToNewVxs(xdiff, ydiff, new VertexStore());
     boundingRect.Offset(xdiff, ydiff);
 }
Exemplo n.º 3
0
 public virtual void Invalidate(RectD rectToInvalidate)
 {
     if (Parent != null)
     {
         rectToInvalidate.Offset(OriginRelativeParent);
         Parent.Invalidate(rectToInvalidate);
     }
 }
Exemplo n.º 4
0
        public RectD GetBoundingBox()
        {
            RectD rect = GetBoundingBoxUnit();

            rect = rect.ScaledPositionFromOrigin(_scale);
            rect = rect.ScaledFromCenter(_scale);
            rect.Offset(_position.X, _position.Y);
            return(rect);
        }
Exemplo n.º 5
0
 public void MoveBy(int xdiff, int ydiff)
 {
     //apply translation
     this.vxs = Affine.TranslateToVxs(vxs, xdiff, ydiff);
     boundingRect.Offset(xdiff, ydiff);
 }
Exemplo n.º 6
0
 public void Offset(double dx, double dy)
 {
     bounds.Offset(dx, dy);
 }
Exemplo n.º 7
0
 public void Offset()
 {
     Assert.AreEqual(new RectD(4, 6, 4, 5), rectD.Offset(new PointD(3, 4)));
     Assert.AreEqual(new RectF(4, 6, 4, 5), rectF.Offset(new PointF(3, 4)));
     Assert.AreEqual(new RectI(4, 6, 4, 5), rectI.Offset(new PointI(3, 4)));
 }