Struct Rectangle
ชื่อพื้นที่: Aspose.OCR การประกอบ: Aspose.OCR.dll (25.4.0)
บันทึกชุดของสี่ชิ้นซึ่งแสดงให้เห็นถึงตําแหน่งและขนาดของมุมตรง
public struct Rectangle
อนุญาโตตุลาการ
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Rectangle(int, int, int, int)
เริ่มต้นตัวอย่างใหม่ของโครงสร้าง Aspose.OCR.Rectangle ด้วยตําแหน่งและขนาดที่ระบุ
public Rectangle(int x, int y, int width, int height)
Parameters
x
int
รั้ว x ของมุมด้านบนด้านซ้ายของแนวตั้ง
y
int
หลักสูตร Y ของมุมด้านบนด้านซ้ายของแนวตั้ง
width
int
ความกว้างของแนวตั้ง
height
int
ความสูงของแนวตั้ง
Fields
Height
ความกว้างตรง
public int Height
หมายเลข
Width
ความสูงของแนวตั้ง
public int Width
หมายเลข
X
ตําแหน่งที่ตรง x
public int X
หมายเลข
Y
ตรงและตําแหน่ง
public int Y
หมายเลข
Properties
Bottom
รับหรือตั้งค่าค่า y ซึ่งเป็นจํานวนของ Aspose.OCR.Rectangle.Y และ Aspose.OCR.Rectangle.High คุณสมบัติของโครงสร้าง Aspose.OCR.Rectangle
public int Bottom { get; set; }
คุณสมบัติมูลค่า
Empty
ได้รับตัวอย่างใหม่ของโครงสร้าง Aspose.OCR.Rectangle ซึ่งมี Aspose.OCR.Rectangle.X, Aspose.OCR.Rectangle.Y, Aspose.OCR.Rectangle.ความกว้างและ Aspose.OCR.Rectangle.ความสูงที่กําหนดไว้เป็นศูนย์
public static Rectangle Empty { get; }
คุณสมบัติมูลค่า
IsEmpty
ได้รับค่าที่แสดงให้เห็นว่าคุณสมบัติดิจิตอลทั้งหมดของ Aspose.OCR.Rectangle มีค่าศูนย์
public bool IsEmpty { get; }
คุณสมบัติมูลค่า
Left
ได้รับหรือตั้งค่าการ koordinate x ของขอบด้านซ้ายของโครงสร้าง Aspose.OCR..Rectangle
public int Left { get; set; }
คุณสมบัติมูลค่า
Right
รับหรือตั้งค่าค่า x ซึ่งเป็นจํานวนของ Aspose.OCR.Rectangle.X และ Aspose.OCR.Rectangle.Width คุณสมบัติของโครงสร้าง Aspose.OCR.Rectangle
public int Right { get; set; }
คุณสมบัติมูลค่า
Top
ได้รับหรือตั้งค่า y-koordinate ของด้านบนของโครงสร้าง Aspose.OCR.Rectangle นี้
public int Top { get; set; }
คุณสมบัติมูลค่า
Methods
Contains(int, int)
จะกําหนดว่าจุดที่ระบุอยู่ในโครงสร้าง Aspose.OCR.Rectangle นี้หรือไม่
public bool Contains(int x, int y)
Parameters
x
int
หลักสูตร X ของจุดที่จะทดสอบ
y
int
องค์ประกอบ Y ของจุดที่จะทดสอบ
Returns
วิธีการนี้จะกลับมาถูกต้องหากจุดที่กําหนดโดย x’ และ
y’ มีอยู่ในโครงสร้าง Aspose.OCR.Rectangle ภายใต้ข้อผิดพลาด
Equals(วัตถุ)
ตรวจสอบว่า obj’ เป็นโครงสร้าง Aspose.OCR.Rectangle ที่มีตําแหน่งและขนาดเดียวกันของโครงสร้าง Aspose.OCR.Rectangle
public override bool Equals(object obj)
Parameters
obj
object
ระบบ.วัตถุในการทดสอบ
Returns
วิธีการนี้จะกลับมาถูกต้องหาก obj’ เป็นโครงสร้าง Aspose.OCR.Rectangle และ Aspose.OCR.Rectangle.X, Aspose.OCR.Rectangle.Y, Aspose.OCR.Rectangle.Width และ Aspose.OCR.Rectangle.Height คุณสมบัติเท่ากับคุณสมบัติที่เกี่ยวข้องของโครงสร้าง Aspose.OCR.Rectangle ฯลฯ ไม่ถูกต้อง
GetHashCode()
กลับรหัส hash สําหรับโครงสร้าง Aspose.OCR.Rectangle นี้
public override int GetHashCode()
Returns
อินเทอร์ซึ่งเป็นตัวแทนของรหัส hash สําหรับแนวตั้งนี้
ToString()
แปลงคุณสมบัติของ Aspose.OCR.Rectangle นี้เป็น string ที่สามารถอ่านได้โดยมนุษย์
public override string ToString()
Returns
ลวดที่มีตําแหน่งความกว้างและความสูงของโครงสร้าง Aspose.OCR.Rectangle
Operators
ผู้ประกอบการ =(ตูด, ตูด)
ตรวจสอบว่าสองโครงสร้าง Aspose.OCR.Rectangle มีตําแหน่งและขนาดเดียวกันหรือไม่
public static bool operator ==(Rectangle left, Rectangle right)
Parameters
left
Rectangle
โครงสร้าง Aspose.OCR.Rectangle ที่อยู่ด้านซ้ายของผู้ประกอบการเท่าเทียม
right
Rectangle
โครงสร้าง Aspose.OCR.Rectangle ที่อยู่กับขวาของผู้ประกอบการเท่าเทียมกัน
Returns
ผู้ประกอบการนี้จะกลับมาถูกต้องถ้าสองโครงสร้าง Aspose.OCR.Rectangle มีคุณสมบัติ Aspose.OCR.Rectangle.X, Aspose.OCR.Rectangle.Y, Aspose.OCR.Rectangle.Width และ Aspose.OCR.Rectangle.High
ผู้ประกอบการ !=(ตูด, ตูด)
ตรวจสอบว่าสองโครงสร้าง Aspose.OCR.Rectangle มีความแตกต่างในตําแหน่งหรือขนาด
public static bool operator !=(Rectangle left, Rectangle right)
Parameters
left
Rectangle
โครงสร้าง Aspose.OCR.Rectangle ที่อยู่ด้านซ้ายของผู้ประกอบการความสม่ําเสมอ
right
Rectangle
โครงสร้าง Aspose.OCR.Rectangle ที่อยู่ในขวาของผู้ประกอบการความไม่เท่าเทียมกัน
Returns
ผู้ประกอบการนี้จะกลับมาถูกต้องถ้าใด ๆ ของ Aspose.OCR.Rectangle.X, Aspose.OCR.Rectangle.Y, Aspose.OCR.Rectangle.Width หรือ Aspose.OCR.Rectangle. คุณสมบัติสูงของสองโครงสร้าง Aspose.OCR.Rectangle เป็นไม่เท่าเทียมกันในทางอื่น ๆ ไม่ถูกต้อง