public RectD GetBoundingSquare() { RectD rect = GetBoundingSquareUnit().ScaledFromCenter(_scale); rect.Offset(_position.X, _position.Y); return(rect); }
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); }
public virtual void Invalidate(RectD rectToInvalidate) { if (Parent != null) { rectToInvalidate.Offset(OriginRelativeParent); Parent.Invalidate(rectToInvalidate); } }
public RectD GetBoundingBox() { RectD rect = GetBoundingBoxUnit(); rect = rect.ScaledPositionFromOrigin(_scale); rect = rect.ScaledFromCenter(_scale); rect.Offset(_position.X, _position.Y); return(rect); }
public void MoveBy(int xdiff, int ydiff) { //apply translation this.vxs = Affine.TranslateToVxs(vxs, xdiff, ydiff); boundingRect.Offset(xdiff, ydiff); }
public void Offset(double dx, double dy) { bounds.Offset(dx, dy); }
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))); }