Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public PdfVector Subtract(PdfVector vector)
 {
     return(new PdfVector(X - vector.X, Y - vector.Y));
 }