iText 8.0.2 API
|
Class that represent rectangle object. More...
Public Member Functions |
|
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... |
|
Static Public Member Functions |
|
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... |
|
Class that represent rectangle object.
|
inline |
Creates new instance.
x | the x coordinate of lower left point |
y | the y coordinate of lower left point |
width | the width value |
height | the height value |
|
inline |
Creates new instance of rectangle with (0, 0) as the lower left point.
width | the width value |
height | the height value |
|
inline |
|
inlinevirtual |
Change the rectangle according the specified margins.
topIndent | the value on which the top y coordinate will change. |
rightIndent | the value on which the right x coordinate will change. |
bottomIndent | the value on which the bottom y coordinate will change. |
leftIndent | the value on which the left x coordinate will change. |
reverse | if true the rectangle will expand, otherwise it will shrink |
|
inlinestatic |
Calculates the bounding box of passed points.
points | the points which appear inside the area |
|
inlinevirtual |
Creates a "deep copy" of this rectangle, meaning the object returned by this method will be independent of the object being cloned.
Reimplemented in iText.Kernel.Geom.PageSize.
|
inlinevirtual |
Check if this rectangle contains the passed rectangle.
Check if this rectangle contains the passed rectangle. A rectangle will envelop itself, meaning that for any rectangle rect the expression rect.contains(rect)
always returns true.
rect | a rectangle which is to be checked if it is fully contained inside this rectangle. |
|
inlinestatic |
Create the bounding rectangle for the given array of quadpoints.
quadPoints | an array containing 8 numbers that correspond to 4 points. |
|
inlinestatic |
Create a list of bounding rectangles from an 8 x n array of Quadpoints.
quadPoints | 8xn array of numbers representing 4 points |
|
inlinevirtual |
Decreases the height of rectangle by the given value.
Decreases the height of rectangle by the given value. May be used in chain.
extra | the value of the extra height to be subtracted. |
|
inlinevirtual |
Decreases the width of rectangle by the given value.
Decreases the width of rectangle by the given value. May be used in chain.
extra | the value of the extra width to be subtracted. |
|
inlinevirtual |
Compares instance of this rectangle with given deviation equals to 0.0001
that | the Rectangle to compare with. |
true
if the difference between corresponding rectangle values is less than deviation and false
otherwise.
|
inlinevirtual |
Compares instance of this rectangle with given deviation.
that | the Rectangle to compare with. |
eps | the deviation value. |
true
if the difference between corresponding rectangle values is less than deviation and false
otherwise.
|
inlinevirtual |
Gets the Y coordinate of the lower edge of the rectangle.
Gets the Y coordinate of the lower edge of the rectangle. Same as: getY()
.
|
inlinestatic |
Calculates the common rectangle which includes all the input rectangles.
rectangles | list of input rectangles. |
|
inlinevirtual |
Gets the height of rectangle.
|
inlinevirtual |
Get the rectangle representation of the intersection between this rectangle and the passed rectangle
rect | the rectangle to find the intersection with |
|
inlinevirtual |
Gets the X coordinate of the left edge of the rectangle.
Gets the X coordinate of the left edge of the rectangle. Same as: getX()
.
|
inlinestatic |
Gets the rectangle as it looks on the rotated page and returns the rectangle in coordinates relevant to the true page origin.
Gets the rectangle as it looks on the rotated page and returns the rectangle in coordinates relevant to the true page origin. This rectangle can be used to add annotations, fields, and other objects to the rotated page.
rect | the rectangle as it looks on the rotated page. |
page | the page on which one want to process the rectangle. |
|
inlinevirtual |
Gets the X coordinate of the right edge of the rectangle.
Gets the X coordinate of the right edge of the rectangle. Same as: getX() + getWidth()
.
|
inlinevirtual |
Gets the Y coordinate of the upper edge of the rectangle.
Gets the Y coordinate of the upper edge of the rectangle. Same as: getY() + getHeight()
.
|
inlinevirtual |
Gets the width of rectangle.
|
inlinevirtual |
Gets the X coordinate of lower left point.
|
inlinevirtual |
Gets the Y coordinate of lower left point.
|
inlinevirtual |
Increases the height of rectangle by the given value.
Increases the height of rectangle by the given value. May be used in chain.
extra | the value of the extra height to be added. |
|
inlinevirtual |
Increases the width of rectangle by the given value.
Increases the width of rectangle by the given value. May be used in chain.
extra | the value of the extra wudth to be added. |
|
inlinevirtual |
Checks if rectangle have common points with line, specified by two points.
x1 | the x coordinate of first line's point. |
y1 | the y coordinate of first line's point. |
x2 | the x coordinate of second line's point. |
y2 | the y coordinate of second line's point. |
true
if rectangle have common points with line and false
otherwise.
|
inlinevirtual |
Decreases the y coordinate.
move | the value on which the position will be changed. |
|
inlinevirtual |
Decreases the x coordinate.
move | the value on which the position will be changed. |
|
inlinevirtual |
Increases the x coordinate.
move | the value on which the position will be changed. |
|
inlinevirtual |
Increases the y coordinate.
move | the value on which the position will be changed. |
|
inlinevirtual |
Check if this rectangle and the passed rectangle overlap
rect | a rectangle which is to be checked if it overlaps the passed rectangle |
|
inlinevirtual |
Check if this rectangle and the passed rectangle overlap
rect | a rectangle which is to be checked if it overlaps the passed rectangle |
epsilon | if greater than zero, then this is the maximum distance that one rectangle can go to another, but they will not overlap, if less than zero, then this is the minimum required distance between the rectangles so that they do not overlap |
|
inlinevirtual |
Sets the rectangle by the coordinates, specifying its lower left and upper right points.
Sets the rectangle by the coordinates, specifying its lower left and upper right points. May be used in chain.
Note: this method will normalize coordinates, so the rectangle will have non negative width and height, and its x and y coordinates specified lower left point.
llx | the X coordinate of lower left point |
lly | the Y coordinate of lower left point |
urx | the X coordinate of upper right point |
ury | the Y coordinate of upper right point |
|
inlinevirtual |
Sets the height of rectangle.
Sets the height of rectangle. May be used in chain.
height | the the width of rectangle to be set. |
|
inlinevirtual |
Sets the width of rectangle.
Sets the width of rectangle. May be used in chain.
width | the the width of rectangle to be set. |
|
inlinevirtual |
Sets the X coordinate of lower left point.
Sets the X coordinate of lower left point. May be used in chain.
x | the X coordinate of lower left point to be set. |
|
inlinevirtual |
Sets the Y coordinate of lower left point.
Sets the Y coordinate of lower left point. May be used in chain.
y | the Y coordinate of lower left point to be set. |
|
inlinevirtual |
Convert rectangle to an array of points
|
inline |
Gets the string representation of rectangle.