Aspose.Barcode for Python via Java Generation and Recognition API docs

A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's upper-left point in the coordinate space, its width, and its height. More...

Inherits BaseJavaClass.

Public Member Functions

None __init__ (self, int x, int y, int width, int height)
 Rectangle constructor. More...
 
bool equals (self, Rectangle obj)
 
int getBottom (self)
 Gets the y-coordinate that is the sum of the Y and Height property values of self Rectangle class. More...
 
int getHeight (self)
 Returns the height of the bounding Rectangle in double precision. More...
 
int getLeft (self)
 Gets the x-coordinate of the left edge of self Rectangle class. More...
 
int getRight (self)
 Gets the x-coordinate that is the sum of X and Width property values of self Rectangle class. More...
 
int getTop (self)
 Gets the y-coordinate of the top edge of self Rectangle class. More...
 
int getWidth (self)
 Returns the width of the bounding Rectangle in double precision. More...
 
int getX (self)
 Returns the X coordinate of the bounding Rectangle in double precision. More...
 
int getY (self)
 Returns the Y coordinate of the bounding Rectangle in double precision. More...
 
None init (self)
 
bool intersectsWithInclusive (self, Rectangle rectangle)
 Determines if self rectangle intersects with rect. More...
 
bool isEmpty (self)
 
str toString (self)
 
- Public Member Functions inherited from BaseJavaClass
None __init__ (self, javaClass)
 
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Static Public Member Functions

Rectangle construct (arg)
 
Rectangle fromLTRB (int left, int top, int right, int bottom)
 FromLTRB Shared Method Produces a Rectangle class from left, top, right, and bottom coordinates. More...
 
Rectangle intersect (Rectangle a, Rectangle b)
 Intersect Shared Method Produces a new Rectangle by intersecting 2 existing Rectangles. More...
 

Public Attributes

 javaClass
 
- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Static Public Attributes

string javaClassName = "java.awt.Rectangle"
 

Detailed Description

A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's upper-left point in the coordinate space, its width, and its height.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
int  x,
int  y,
int  width,
int  height 
)

Rectangle constructor.

Parameters
xThe x-coordinate of the upper-left corner of the rectangle.
yThe y-coordinate of the upper-left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.

Member Function Documentation

◆ construct()

Rectangle construct (   arg)
static

◆ equals()

bool equals (   self,
Rectangle  obj 
)

◆ fromLTRB()

Rectangle fromLTRB ( int  left,
int  top,
int  right,
int  bottom 
)
static

FromLTRB Shared Method Produces a Rectangle class from left, top, right, and bottom coordinates.

◆ getBottom()

int getBottom (   self)

Gets the y-coordinate that is the sum of the Y and Height property values of self Rectangle class.

Returns
The y-coordinate that is the sum of Y and Height of self Rectangle.

◆ getHeight()

int getHeight (   self)

Returns the height of the bounding Rectangle in double precision.

Returns
the height of the bounding Rectangle.

◆ getLeft()

int getLeft (   self)

Gets the x-coordinate of the left edge of self Rectangle class.

Returns
The x-coordinate of the left edge of self Rectangle class.

◆ getRight()

int getRight (   self)

Gets the x-coordinate that is the sum of X and Width property values of self Rectangle class.

Returns
The x-coordinate that is the sum of X and Width of self Rectangle.

◆ getTop()

int getTop (   self)

Gets the y-coordinate of the top edge of self Rectangle class.

Returns
The y-coordinate of the top edge of self Rectangle class.

◆ getWidth()

int getWidth (   self)

Returns the width of the bounding Rectangle in double precision.

Returns
the width of the bounding Rectangle.

◆ getX()

int getX (   self)

Returns the X coordinate of the bounding Rectangle in double precision.

Returns
the X coordinate of the bounding Rectangle.

◆ getY()

int getY (   self)

Returns the Y coordinate of the bounding Rectangle in double precision.

Returns
the Y coordinate of the bounding Rectangle.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ intersect()

Rectangle intersect ( Rectangle  a,
Rectangle  b 
)
static

Intersect Shared Method Produces a new Rectangle by intersecting 2 existing Rectangles.

Returns None if there is no intersection.

◆ intersectsWithInclusive()

bool intersectsWithInclusive (   self,
Rectangle  rectangle 
)

Determines if self rectangle intersects with rect.

Parameters
rectangle
Returns
{boolean

◆ isEmpty()

bool isEmpty (   self)

◆ toString()

str toString (   self)

Member Data Documentation

◆ javaClass

javaClass

◆ javaClassName

string javaClassName = "java.awt.Rectangle"
static