Rectangle.fromXywh Method¶
Module: Rectangle
Definition¶
Creates an aligned rectangle from the top-left point and the width/height.
@staticmethod
from_xywh(x: int, y: int, w: int, h: int) -> Rectangle
Parameters
x
intin X-coord of Top-left corner of the rectangle.y
intin Y-coord of Top-left corner of the rectangle.w
intin Width of the rectangleh
intin Height of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Document Library execution.
static Rectangle fromXywh(int x, int y, int w, int h)
Parameters
x
intin X-coord of Top-left corner of the rectangle.y
intin Y-coord of Top-left corner of the rectangle.w
intin Width of the rectangleh
intin Height of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Document Library execution.
public static Rectangle FromXywh(int x, int y, int w, int h)
Parameters
x
intin X-coord of Top-left corner of the rectangle.y
intin Y-coord of Top-left corner of the rectangle.w
intin Width of the rectangleh
intin Height of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Document Library execution.
public static Rectangle fromXywh(int x, int y, int w, int h) throws DocumentException
Parameters
x
intin X-coord of Top-left corner of the rectangle.y
intin Y-coord of Top-left corner of the rectangle.w
intin Width of the rectangleh
intin Height of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Document Library execution.
public static func fromXywh(x: Int32, y: Int32, w: Int32, h: Int32) throws -> Rectangle
Parameters
x
Int32in X-coord of Top-left corner of the rectangle.y
Int32in Y-coord of Top-left corner of the rectangle.w
Int32in Width of the rectangleh
Int32in Height of the rectangle.
Returns
The newly created rectangle.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentRectangle_FromXywh (
ID3_DOCUMENT_RECTANGLE hRectangle,
int x,
int y,
int w,
int h)
Parameters
hRectangle
ID3_DOCUMENT_RECTANGLEin Handle to the Rectangle object.x
intin X-coord of Top-left corner of the rectangle.y
intin Y-coord of Top-left corner of the rectangle.w
intin Width of the rectangleh
intin Height of the rectangle.
Returns