GraphicsPath
Inheritance: java.lang.Object, com.aspose.imaging.ObjectWithBounds
public final class GraphicsPath extends ObjectWithBounds
يمثل سلسلة من الخطوط والمنحنيات المتصلة. لا يمكن وراثة هذه الفئة.
المنشئات
| المنشئ | الوصف |
|---|---|
| GraphicsPath() | ينشئ مثيلاً جديداً من الفئة GraphicsPath. |
| GraphicsPath(Figure[] figures) | ينشئ مثيلاً جديداً من الفئة GraphicsPath. |
| GraphicsPath(Figure[] figures, int fillMode) | ينشئ مثيلاً جديداً من الفئة GraphicsPath. |
| GraphicsPath(int fillMode) | ينشئ مثيلاً جديداً من الفئة GraphicsPath. |
الطرق
| طريقة | الوصف |
|---|---|
| getFillMode() | يحصل على تعداد com.aspose.imaging.FillMode الذي يحدد كيفية ملء داخل الأشكال في هذا com.aspose.imaging.GraphicsPath. |
| setFillMode(int value) | يضبط تعداد com.aspose.imaging.FillMode الذي يحدد كيفية تعبئة داخل الأشكال في هذا com.aspose.imaging.GraphicsPath. |
| getFigures() | يسترجع أشكال المسار. |
| getBounds() | يحصل أو يعيّن حدود الكائن. |
| reset() | يفرغ مسار الرسومات ويضبط com.aspose.imaging.FillMode إلى F:com.aspose.imaging.fillMode.alternate. |
| reverse() | يعكس ترتيب الأشكال، والرسومات، والنقاط في كل شكل من هذا com.aspose.imaging.graphicsPath. |
| isVisible(float x, float y) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isVisible(PointF point) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isVisible(int x, int y) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isVisible(Point point) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isVisible(float x, float y, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath في منطقة القص المرئية للـ com.aspose.imaging.graphics المحدد. |
| isVisible(PointF pt, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isVisible(int x, int y, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath باستخدام الـ com.aspose.imaging.graphics المحدد. |
| isVisible(Point pt, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath. |
| isOutlineVisible(float x, float y, Pen pen) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد. |
| isOutlineVisible(PointF point, Pen pen) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد. |
| isOutlineVisible(float x, float y, Pen pen, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد. |
| isOutlineVisible(PointF pt, Pen pen, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد. |
| isOutlineVisible(int x, int y, Pen pen) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد. |
| isOutlineVisible(Point point, Pen pen) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد. |
| isOutlineVisible(int x, int y, Pen pen, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد. |
| isOutlineVisible(Point pt, Pen pen, Graphics graphics) | يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد. |
| flatten() | يحوّل كل منحنى في هذا المسار إلى سلسلة من القطع الخطية المتصلة. |
| flatten(Matrix matrix) | يطبق التحويل المحدد ثم يحوّل كل منحنى في هذا com.aspose.imaging.GraphicsPath إلى سلسلة من القطع الخطية المتصلة. |
| flatten(Matrix matrix, float flatness) | يحوّل كل منحنى في هذا com.aspose.imaging.GraphicsPath إلى سلسلة من القطع الخطية المتصلة. |
| widen(Pen pen) | يضيف حدودًا إضافية إلى المسار. |
| widen(Pen pen, Matrix matrix) | يضيف حدودًا إضافية إلى com.aspose.imaging.graphicsPath. |
| widen(Pen pen, Matrix matrix, float flatness) | يستبدل هذا com.aspose.imaging.GraphicsPath بمنحنيات تحيط بالمنطقة التي تُملأ عندما يُرسم هذا المسار بالقلم المحدد. |
| warp(PointF[] destPoints, RectangleF srcRect) | يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath. |
| warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix) | يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath. |
| warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode) | يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath. |
| warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode, float flatness) | يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath. |
| addFigure(Figure figure) | يضيف شكلًا جديدًا. |
| addFigures(Figure[] figures) | يضيف أشكالًا جديدة. |
| removeFigure(Figure figure) | يزيل شكلًا. |
| removeFigures(Figure[] figures) | يزيل أشكالًا. |
| addPath(GraphicsPath addingPath) | يضيف الـ com.aspose.imaging.GraphicsPath المحدد إلى هذا المسار. |
| addPath(GraphicsPath addingPath, boolean connect) | يضيف الـ com.aspose.imaging.GraphicsPath المحدد إلى هذا المسار. |
| getBounds(Matrix matrix) | يحصل على حدود الكائن. |
| getBounds(Matrix matrix, Pen pen) | يحصل على حدود الكائن. |
| deepClone() | ينفّذ استنساخًا عميقًا لهذا مسار الرسومات. |
| transform(Matrix transform) | يطبق التحويل المحدد على الشكل. |
| equals(Object o) | تحقق مما إذا كانت الكائنات متساوية. |
| hashCode() | احصل على رمز التجزئة للكائن الحالي. |
Example: This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface.
تستخدم هذه الأمثلة فئة GraphicsPath وفئة Graphics لإنشاء وتعديل الأشكال على سطح صورة. ينشئ المثال صورة جديدة (من نوع Tiff) ويرسم المسارات بمساعدة فئة GraphicsPath. في النهاية يتم استدعاء طريقة DrawPath التي توفرها فئة Graphics لعرض المسارات على السطح.
// إنشاء نسخة من FileStream
com.aspose.imaging.system.io.FileStream stream = new com.aspose.imaging.system.io.FileStream("C:\\temp\\output.tif", com.aspose.imaging.system.io.FileMode.Create);
try {
// إنشاء نسخة من TiffOptions وتعيين خصائصه المتنوعة
com.aspose.imaging.imageoptions.TiffOptions tiffOptions = new com.aspose.imaging.imageoptions.TiffOptions(com.aspose.imaging.fileformats.tiff.enums.TiffExpectedFormat.Default);
// تعيين المصدر لنسخة من ImageOptions
tiffOptions.setSource(new com.aspose.imaging.sources.StreamSource(stream));
// إنشاء نسخة من Image
com.aspose.imaging.Image image = com.aspose.imaging.Image.create(tiffOptions, 500, 500);
try {
// إنشاء وتهيئة نسخة من فئة Graphics
com.aspose.imaging.Graphics graphics = new com.aspose.imaging.Graphics(image);
// مسح سطح Graphics
graphics.clear(com.aspose.imaging.Color.getWheat());
// إنشاء نسخة من فئة GraphicsPath
com.aspose.imaging.GraphicsPath graphicspath = new com.aspose.imaging.GraphicsPath();
// إنشاء نسخة من فئة Figure
com.aspose.imaging.Figure figure = new com.aspose.imaging.Figure();
// إضافة أشكال إلى كائن Figure
figure.addShape(new com.aspose.imaging.shapes.RectangleShape(new com.aspose.imaging.RectangleF(10, 10, 300, 300)));
figure.addShape(new com.aspose.imaging.shapes.EllipseShape(new com.aspose.imaging.RectangleF(50, 50, 300, 300)));
figure.addShape(
new com.aspose.imaging.shapes.PieShape(new com.aspose.imaging.RectangleF(
new com.aspose.imaging.PointF(250, 250),
new com.aspose.imaging.SizeF(200, 200)),
0, 45));
// إضافة كائن Figure إلى GraphicsPath
graphicspath.addFigure(figure);
// رسم مسار باستخدام كائن Pen باللون الأسود
graphics.drawPath(new com.aspose.imaging.Pen(com.aspose.imaging.Color.getBlack(), 2), graphicspath);
// حفظ جميع التغييرات.
image.save();
} finally {
image.dispose();
}
} finally {
stream.dispose();
}
GraphicsPath()
public GraphicsPath()
ينشئ مثيلاً جديداً من الفئة GraphicsPath.
GraphicsPath(Figure[] figures)
public GraphicsPath(Figure[] figures)
ينشئ مثيلاً جديداً من الفئة GraphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figures | Figure[] | الأشكال التي سيتم التهيئة منها. |
GraphicsPath(Figure[] figures, int fillMode)
public GraphicsPath(Figure[] figures, int fillMode)
ينشئ مثيلاً جديداً من الفئة GraphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figures | Figure[] | الأشكال التي سيتم التهيئة منها. |
| fillMode | int | وضع التعبئة. |
GraphicsPath(int fillMode)
public GraphicsPath(int fillMode)
ينشئ مثيلاً جديداً من الفئة GraphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| fillMode | int | وضع التعبئة. |
getFillMode()
public int getFillMode()
يحصل على تعداد com.aspose.imaging.FillMode الذي يحدد كيفية ملء داخل الأشكال في هذا com.aspose.imaging.GraphicsPath.
Returns:
int - وضع التعبئة. تعداد com.aspose.imaging.FillMode يحدد كيفية ملء داخل الأشكال في هذا com.aspose.imaging.GraphicsPath.
setFillMode(int value)
public void setFillMode(int value)
يضبط تعداد com.aspose.imaging.FillMode الذي يحدد كيفية تعبئة داخل الأشكال في هذا com.aspose.imaging.GraphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| القيمة | int | وضع التعبئة. |
getFigures()
public Figure[] getFigures()
يسترجع أشكال المسار.
Returns: com.aspose.imaging.Figure[] - أشكال المسار.
getBounds()
public RectangleF getBounds()
يحصل أو يعيّن حدود الكائن.
Returns: RectangleF - The object’s bounds.
reset()
public void reset()
يفرغ مسار الرسومات ويضبط com.aspose.imaging.FillMode إلى F:com.aspose.imaging.fillMode.alternate.
reverse()
public void reverse()
يعكس ترتيب الأشكال، والرسومات، والنقاط في كل شكل من هذا com.aspose.imaging.graphicsPath.
isVisible(float x, float y)
public boolean isVisible(float x, float y)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | float | إحداثي x للنقطة المراد اختبارها. |
| ص | float | إحداثي y للنقطة المراد اختبارها. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(PointF point)
public boolean isVisible(PointF point)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| point | PointF | com.aspose.imaging.PointF الذي يمثل النقطة التي سيتم اختبارها. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(int x, int y)
public boolean isVisible(int x, int y)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | int | إحداثي x للنقطة المراد اختبارها. |
| ص | int | إحداثي y للنقطة المراد اختبارها. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(Point point)
public boolean isVisible(Point point)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| point | Point | com.aspose.imaging.Point الذي يمثل النقطة التي سيتم اختبارها. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(float x, float y, Graphics graphics)
public boolean isVisible(float x, float y, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath في منطقة القص المرئية للـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | float | إحداثي x للنقطة المراد اختبارها. |
| ص | float | إحداثي y للنقطة المراد اختبارها. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(PointF pt, Graphics graphics)
public boolean isVisible(PointF pt, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pt | PointF | com.aspose.imaging.PointF الذي يمثل النقطة التي سيتم اختبارها. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns: boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا؛ وإلا false.
isVisible(int x, int y, Graphics graphics)
public boolean isVisible(int x, int y, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath باستخدام الـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | int | إحداثي x للنقطة المراد اختبارها. |
| ص | int | إحداثي y للنقطة المراد اختبارها. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isVisible(Point pt, Graphics graphics)
public boolean isVisible(Point pt, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pt | Point | com.aspose.imaging.Point الذي يمثل النقطة التي سيتم اختبارها. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل هذا com.aspose.imaging.GraphicsPath؛ وإلا false.
isOutlineVisible(float x, float y, Pen pen)
public boolean isOutlineVisible(float x, float y, Pen pen)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | float | إحداثي x للنقطة المراد اختبارها. |
| ص | float | إحداثي y للنقطة المراد اختبارها. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath عند رسمه باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(PointF point, Pen pen)
public boolean isOutlineVisible(PointF point, Pen pen)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| point | PointF | com.aspose.imaging.PointF الذي يحدد الموقع للاختبار. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath عند رسمه باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(float x, float y, Pen pen, Graphics graphics)
public boolean isOutlineVisible(float x, float y, Pen pen, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | float | إحداثي x للنقطة المراد اختبارها. |
| ص | float | إحداثي y للنقطة المراد اختبارها. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath كما يُرسم باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(PointF pt, Pen pen, Graphics graphics)
public boolean isOutlineVisible(PointF pt, Pen pen, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pt | PointF | com.aspose.imaging.PointF الذي يحدد الموقع للاختبار. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath كما يُرسم باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(int x, int y, Pen pen)
public boolean isOutlineVisible(int x, int y, Pen pen)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | int | إحداثي x للنقطة المراد اختبارها. |
| ص | int | إحداثي y للنقطة المراد اختبارها. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath عند رسمه باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(Point point, Pen pen)
public boolean isOutlineVisible(Point point, Pen pen)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.pen المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| point | Point | com.aspose.imaging.Point الذي يحدد الموقع للاختبار. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath عند رسمه باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(int x, int y, Pen pen, Graphics graphics)
public boolean isOutlineVisible(int x, int y, Pen pen, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| س | int | إحداثي x للنقطة المراد اختبارها. |
| ص | int | إحداثي y للنقطة المراد اختبارها. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath كما يُرسم باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
isOutlineVisible(Point pt, Pen pen, Graphics graphics)
public boolean isOutlineVisible(Point pt, Pen pen, Graphics graphics)
يشير إلى ما إذا كانت النقطة المحددة موجودة داخل (تحت) حدود هذا com.aspose.imaging.GraphicsPath عند رسمه بالـ com.aspose.imaging.Pen المحدد وباستخدام الـ com.aspose.imaging.graphics المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pt | Point | com.aspose.imaging.Point الذي يحدد الموقع للاختبار. |
| pen | Pen | com.aspose.imaging.Pen للاختبار. |
| graphics | Graphics | com.aspose.imaging.Graphics لاختبار الرؤية. |
Returns:
boolean - تُعيد هذه الطريقة true إذا كانت النقطة المحددة موجودة داخل حدود هذا com.aspose.imaging.GraphicsPath كما يُرسم باستخدام com.aspose.imaging.Pen المحدد؛ وإلا false.
flatten()
public void flatten()
يحوّل كل منحنى في هذا المسار إلى سلسلة من القطع الخطية المتصلة.
flatten(Matrix matrix)
public void flatten(Matrix matrix)
يطبق التحويل المحدد ثم يحوّل كل منحنى في هذا com.aspose.imaging.GraphicsPath إلى سلسلة من القطع الخطية المتصلة.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| matrix | Matrix | com.aspose.imaging.Matrix الذي يُستخدم لتحويل هذا com.aspose.imaging.GraphicsPath قبل التسوية. |
flatten(Matrix matrix, float flatness)
public void flatten(Matrix matrix, float flatness)
يحوّل كل منحنى في هذا com.aspose.imaging.GraphicsPath إلى سلسلة من القطع الخطية المتصلة.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| matrix | Matrix | com.aspose.imaging.Matrix الذي يُستخدم لتحويل هذا com.aspose.imaging.GraphicsPath قبل التسوية. |
| السطحية | float | يحدد الحد الأقصى للخطأ المسموح بين المنحنى وتقريبه المسطح. القيمة الافتراضية هي 0.25. تقليل قيمة السطحية سيزيد عدد مقاطع الخط في التقريب. |
widen(Pen pen)
public void widen(Pen pen)
يضيف حدودًا إضافية إلى المسار.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pen | Pen | com.aspose.imaging.Pen الذي يحدد العرض بين الحدود الأصلية للمسار والحدود الجديدة التي تُنشئها هذه الطريقة. |
widen(Pen pen, Matrix matrix)
public void widen(Pen pen, Matrix matrix)
يضيف حدودًا إضافية إلى com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pen | Pen | com.aspose.imaging.Pen الذي يحدد العرض بين الحدود الأصلية للمسار والحدود الجديدة التي تُنشئها هذه الطريقة. |
| matrix | Matrix | com.aspose.imaging.Matrix الذي يحدد التحويل لتطبيقه على المسار قبل توسيعه. |
widen(Pen pen, Matrix matrix, float flatness)
public void widen(Pen pen, Matrix matrix, float flatness)
يستبدل هذا com.aspose.imaging.GraphicsPath بمنحنيات تحيط بالمنطقة التي تُملأ عندما يُرسم هذا المسار بالقلم المحدد.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| pen | Pen | com.aspose.imaging.Pen الذي يحدد العرض بين الحدود الأصلية للمسار والحدود الجديدة التي تُنشئها هذه الطريقة. |
| matrix | Matrix | com.aspose.imaging.Matrix الذي يحدد التحويل لتطبيقه على المسار قبل توسيعه. |
| السطحية | float | قيمة تحدد السطحية للمنحنيات. |
warp(PointF[] destPoints, RectangleF srcRect)
public void warp(PointF[] destPoints, RectangleF srcRect)
يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| destPoints | PointF[] | مصفوفة من هياكل com.aspose.imaging.PointF التي تُعرّف متوازي أضلاع يتم تحويل المستطيل المحدد بـ srcRect إليه. يمكن أن تحتوي المصفوفة على ثلاثة أو أربعة عناصر. إذا احتوت المصفوفة على ثلاثة عناصر، فإن الزاوية السفلية اليمنى للمتوازي أضلاع تُستنتج من النقاط الثلاث الأولى. |
| srcRect | RectangleF | com.aspose.imaging.RectangleF الذي يمثل المستطيل الذي يُحول إلى المتوازي أضلاع المحدد بـ destPoints. |
warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix)
public void warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix)
يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| destPoints | PointF[] | مصفوفة من هياكل com.aspose.imaging.PointF التي تُعرّف متوازي أضلاع يتم تحويل المستطيل المحدد بـ srcRect إليه. يمكن أن تحتوي المصفوفة على ثلاثة أو أربعة عناصر. إذا احتوت المصفوفة على ثلاثة عناصر، فإن الزاوية السفلية اليمنى للمتوازي أضلاع تُستنتج من النقاط الثلاث الأولى. |
| srcRect | RectangleF | com.aspose.imaging.RectangleF الذي يمثل المستطيل الذي يُحول إلى المتوازي أضلاع المحدد بـ destPoints. |
| matrix | Matrix | com.aspose.imaging.Matrix الذي يحدد تحويلًا هندسيًا لتطبيقه على المسار. |
warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode)
public void warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode)
يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| destPoints | PointF[] | مصفوفة من هياكل com.aspose.imaging.PointF التي تُعرّف متوازي أضلاع يتم تحويل المستطيل المحدد بـ srcRect إليه. يمكن أن تحتوي المصفوفة على ثلاثة أو أربعة عناصر. إذا احتوت المصفوفة على ثلاثة عناصر، فإن الزاوية السفلية اليمنى للمتوازي أضلاع تُستنتج من النقاط الثلاث الأولى. |
| srcRect | RectangleF | com.aspose.imaging.RectangleF الذي يمثل المستطيل الذي يُحول إلى المتوازي أضلاع المحدد بـ destPoints. |
| matrix | Matrix | com.aspose.imaging.Matrix الذي يحدد تحويلًا هندسيًا لتطبيقه على المسار. |
| وضع الالتواء | int | تعداد com.aspose.imaging.WarpMode يحدد ما إذا كانت عملية الالتواء هذه تستخدم وضع المنظور أو الوضع الثنائي الخطية. |
warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode, float flatness)
public void warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, int warpMode, float flatness)
يطبق تحويل تشويه، يُعرّف بواسطة مستطيل ومتوازي أضلاع، على هذا com.aspose.imaging.graphicsPath.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| destPoints | PointF[] | مصفوفة من هياكل com.aspose.imaging.PointF التي تُعرّف متوازي أضلاع يتم تحويل المستطيل المحدد بـ srcRect إليه. يمكن أن تحتوي المصفوفة على ثلاثة أو أربعة عناصر. إذا احتوت المصفوفة على ثلاثة عناصر، فإن الزاوية السفلية اليمنى للمتوازي أضلاع تُستنتج من النقاط الثلاث الأولى. |
| srcRect | RectangleF | com.aspose.imaging.RectangleF الذي يمثل المستطيل الذي يُحول إلى المتوازي أضلاع المحدد بـ destPoints. |
| matrix | Matrix | com.aspose.imaging.Matrix الذي يحدد تحويلًا هندسيًا لتطبيقه على المسار. |
| وضع الالتواء | int | تعداد com.aspose.imaging.WarpMode يحدد ما إذا كانت عملية الالتواء هذه تستخدم وضع المنظور أو الوضع الثنائي الخطية. |
| السطحية | float | قيمة تتراوح بين 0 و 1 تحدد مدى تسطيح المسار الناتج. لمزيد من المعلومات، راجع طرق com.aspose.imaging.GraphicsPath.flatten. |
addFigure(Figure figure)
public void addFigure(Figure figure)
يضيف شكلًا جديدًا.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figure | Figure | الشكل المراد إضافته. |
Example: This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface. تستخدم هذه الأمثلة فئة GraphicsPath وفئة Graphics لإنشاء وتعديل الأشكال على سطح صورة. ينشئ المثال صورة جديدة (من نوع Tiff) ويرسم المسارات بمساعدة فئة GraphicsPath. في النهاية يتم استدعاء طريقة DrawPath التي توفرها فئة Graphics لعرض المسارات على السطح.
// إنشاء نسخة من FileStream
com.aspose.imaging.system.io.FileStream stream = new com.aspose.imaging.system.io.FileStream("C:\\temp\\output.tif", com.aspose.imaging.system.io.FileMode.Create);
try {
// إنشاء نسخة من TiffOptions وتعيين خصائصه المتنوعة
com.aspose.imaging.imageoptions.TiffOptions tiffOptions = new com.aspose.imaging.imageoptions.TiffOptions(com.aspose.imaging.fileformats.tiff.enums.TiffExpectedFormat.Default);
// تعيين المصدر لنسخة من ImageOptions
tiffOptions.setSource(new com.aspose.imaging.sources.StreamSource(stream));
// إنشاء نسخة من Image
com.aspose.imaging.Image image = com.aspose.imaging.Image.create(tiffOptions, 500, 500);
try {
// إنشاء وتهيئة نسخة من فئة Graphics
com.aspose.imaging.Graphics graphics = new com.aspose.imaging.Graphics(image);
// مسح سطح Graphics
graphics.clear(com.aspose.imaging.Color.getWheat());
// إنشاء نسخة من فئة GraphicsPath
com.aspose.imaging.GraphicsPath graphicspath = new com.aspose.imaging.GraphicsPath();
// إنشاء نسخة من فئة Figure
com.aspose.imaging.Figure figure = new com.aspose.imaging.Figure();
// إضافة أشكال إلى كائن Figure
figure.addShape(new com.aspose.imaging.shapes.RectangleShape(new com.aspose.imaging.RectangleF(10, 10, 300, 300)));
figure.addShape(new com.aspose.imaging.shapes.EllipseShape(new com.aspose.imaging.RectangleF(50, 50, 300, 300)));
figure.addShape(
new com.aspose.imaging.shapes.PieShape(new com.aspose.imaging.RectangleF(
new com.aspose.imaging.PointF(250, 250),
new com.aspose.imaging.SizeF(200, 200)),
0, 45));
// إضافة كائن Figure إلى GraphicsPath
graphicspath.addFigure(figure);
// رسم مسار باستخدام كائن Pen باللون الأسود
graphics.drawPath(new com.aspose.imaging.Pen(com.aspose.imaging.Color.getBlack(), 2), graphicspath);
// حفظ جميع التغييرات.
image.save();
} finally {
image.dispose();
}
} finally {
stream.dispose();
}
addFigures(Figure[] figures)
public void addFigures(Figure[] figures)
يضيف أشكالًا جديدة.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figures | Figure[] | الأشكال المراد إضافتها. |
Example: This example creates a new Image and draws a variety of shapes using Figures and GraphicsPath o… هذا المثال ينشئ صورة جديدة ويرسم مجموعة متنوعة من الأشكال باستخدام Figures و GraphicsPath على سطح الصورة.
//ينشئ مثيلاً من BmpOptions ويضبط خصائصه المتنوعة.
com.aspose.imaging.imageoptions.BmpOptions bmpOptions = new com.aspose.imaging.imageoptions.BmpOptions();
bmpOptions.setBitsPerPixel(24);
//إنشاء مثيل من FileCreateSource وتعيينه كقيمة Source لمثيل BmpOptions.
//المعامل البولياني الثاني يحدد ما إذا كان الملف الذي سيتم إنشاؤه مؤقتًا أم لا.
bmpOptions.setSource(new com.aspose.imaging.sources.FileCreateSource("c:\\temp\\output.bmp", false));
//إنشاء نسخة من Image
com.aspose.imaging.Image image = com.aspose.imaging.Image.create(bmpOptions, 500, 500);
try {
//إنشاء وتهيئة نسخة من فئة Graphics
com.aspose.imaging.Graphics graphics = new com.aspose.imaging.Graphics(image);
//مسح سطح Graphics
graphics.clear(com.aspose.imaging.Color.getWheat());
//إنشاء نسخة من فئة GraphicsPath
com.aspose.imaging.GraphicsPath graphicspath = new com.aspose.imaging.GraphicsPath();
//إنشاء نسخة من فئة Figure
com.aspose.imaging.Figure figure1 = new com.aspose.imaging.Figure();
//إضافة شكل إلى كائن Figure.
figure1.addShape(new com.aspose.imaging.shapes.EllipseShape(new com.aspose.imaging.RectangleF(50, 50, 300, 300)));
figure1.addShape(new com.aspose.imaging.shapes.PieShape(
new com.aspose.imaging.RectangleF(
new com.aspose.imaging.PointF(110, 110),
new com.aspose.imaging.SizeF(200, 200)), 0, 90));
//إنشاء نسخة من فئة Figure
com.aspose.imaging.Figure figure2 = new com.aspose.imaging.Figure();
//إضافة شكل إلى كائن Figure.
figure2.addShape(new com.aspose.imaging.shapes.ArcShape(new com.aspose.imaging.RectangleF(10, 10, 300, 300), 0, 45));
figure2.addShape(new com.aspose.imaging.shapes.PolygonShape(
new com.aspose.imaging.PointF[]
{
new com.aspose.imaging.PointF(150, 10),
new com.aspose.imaging.PointF(150, 200),
new com.aspose.imaging.PointF(250, 300),
new com.aspose.imaging.PointF(350, 400)}, true));
figure2.addShape(new com.aspose.imaging.shapes.RectangleShape(
new com.aspose.imaging.RectangleF(
new com.aspose.imaging.PointF(250, 250),
new com.aspose.imaging.SizeF(200, 200))));
//إضافة كائن Figure إلى GraphicsPath
graphicspath.addFigures(new com.aspose.imaging.Figure[]{figure1, figure2});
//رسم مسار باستخدام كائن Pen باللون الأسود
graphics.drawPath(new com.aspose.imaging.Pen(com.aspose.imaging.Color.getBlack(), 2), graphicspath);
// احفظ جميع التغييرات.
image.save();
} finally {
image.dispose();
}
removeFigure(Figure figure)
public void removeFigure(Figure figure)
يزيل شكلًا.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figure | Figure | الشكل المراد إزالته. |
removeFigures(Figure[] figures)
public void removeFigures(Figure[] figures)
يزيل أشكالًا.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| figures | Figure[] | الأشكال المراد إزالتها. |
addPath(GraphicsPath addingPath)
public void addPath(GraphicsPath addingPath)
يضيف الـ com.aspose.imaging.GraphicsPath المحدد إلى هذا المسار.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| addingPath | GraphicsPath | الـ com.aspose.imaging.GraphicsPath المراد إضافته. |
addPath(GraphicsPath addingPath, boolean connect)
public void addPath(GraphicsPath addingPath, boolean connect)
يضيف الـ com.aspose.imaging.GraphicsPath المحدد إلى هذا المسار.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| addingPath | GraphicsPath | الـ com.aspose.imaging.GraphicsPath المراد إضافته. |
| اتصال | boolean | قيمة منطقية تحدد ما إذا كان الشكل الأول في المسار المضاف جزءًا من الشكل الأخير في هذا المسار. القيمة true تعني أن الشكل الأول في المسار المضاف جزء من الشكل الأخير في هذا المسار. القيمة false تعني أن الشكل الأول في المسار المضاف منفصل عن الشكل الأخير في هذا المسار. |
getBounds(Matrix matrix)
public RectangleF getBounds(Matrix matrix)
يحصل على حدود الكائن.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| matrix | Matrix | المصفوفة التي سيتم تطبيقها قبل حساب الحدود. |
Returns: RectangleF - The estimated object’s bounds.
getBounds(Matrix matrix, Pen pen)
public RectangleF getBounds(Matrix matrix, Pen pen)
يحصل على حدود الكائن.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| matrix | Matrix | المصفوفة التي سيتم تطبيقها قبل حساب الحدود. |
| pen | Pen | القلم المستخدم للكائن. يمكن أن يؤثر ذلك على حجم حدود الكائن. |
Returns: RectangleF - The estimated object’s bounds.
deepClone()
public GraphicsPath deepClone()
ينفّذ استنساخًا عميقًا لهذا مسار الرسومات.
Returns: GraphicsPath - A deep clone of the graphics path.
transform(Matrix transform)
public void transform(Matrix transform)
يطبق التحويل المحدد على الشكل.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| transform | Matrix | التحويل المراد تطبيقه. |
equals(Object o)
public boolean equals(Object o)
تحقق مما إذا كانت الكائنات متساوية.
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| o | java.lang.Object | الكائن الآخر. |
Returns: boolean - نتيجة مقارنة المساواة.
hashCode()
public int hashCode()
احصل على رمز التجزئة للكائن الحالي.
Returns: int - رمز التجزئة.