/// <summary> /// Creates a new <see cref="PdfRectangle"/> which is the current rectangle moved in the x and y directions relative to its current position by a value. /// </summary> /// <param name="dx">The distance to move the rectangle in the x direction relative to its current location.</param> /// <param name="dy">The distance to move the rectangle in the y direction relative to its current location.</param> /// <returns>A new rectangle shifted on the y axis by the given delta value.</returns> public PdfRectangle Translate(double dx, double dy) { return(new PdfRectangle(TopLeft.Translate(dx, dy), TopRight.Translate(dx, dy), BottomLeft.Translate(dx, dy), BottomRight.Translate(dx, dy))); }
/// <summary> /// Moves the rectangle in the direction and magnitude of the vector /// </summary> public virtual bool Move(Point2D vector) { TopLeft = TopLeft.Translate(vector); return(true); }
public IntRect Translate(IntPoint pt) { return(new IntRect(TopLeft.Translate(pt), Size)); }