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
intin X-coord of Top-left corner of the rectangle.y1
intin Y-coord of Top-left corner of the rectangle.x2
intin X-coord of Bottom-right corner of the rectangle.y2
intin Y-coord of Bottom-right corner of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Devices Library execution.
static Rectangle fromXyxy(int x1, int y1, int x2, int y2)
Parameters
x1
intin X-coord of Top-left corner of the rectangle.y1
intin Y-coord of Top-left corner of the rectangle.x2
intin X-coord of Bottom-right corner of the rectangle.y2
intin Y-coord of Bottom-right corner of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Devices Library execution.
public static Rectangle FromXyxy(int x1, int y1, int x2, int y2)
Parameters
x1
intin X-coord of Top-left corner of the rectangle.y1
intin Y-coord of Top-left corner of the rectangle.x2
intin X-coord of Bottom-right corner of the rectangle.y2
intin Y-coord of Bottom-right corner of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Devices Library execution.
public static Rectangle fromXyxy(int x1, int y1, int x2, int y2) throws DevicesException
Parameters
x1
intin X-coord of Top-left corner of the rectangle.y1
intin Y-coord of Top-left corner of the rectangle.x2
intin X-coord of Bottom-right corner of the rectangle.y2
intin Y-coord of Bottom-right corner of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Devices Library execution.
int id3DevicesRectangle_FromXyxy (
ID3_DEVICES_RECTANGLE hRectangle,
int x1,
int y1,
int x2,
int y2)
Parameters
hRectangle
ID3_DEVICES_RECTANGLEin Handle to the Rectangle object.x1
intin X-coord of Top-left corner of the rectangle.y1
intin Y-coord of Top-left corner of the rectangle.x2
intin X-coord of Bottom-right corner of the rectangle.y2
intin Y-coord of Bottom-right corner of the rectangle.
Returns