Rectangle.fromXyxy Method

Module: Rectangle

Definition

Creates an aligned rectangle from 2 points (top-left and bottom right) coordinates.

@staticmethod
from_xyxy(x1: int, y1: int, x2: int, y2: int) -> Rectangle

Parameters

x1 int
in X-coord of Top-left corner of the rectangle.

y1 int
in Y-coord of Top-left corner of the rectangle.

x2 int
in X-coord of Bottom-right corner of the rectangle.

y2 int
in Y-coord of Bottom-right corner of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Document Library execution.
static Rectangle fromXyxy(int x1, int y1, int x2, int y2)

Parameters

x1 int
in X-coord of Top-left corner of the rectangle.

y1 int
in Y-coord of Top-left corner of the rectangle.

x2 int
in X-coord of Bottom-right corner of the rectangle.

y2 int
in Y-coord of Bottom-right corner of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Document Library execution.
public static Rectangle FromXyxy(int x1, int y1, int x2, int y2)

Parameters

x1 int
in X-coord of Top-left corner of the rectangle.

y1 int
in Y-coord of Top-left corner of the rectangle.

x2 int
in X-coord of Bottom-right corner of the rectangle.

y2 int
in Y-coord of Bottom-right corner of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Document Library execution.
public static Rectangle fromXyxy(int x1, int y1, int x2, int y2) throws DocumentException

Parameters

x1 int
in X-coord of Top-left corner of the rectangle.

y1 int
in Y-coord of Top-left corner of the rectangle.

x2 int
in X-coord of Bottom-right corner of the rectangle.

y2 int
in Y-coord of Bottom-right corner of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Document Library execution.
public static func fromXyxy(x1: Int32, y1: Int32, x2: Int32, y2: Int32) throws -> Rectangle

Parameters

x1 Int32
in X-coord of Top-left corner of the rectangle.

y1 Int32
in Y-coord of Top-left corner of the rectangle.

x2 Int32
in X-coord of Bottom-right corner of the rectangle.

y2 Int32
in Y-coord of Bottom-right corner of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Document Library execution.
int id3DocumentRectangle_FromXyxy (
    ID3_DOCUMENT_RECTANGLE hRectangle,
    int x1,
    int y1,
    int x2,
    int y2)

Parameters

in Handle to the Rectangle object.

x1 int
in X-coord of Top-left corner of the rectangle.

y1 int
in Y-coord of Top-left corner of the rectangle.

x2 int
in X-coord of Bottom-right corner of the rectangle.

y2 int
in Y-coord of Bottom-right corner of the rectangle.

Returns

int
An error code.
See id3DocumentError file for the list of possible error codes.