internal PdfRectangle(PdfVector topLeft, PdfVector topRight, PdfVector bottomLeft, PdfVector bottomRight) { TopLeft = topLeft.ToPoint(); TopRight = topRight.ToPoint(); BottomLeft = bottomLeft.ToPoint(); BottomRight = bottomRight.ToPoint(); Width = bottomRight.Subtract(bottomLeft).GetMagnitude(); Height = topLeft.Subtract(bottomLeft).GetMagnitude(); Area = Width * Height; }
public PdfVector Subtract(PdfVector vector) { return(new PdfVector(X - vector.X, Y - vector.Y)); }