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

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

Static Public Member Functions

def construct (arg)
 
def intersect (a, b)
 Intersect Shared Method Produces a new Rectangle by intersecting 2 existing Rectangles. More...
 
def fromLTRB (left, top, right, bottom)
 FromLTRB Shared Method Produces a Rectangle class from left, top, right, and bottom coordinates. 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__()

def __init__ (   self,
  x,
  y,
  width,
  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()

def construct (   arg)
static

◆ equals()

def equals (   self,
  obj 
)

◆ fromLTRB()

def fromLTRB (   left,
  top,
  right,
  bottom 
)
static

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

◆ getBottom()

def 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()

def getHeight (   self)

Returns the height of the bounding Rectangle in double precision.

Returns
the height of the bounding Rectangle.

◆ getLeft()

def 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()

def 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()

def 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()

def getWidth (   self)

Returns the width of the bounding Rectangle in double precision.

Returns
the width of the bounding Rectangle.

◆ getX()

def getX (   self)

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

Returns
the X coordinate of the bounding Rectangle.

◆ getY()

def getY (   self)

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

Returns
the Y coordinate of the bounding Rectangle.

◆ init()

def init (   self)

Reimplemented from BaseJavaClass.

◆ intersect()

def intersect (   a,
  b 
)
static

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

Returns None if there is no intersection.

◆ intersectsWithInclusive()

def intersectsWithInclusive (   self,
  rectangle 
)

Determines if self rectangle intersects with rect.

Parameters
rectangle
Returns
{boolean

◆ isEmpty()

def isEmpty (   self)

◆ toString()

def toString (   self)

Member Data Documentation

◆ javaClass

javaClass

◆ javaClassName

string javaClassName = "java.awt.Rectangle"
static