Foxit PDF SDK
FoxitPDFSDKPython3.RectF Class Reference

Inherits FoxitPDFSDKPython3._object.

Public Member Functions

def RectF ()
 Construct an empty rectangle. More...
 
def Contains (other_rect)
 Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one. More...
 
def Deflate (x, y)
 Decreases the width and height of the rectangle. More...
 
def GetClosestRect ()
 Get a closest integer rectangle. More...
 
def GetInnerRect ()
 Convert to an inner integer rectangle. More...
 
def GetOutterRect ()
 Convert to an outer integer rectangle. More...
 
def Height ()
 Get the height of the rectangle. More...
 
def Inflate (x, y)
 Increases the width and height of the rectangle. More...
 
def InitRect (x, y)
 Initialize the rectangle to a single point. More...
 
def Intersect (other_rect)
 Intersect with a rect. More...
 
def IsEmpty ()
 Verify whether the rect is empty. More...
 
def Normalize ()
 Normalize the rect. Make sure left <= right, and bottom <= top. More...
 
def Reset ()
 Reset rectangle, set coordinates to 0. More...
 
def Transform (pMatrix)
 Transform a rectangle. The result rectangle is always normalized. More...
 
def Translate (e, f)
 Translate rectangle. More...
 
def Union (other_rect)
 Union with a rect. More...
 
def UpdateRect (x, y)
 Update the rectangle to contain the specified point. More...
 
def Width ()
 Get the width of the rectangle. More...
 

Static Public Attributes

 bottom = _swig_property(_fsdk.RectF_bottom_get, _fsdk.RectF_bottom_set)
 The bottom.
 
 GetBBox = _fsdk.RectF_GetBBox
 Get the bounding box of input points array. More...
 
 left = _swig_property(_fsdk.RectF_left_get, _fsdk.RectF_left_set)
 The left.
 
 right = _swig_property(_fsdk.RectF_right_get, _fsdk.RectF_right_set)
 The right.
 
 top = _swig_property(_fsdk.RectF_top_get, _fsdk.RectF_top_set)
 The top.
 

Detailed Description

A float-point coordination rectangle. A normalized float-point rectangle always has top larger than bottom, which is the opposite of Windows rectangle.

Constructor & Destructor Documentation

◆ RectF()

FoxitPDFSDKPython3.RectF.RectF ( )

Construct an empty rectangle.

Construct a rectangle with a rectangle object.

Construct a rectangle with left-bottom and right-top corners.

Parameters
[in]left1The x-coordinate of the input left-bottom corner.
[in]bottom1The y-coordinate of the input left-bottom corner.
[in]right1The x-coordinate of the input right-top corner.
[in]top1The y-coordinate of the input right-top corner.
[in]rectThe input rectangle object.

Member Function Documentation

◆ Contains()

def FoxitPDFSDKPython3.RectF.Contains (   other_rect)

Check if current rectangle fully contains the other provided rectangle. That means to check if the other rectangle is fully inside current one.

Check if current rectangle fully contains the provided point. That means to check if the provided point is inside current rectangle.

Parameters
[in]other_rectThe other provided rect.
Returns
true means current rectangle fully contains the other one, while false means not.
Parameters
[in]xThe x coordinate of the provided point.
[in]yThe y coordinate of the provided point.
Returns
true means current rectangle contains the provided point, while false means not.

◆ Deflate()

def FoxitPDFSDKPython3.RectF.Deflate (   x,
  y 
)

Decreases the width and height of the rectangle.

Parameters
[in]xThe number to deflate the left and right of the rectangle.
[in]yThe number to deflate the top and bottom of the rectangle.
Returns
None.
Parameters
[in]leftThe number to deflate the left of the rectangle.
[in]bottomThe number to deflate the bottom of the rectangle.
[in]rightThe number to deflate the right of the rectangle.
[in]topThe number to deflate the top of the rectangle.
Returns
None.
Parameters
[in]rtThe rectangle to deflate each side.
Returns
None.

◆ GetClosestRect()

def FoxitPDFSDKPython3.RectF.GetClosestRect ( )

Get a closest integer rectangle.

Returns
The closest integer rectangle.

◆ GetInnerRect()

def FoxitPDFSDKPython3.RectF.GetInnerRect ( )

Convert to an inner integer rectangle.

Returns
The inner integer rectangle.

◆ GetOutterRect()

def FoxitPDFSDKPython3.RectF.GetOutterRect ( )

Convert to an outer integer rectangle.

Returns
The outer integer rectangle.

◆ Height()

def FoxitPDFSDKPython3.RectF.Height ( )

Get the height of the rectangle.

Returns
Height of the rectangle.

◆ Inflate()

def FoxitPDFSDKPython3.RectF.Inflate (   x,
  y 
)

Increases the width and height of the rectangle.

Parameters
[in]xThe number to inflate the left and right of the rectangle.
[in]yThe number to inflate the top and bottom of the rectangle.
Returns
None.
Parameters
[in]leftThe number to inflate the left of the rectangle.
[in]bottomThe number to inflate the bottom of the rectangle.
[in]rightThe number to inflate the right of the rectangle.
[in]topThe number to inflate the top of the rectangle.
Returns
None.
Parameters
[in]rtThe rectangle to inflate each side.
Returns
None.

◆ InitRect()

def FoxitPDFSDKPython3.RectF.InitRect (   x,
  y 
)

Initialize the rectangle to a single point.

Parameters
[in]xThe x-coordinate of the input point.
[in]yThe y-coordinate of the input point.
Returns
None.

◆ Intersect()

def FoxitPDFSDKPython3.RectF.Intersect (   other_rect)

Intersect with a rect.

Parameters
[in]other_rectThe rect to intersect with.
Returns
None.

◆ IsEmpty()

def FoxitPDFSDKPython3.RectF.IsEmpty ( )

Verify whether the rect is empty.

Returns
true meanas current rect is empty, while false means not.

◆ Normalize()

def FoxitPDFSDKPython3.RectF.Normalize ( )

Normalize the rect. Make sure left <= right, and bottom <= top.

Returns
None.

◆ Reset()

def FoxitPDFSDKPython3.RectF.Reset ( )

Reset rectangle, set coordinates to 0.

Returns
None.

◆ Transform()

def FoxitPDFSDKPython3.RectF.Transform (   pMatrix)

Transform a rectangle. The result rectangle is always normalized.

Parameters
[in]pMatrixThe transformation matrix.
Returns
None.

◆ Translate()

def FoxitPDFSDKPython3.RectF.Translate (   e,
  f 
)

Translate rectangle.

Parameters
[in]eOffset in X-axis.
[in]fOffset in Y-axis.
Returns
None.

◆ Union()

def FoxitPDFSDKPython3.RectF.Union (   other_rect)

Union with a rect.

Parameters
[in]other_rectThe rect to union with.
Returns
None.

◆ UpdateRect()

def FoxitPDFSDKPython3.RectF.UpdateRect (   x,
  y 
)

Update the rectangle to contain the specified point.

Parameters
[in]xThe x-coordinate of the input point.
[in]yThe y-coordinate of the input point.
Returns
None.

◆ Width()

def FoxitPDFSDKPython3.RectF.Width ( )

Get the width of the rectangle.

Returns
Width of the rectangle.

Member Data Documentation

◆ GetBBox

FoxitPDFSDKPython3.RectF.GetBBox = _fsdk.RectF_GetBBox
static

Get the bounding box of input points array.

Parameters
[in]pPointsThe input points array.
[in]nPointsThe number of points in the array.
Returns
A floating-point coordination rectangle.