PieShape
İçindekiler
[
Saklamak
]PieShape()
Yeni bir örneğini başlatırPieShape
sınıf.
public PieShape()
Ayrıca bakınız
- class PieShape
- ad alanı Aspose.Imaging.Shapes
- toplantı Aspose.Imaging
PieShape(RectangleF, float, float)
Yeni bir örneğini başlatırPieShape
sınıf.
public PieShape(RectangleF rectangle, float startAngle, float sweepAngle)
Parametre | Tip | Tanım |
---|---|---|
rectangle | RectangleF | dikdörtgen. |
startAngle | Single | Başlangıç açısı. |
sweepAngle | Single | Süpürme açısı. |
Örnekler
Bu örnekler, bir Görüntü yüzeyinde Şekiller oluşturmak ve işlemek için GraphicsPath ve Graphics sınıfını kullanır. Örnek, yeni bir Görüntü (Tiff tipinde) oluşturur, yüzeyi temizler ve GraphicsPath sınıfının yardımıyla yollar çizer. Sonunda, yolları yüzeyde işlemek için Graphics sınıfı tarafından sunulan DrawPath yöntemi çağrılır.
[C#]
//FileStream örneğini oluştur
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
{
// Bir TiffOptions örneği oluşturun ve çeşitli özelliklerini ayarlayın
Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
// ImageOptions örneğinin kaynağını ayarlayın
tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Görüntü örneğini oluştur
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
{
// Graphics sınıfının bir örneğini oluştur ve başlat
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Grafik yüzeyini temizle
graphics.Clear(Color.Wheat);
// GraphicsPath sınıfının bir örneğini oluştur
Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();
// Figure sınıfının bir örneğini oluşturun
Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();
// Figure nesnesine Şekiller Ekle
figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));
// Figure nesnesini GraphicsPath'e ekle
graphicspath.AddFigure(figure);
// Siyah renkli Pen nesnesiyle yol çiz
graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);
// tüm değişiklikleri kaydet.
image.Save();
}
}
Ayrıca bakınız
- struct RectangleF
- class PieShape
- ad alanı Aspose.Imaging.Shapes
- toplantı Aspose.Imaging