ArcShape

ArcShape()

يقوم بتهيئة مثيل جديد لملفArcShape فئة .

public ArcShape()

أنظر أيضا


ArcShape(RectangleF, float, float)

يقوم بتهيئة مثيل جديد لملفArcShape فئة .

public ArcShape(RectangleF rectangle, float startAngle, float sweepAngle)
معامليكتبوصف
rectangleRectangleFالمستطيل.
startAngleSingleزاوية البداية.
sweepAngleSingleزاوية الاجتياح.

أمثلة

ينشئ هذا المثال صورة جديدة ويرسم مجموعة متنوعة من الأشكال باستخدام Figures and GraphicsPath على سطح الصورة

[C#]

// ينشئ مثيلاً لـ BmpOptions ويضبط خصائصه المختلفة            
Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
bmpOptions.BitsPerPixel = 24;

// قم بإنشاء مثيل لـ FileCreateSource وقم بتعيينه كمصدر لمثيل BmpOptions
// تحدد المعلمة المنطقية الثانية ما إذا كان الملف المراد إنشاؤه ثابتًا أم لا
bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"c:\temp\output.bmp", false);

// إنشاء مثيل للصورة 
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
{
    // إنشاء وتهيئة مثيل لفئة الرسومات
    Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

    // مسح سطح الرسومات
    graphics.Clear(Color.Wheat);

    // إنشاء مثيل لفئة GraphicsPath
    Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

    // إنشاء مثيل لفئة الشكل
    Aspose.Imaging.Figure figure1 = new Aspose.Imaging.Figure();

    // إضافة شكل إلى كائن الشكل
    figure1.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new RectangleF(50, 50, 300, 300)));
    figure1.AddShape(new Aspose.Imaging.Shapes.PieShape(new Rectangle(new Point(110, 110), new Size(200, 200)), 0, 90));

    // إنشاء مثيل لفئة الشكل
    Aspose.Imaging.Figure figure2 = new Aspose.Imaging.Figure();

    // إضافة شكل إلى كائن الشكل
    figure2.AddShape(new Aspose.Imaging.Shapes.ArcShape(new Aspose.Imaging.RectangleF(10, 10, 300, 300), 0, 45));
    figure2.AddShape(new Aspose.Imaging.Shapes.PolygonShape(new[] { new Aspose.Imaging.PointF(150, 10), new Aspose.Imaging.PointF(150, 200), new Aspose.Imaging.PointF(250, 300), new Aspose.Imaging.PointF(350, 400) }, true));
    figure2.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(200, 200))));

    // إضافة كائن الشكل إلى GraphicsPath
    graphicspath.AddFigures(new[] { figure1, figure2 });

    // رسم المسار باستخدام كائن القلم ذي اللون الأسود
    graphics.DrawPath(new Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

    // احفظ جميع التغييرات.
    image.Save();
}

أنظر أيضا


ArcShape(RectangleF, float, float, bool)

يقوم بتهيئة مثيل جديد لملفArcShape فئة .

public ArcShape(RectangleF rectangle, float startAngle, float sweepAngle, bool isClosed)
معامليكتبوصف
rectangleRectangleFالمستطيل.
startAngleSingleزاوية البداية.
sweepAngleSingleزاوية الاجتياح.
isClosedBooleanإذا تم التعيين علىحقيقي القوس مغلق. القوس المغلق يتحول في الواقع إلى قطع ناقص.

أنظر أيضا