Struct Rectangle

Struct Rectangle

Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.1.0)

تخزن مجموعة من أربعة أعداد صحيحة تمثل موقع وحجم مستطيل.

public struct Rectangle

الأعضاء الموروثة

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

المُنشئات

Rectangle(int, int, int, int)

يقوم بتهيئة مثيل جديد من هيكل Aspose.OCR.Rectangle بالموقع والحجم المحددين.

public Rectangle(int x, int y, int width, int height)

المعلمات

x int

إحداثي x للزاوية العلوية اليسرى من المستطيل.

y int

إحداثي y للزاوية العلوية اليسرى من المستطيل.

width int

عرض المستطيل.

height int

ارتفاع المستطيل.

الحقول

Height

عرض المستطيل.

public int Height

قيمة الحقل

int

Width

ارتفاع المستطيل.

public int Width

قيمة الحقل

int

X

موقع x للمستطيل.

public int X

قيمة الحقل

int

Y

موقع y للمستطيل.

public int Y

قيمة الحقل

int

الخصائص

Bottom

يحصل أو يحدد إحداثي y الذي هو مجموع قيم خصائص Aspose.OCR.Rectangle.Y و Aspose.OCR.Rectangle.Height لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public int Bottom { get; set; }

قيمة الخاصية

int

Empty

يحصل على مثيل جديد من هيكل Aspose.OCR.Rectangle الذي تكون قيم Aspose.OCR.Rectangle.X و Aspose.OCR.Rectangle.Y و Aspose.OCR.Rectangle.Width و Aspose.OCR.Rectangle.Height فيه مضبوطة على الصفر.

public static Rectangle Empty { get; }

قيمة الخاصية

Rectangle

IsEmpty

يحصل على قيمة تشير إلى ما إذا كانت جميع الخصائص العددية لهذا الهيكل من نوع Aspose.OCR.Rectangle لها قيم صفرية.

public bool IsEmpty { get; }

قيمة الخاصية

bool

Left

يحصل أو يحدد إحداثي x للحافة اليسرى لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public int Left { get; set; }

قيمة الخاصية

int

Right

يحصل أو يحدد إحداثي x الذي هو مجموع قيم خصائص Aspose.OCR.Rectangle.X و Aspose.OCR.Rectangle.Width لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public int Right { get; set; }

قيمة الخاصية

int

Top

يحصل أو يحدد إحداثي y للحافة العلوية لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public int Top { get; set; }

قيمة الخاصية

int

الطرق

Contains(int, int)

يحدد ما إذا كانت النقطة المحددة موجودة داخل هذا الهيكل من نوع Aspose.OCR.Rectangle.

public bool Contains(int x, int y)

المعلمات

x int

إحداثي x للنقطة التي سيتم اختبارها.

y int

إحداثي y للنقطة التي سيتم اختبارها.

العائدات

bool

ترجع هذه الطريقة true إذا كانت النقطة المحددة بواسطة x و y موجودة داخل هذا الهيكل من نوع Aspose.OCR.Rectangle؛ وإلا false.

Equals(object)

يختبر ما إذا كان obj هو هيكل Aspose.OCR.Rectangle بنفس الموقع والحجم لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public override bool Equals(object obj)

المعلمات

obj object

كائن System.Object للاختبار.

العائدات

bool

ترجع هذه الطريقة true إذا كان obj هو هيكل Aspose.OCR.Rectangle وخصائصه Aspose.OCR.Rectangle.X و Aspose.OCR.Rectangle.Y و Aspose.OCR.Rectangle.Width و Aspose.OCR.Rectangle.Height متساوية مع الخصائص المقابلة لهذا الهيكل من نوع Aspose.OCR.Rectangle؛ وإلا، false.

GetHashCode()

ترجع رمز التجزئة لهذا الهيكل من نوع Aspose.OCR.Rectangle.

public override int GetHashCode()

العائدات

int

عدد صحيح يمثل رمز التجزئة لهذا المستطيل.

ToString()

تحول سمات هذا الهيكل من نوع Aspose.OCR.Rectangle إلى سلسلة قابلة للقراءة البشرية.

public override string ToString()

العائدات

string

سلسلة تحتوي على الموقع والعرض والارتفاع لهذا الهيكل من نوع Aspose.OCR.Rectangle.

المشغلون

operator ==(Rectangle, Rectangle)

يختبر ما إذا كانت هيكلان من نوع Aspose.OCR.Rectangle لهما موقع وحجم متساويين.

public static bool operator ==(Rectangle left, Rectangle right)

المعلمات

left Rectangle

هيكل Aspose.OCR.Rectangle الذي يكون على يسار عامل المساواة.

right Rectangle

هيكل Aspose.OCR.Rectangle الذي يكون على يمين عامل المساواة.

العائدات

bool

ترجع هذه العملية true إذا كانت الهيكلان من نوع Aspose.OCR.Rectangle لهما خصائص Aspose.OCR.Rectangle.X و Aspose.OCR.Rectangle.Y و Aspose.OCR.Rectangle.Width و Aspose.OCR.Rectangle.Height متساوية.

operator !=(Rectangle, Rectangle)

يختبر ما إذا كانت هيكلان من نوع Aspose.OCR.Rectangle تختلف في الموقع أو الحجم.

public static bool operator !=(Rectangle left, Rectangle right)

المعلمات

left Rectangle

هيكل Aspose.OCR.Rectangle الذي يكون على يسار عامل عدم المساواة.

right Rectangle

هيكل Aspose.OCR.Rectangle الذي يكون على يمين عامل عدم المساواة.

العائدات

bool

ترجع هذه العملية true إذا كانت أي من خصائص Aspose.OCR.Rectangle.X أو Aspose.OCR.Rectangle.Y أو Aspose.OCR.Rectangle.Width أو Aspose.OCR.Rectangle.Height للهيكلين من نوع Aspose.OCR.Rectangle غير متساوية؛ وإلا false.

 عربي