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 int
in X-coord of Top-left corner of the rectangle.

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

w int
in Width of the rectangle

h int
in Height of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Finger Library execution.
static Rectangle fromXywh(int x, int y, int w, int h)

Parameters

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

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

w int
in Width of the rectangle

h int
in Height of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Finger Library execution.
public static Rectangle FromXywh(int x, int y, int w, int h)

Parameters

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

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

w int
in Width of the rectangle

h int
in Height of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Finger Library execution.
public static Rectangle fromXywh(int x, int y, int w, int h) throws FingerException

Parameters

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

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

w int
in Width of the rectangle

h int
in Height of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Finger Library execution.
public static func fromXywh(x: Int32, y: Int32, w: Int32, h: Int32) throws -> Rectangle

Parameters

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

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

w Int32
in Width of the rectangle

h Int32
in Height of the rectangle.

Returns

The newly created rectangle.

Exceptions

An error has occurred during Finger Library execution.
int id3FingerRectangle_FromXywh (
    ID3_FINGER_RECTANGLE hRectangle,
    int x,
    int y,
    int w,
    int h)

Parameters

in Handle to the Rectangle object.

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

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

w int
in Width of the rectangle

h int
in Height of the rectangle.

Returns

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