iText 9.0.0 API
iText.Svg.Utils.TextRectangle Class Reference

A rectangle adapted for working with text elements. More...

Inheritance diagram for iText.Svg.Utils.TextRectangle:
iText.Kernel.Geom.Rectangle

Public Member Functions

  TextRectangle (float x, float y, float width, float height, float textBaseLineYCoordinate)
  Create new instance of text rectangle. More...
 
virtual Point  GetTextBaseLineRightPoint ()
  Return the far right point of the rectangle with y on the baseline. More...
 
- Public Member Functions inherited from iText.Kernel.Geom.Rectangle
  Rectangle (float x, float y, float width, float height)
  Creates new instance. More...
 
  Rectangle (float width, float height)
  Creates new instance of rectangle with (0, 0) as the lower left point. More...
 
  Rectangle (iText.Kernel.Geom.Rectangle rect)
  Creates the copy of given Rectangle More...
 
virtual Point[]  ToPointsArray ()
  Convert rectangle to an array of points More...
 
virtual iText.Kernel.Geom.Rectangle  GetIntersection (iText.Kernel.Geom.Rectangle rect)
  Get the rectangle representation of the intersection between this rectangle and the passed rectangle More...
 
virtual bool  Contains (iText.Kernel.Geom.Rectangle rect)
  Check if this rectangle contains the passed rectangle. More...
 
virtual bool  Overlaps (iText.Kernel.Geom.Rectangle rect)
  Check if this rectangle and the passed rectangle overlap More...
 
virtual bool  Overlaps (iText.Kernel.Geom.Rectangle rect, float epsilon)
  Check if this rectangle and the passed rectangle overlap More...
 
virtual iText.Kernel.Geom.Rectangle  SetBbox (float llx, float lly, float urx, float ury)
  Sets the rectangle by the coordinates, specifying its lower left and upper right points. More...
 
virtual float  GetX ()
  Gets the X coordinate of lower left point. More...
 
virtual iText.Kernel.Geom.Rectangle  SetX (float x)
  Sets the X coordinate of lower left point. More...
 
virtual float  GetY ()
  Gets the Y coordinate of lower left point. More...
 
virtual iText.Kernel.Geom.Rectangle  SetY (float y)
  Sets the Y coordinate of lower left point. More...
 
virtual float  GetWidth ()
  Gets the width of rectangle. More...
 
virtual iText.Kernel.Geom.Rectangle  SetWidth (float width)
  Sets the width of rectangle. More...
 
virtual float  GetHeight ()
  Gets the height of rectangle. More...
 
virtual iText.Kernel.Geom.Rectangle  SetHeight (float height)
  Sets the height of rectangle. More...
 
virtual iText.Kernel.Geom.Rectangle  IncreaseHeight (float extra)
  Increases the height of rectangle by the given value. More...
 
virtual iText.Kernel.Geom.Rectangle  DecreaseHeight (float extra)
  Decreases the height of rectangle by the given value. More...
 
virtual iText.Kernel.Geom.Rectangle  IncreaseWidth (float extra)
  Increases the width of rectangle by the given value. More...
 
virtual iText.Kernel.Geom.Rectangle  DecreaseWidth (float extra)
  Decreases the width of rectangle by the given value. More...
 
virtual float  GetLeft ()
  Gets the X coordinate of the left edge of the rectangle. More...
 
virtual float  GetRight ()
  Gets the X coordinate of the right edge of the rectangle. More...
 
virtual float  GetTop ()
  Gets the Y coordinate of the upper edge of the rectangle. More...
 
virtual float  GetBottom ()
  Gets the Y coordinate of the lower edge of the rectangle. More...
 
virtual iText.Kernel.Geom.Rectangle  MoveDown (float move)
  Decreases the y coordinate. More...
 
virtual iText.Kernel.Geom.Rectangle  MoveUp (float move)
  Increases the y coordinate. More...
 
virtual iText.Kernel.Geom.Rectangle  MoveRight (float move)
  Increases the x coordinate. More...
 
virtual iText.Kernel.Geom.Rectangle  MoveLeft (float move)
  Decreases the x coordinate. More...
 
virtual iText.Kernel.Geom.Rectangle  ApplyMargins (float topIndent, float rightIndent, float bottomIndent, float leftIndent, bool reverse)
  Change the rectangle according the specified margins. More...
 
virtual bool  IntersectsLine (float x1, float y1, float x2, float y2)
  Checks if rectangle have common points with line, specified by two points. More...
 
override String  ToString ()
  Gets the string representation of rectangle. More...
 
virtual iText.Kernel.Geom.Rectangle  Clone ()
  Creates a "deep copy" of this rectangle, meaning the object returned by this method will be independent of the object being cloned. More...
 
virtual bool  EqualsWithEpsilon (iText.Kernel.Geom.Rectangle that)
  Compares instance of this rectangle with given deviation equals to 0.0001 More...
 
virtual bool  EqualsWithEpsilon (iText.Kernel.Geom.Rectangle that, float eps)
  Compares instance of this rectangle with given deviation. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.Kernel.Geom.Rectangle
static iText.Kernel.Geom.Rectangle  GetCommonRectangle (params iText.Kernel.Geom.Rectangle[] rectangles)
  Calculates the common rectangle which includes all the input rectangles. More...
 
static iText.Kernel.Geom.Rectangle  GetRectangleOnRotatedPage (iText.Kernel.Geom.Rectangle rect, PdfPage page)
  Gets the rectangle as it looks on the rotated page and returns the rectangle in coordinates relevant to the true page origin. More...
 
static iText.Kernel.Geom.Rectangle  CalculateBBox (IList< Point > points)
  Calculates the bounding box of passed points. More...
 
static IList< iText.Kernel.Geom.Rectangle CreateBoundingRectanglesFromQuadPoint (PdfArray quadPoints)
  Create a list of bounding rectangles from an 8 x n array of Quadpoints. More...
 
static iText.Kernel.Geom.Rectangle  CreateBoundingRectangleFromQuadPoint (PdfArray quadPoints)
  Create the bounding rectangle for the given array of quadpoints. More...
 
- Package Attributes inherited from iText.Kernel.Geom.Rectangle
float  x
 
float  y
 
float  width
 
float  height
 

Detailed Description

A rectangle adapted for working with text elements.

Constructor & Destructor Documentation

◆ TextRectangle()

iText.Svg.Utils.TextRectangle.TextRectangle ( float  x,
float  y,
float  width,
float  height,
float  textBaseLineYCoordinate 
)
inline

Create new instance of text rectangle.

Parameters
x the x coordinate of lower left point
y the y coordinate of lower left point
width the width value
height the height value
textBaseLineYCoordinate the y coordinate of the line on which the text is located.

Member Function Documentation

◆ GetTextBaseLineRightPoint()

virtual Point iText.Svg.Utils.TextRectangle.GetTextBaseLineRightPoint ( )
inlinevirtual

Return the far right point of the rectangle with y on the baseline.

Returns
the far right baseline point