Box Class
Box is a public class representing a rectangle, employed for highlighting and positional referencing.
Definition
- Namespace:
UiPath.DocumentProcessing.Contracts - Assembly:
UiPath.DocumentProcessing.Contracts
Description
Box is a public class that represents a rectangle, used for evidencing and positional referencing, throughout the entire assembly. When serialized, a Box is stored as an array of four double values, representing the [Top, Left, Width and Height] of the respective Box object.
Members
Methods
CreateChecked(double Top, double left, double Width,double Height) - A static method that returns an instance of theBoxclass with the properties provided as arguments. This method checks that all provided values are greater than 0, to ensure valid objects are created.CreateSize(double Width, double Height) - A static method that creates an instance of theBoxclass with a(0,0)position and the width and height that are provided as arguments.CreateUnchecked(double Top, double left, double Width, double Height) - A static method that returns an instance of theBoxclass with the properties provided as arguments. This method does not perform any sanity checks on the arguments.CreateUncheckedWithNoRounding(double Top, double Left,double Width, double Height) - A static method that returns an instance of theBoxclass with the properties provided as arguments. This method does not perform any sanity checks or rounding on the arguments.Equals(object Box) - Checks if the argument is a box and if its properties are equal. Returns a boolean value.Equals(Box Box)- Checks if the object is equal to the argument, property-wise.
GetHashCode()- Returns the hash code for the instance.operator !=(Box Box) - A static method that returnsTrueif the two boxes have different property values.operator == (Box Box)- A static method that returnsTrueif the two boxes have equal property values.
Properties
Areadouble- The area of the box.Bottomdouble-The bottom position of the box.Heightdouble- The height of the box.HorizontalCenterdouble- The horizontal center of the box, asLeft + Width / 2.IsEmptydouble- Specifies whether theBoxequalsBox.None, property-wise.Leftdouble- The left margin of the box.Rightdouble- The right margin position of the box.Topdouble- The top position of the box.VerticalCenterdouble- The vertical center of the box, asTop + Height / 2.Widthdouble- The width of the box.None- A static read-only that returns a newBoxinstance with top, left, width and height equal to 0.