GraphicsPath
İçindekiler
[
Saklamak
]GraphicsPath()
Yeni bir örneğini başlatırGraphicsPath
sınıf.
public GraphicsPath()
Ö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
- class GraphicsPath
- ad alanı Aspose.Imaging
- toplantı Aspose.Imaging
GraphicsPath(Figure[])
Yeni bir örneğini başlatırGraphicsPath
sınıf.
public GraphicsPath(Figure[] figures)
Parametre | Tip | Tanım |
---|---|---|
figures | Figure[] | Başlatılacak rakamlar. |
Ayrıca bakınız
- class Figure
- class GraphicsPath
- ad alanı Aspose.Imaging
- toplantı Aspose.Imaging
GraphicsPath(Figure[], FillMode)
Yeni bir örneğini başlatırGraphicsPath
sınıf.
public GraphicsPath(Figure[] figures, FillMode fillMode)
Parametre | Tip | Tanım |
---|---|---|
figures | Figure[] | Başlatılacak rakamlar. |
fillMode | FillMode | Doldurma modu. |
Ayrıca bakınız
- class Figure
- enum FillMode
- class GraphicsPath
- ad alanı Aspose.Imaging
- toplantı Aspose.Imaging
GraphicsPath(FillMode)
Yeni bir örneğini başlatırGraphicsPath
sınıf.
public GraphicsPath(FillMode fillMode)
Parametre | Tip | Tanım |
---|---|---|
fillMode | FillMode | Doldurma modu. |
Ayrıca bakınız
- enum FillMode
- class GraphicsPath
- ad alanı Aspose.Imaging
- toplantı Aspose.Imaging