Class Graphics
İsim alanı : Aspose.Imaging Toplantı: Aspose.Imaging.dll (25.4.0)
Görüntüleri mevcut montajda kullanılan grafik motoruna göre temsil eder.
public sealed class Graphics
Inheritance
mirasçı üyeleri
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Constructors
Graphics(Image)
Aspose.Imaging.Graphics sınıfının yeni bir örneğini başlatır.
public Graphics(Image sourceImage)
Parameters
sourceImage
Image
Kaynak Görüntüsü .
Properties
Clip
Klip bölgesini alır veya ayarlar.
public Region Clip { get; set; }
Mülkiyet Değer
CompositingQuality
Kompozisyon kalitesini alır veya ayarlar.
public CompositingQuality CompositingQuality { get; set; }
Mülkiyet Değer
Dpix için
Bu Aspose.Imaging.Graphics’in yatay çözünürlüğünü alır.
public float DpiX { get; }
Mülkiyet Değer
Dpiya
Bu Aspose.Imaging.Graphics vertikal çözünürlüğünü alır.
public float DpiY { get; }
Mülkiyet Değer
Image
Görüntüyü alır.
public Image Image { get; }
Mülkiyet Değer
InterpolationMode
Interpolasyon modunu alır veya ayarlar.
public InterpolationMode InterpolationMode { get; set; }
Mülkiyet Değer
IsInBeginUpdateCall
Görüntüleri BeginUpdate çağrı durumunda olup olmadığını gösteren bir değer alır.
public bool IsInBeginUpdateCall { get; }
Mülkiyet Değer
PageScale
Bu Aspose.Imaging.Graphics için dünya birimleri ve sayfa birimleri arasındaki ölçeği alır veya ayarlar.
public float PageScale { get; set; }
Mülkiyet Değer
PageUnit
Bu Aspose.Imaging.Graphics sayfa koordinatları için kullanılan ölçüm birimi alır veya ayarlar.
public GraphicsUnit PageUnit { get; set; }
Mülkiyet Değer
PaintableImageOptions
Görüntüleme seçeneklerini alır veya ayarlar, çizim için boyalı vaktor görüntüleri oluşturmak için kullanılır.
public ImageOptionsBase PaintableImageOptions { get; set; }
Mülkiyet Değer
SmoothingMode
Sıkıştırma modunu alır veya ayarlar.
public SmoothingMode SmoothingMode { get; set; }
Mülkiyet Değer
TextRenderingHint
Alın ya da metin indirimini ayarlayın.
public TextRenderingHint TextRenderingHint { get; set; }
Mülkiyet Değer
Transform
Bu Aspose.Imaging.Graphics için geometrik dünya dönüşümünün bir kopyasını alır veya koyar.
public Matrix Transform { get; set; }
Mülkiyet Değer
Methods
BeginUpdate()
Daha sonra uygulanan grafik efektleri hemen uygulanmayacak yerine EndUpdate tüm efektleri aynı anda uygulanmasına neden olacaktır.
public void BeginUpdate()
Remarks
Başlangıç güncellemesi çağrıldıktan sonra etkileri belirtmek, EndUpdate çağrılmadığı takdirde uygulanmayacaktır.
Clear(Color)
Grafik yüzeyi belirlenen renk kullanılarak temizler.
public void Clear(Color color)
Parameters
color
Color
Renk grafik yüzeyi temizlemek için.
Examples
Bu örnekler, bir görüntü yüzeyinde figürler oluşturmak ve manipüle etmek için GraphicsPath ve Graphics sınıfını kullanır. Örnek yeni bir görüntü oluşturur (tiff tipi), yüzeyi temizler ve GraphicsPath sınıfının yardımıyla yolları çeker.
//Create an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
{
//Create an instance of TiffOptions and set its various properties
Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
//Set the source for the instance of ImageOptions
tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Color.Wheat);
//Create an instance of GraphicsPath class
Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();
//Create an instance of Figure class
Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();
//Add Shapes to Figure object
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));
//Add Figure object to GraphicsPath
graphicspath.AddFigure(figure);
//Draw path with Pen object of color Black
graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);
// save all changes.
image.Save();
}
}
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
DrawArc(Kalem, Kalem, Kalem, Kalem, Kalem, Kalem ve Kalem)
Bir elipsin bir kısmını temsil eden bir çubuk, bir çift koordinat, bir genişlik ve bir yükseklik tarafından belirlenir.
public void DrawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, arkanın rengini, genişliğini ve tarzını belirler.
x
float
Ellipseyi tanımlayan sağ üst köşedeki x-koordinasyonu.
y
float
Y-koordinasyonu, ellipsi tanımlayan sağ üst köşedeki y-koordinasyonu.
width
float
Ellipse’yi tanımlayan düz açı genişliği.
height
float
Ellipse’yi tanımlayan düz açı yüksekliği.
startAngle
float
Derecede açı, x-axis’ten arkanın başlangıç noktasına kadar saat açısı ile ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden arkanın noktasını sona erdirmek için saat açısı ile ölçülür.
Exceptions
pen’ is null.
DrawArc(Pen, RectangleF, yüzen, yüzen)
Aspose.Imaging.RectangleF yapısı tarafından belirtilen bir elipsin bir kısmını temsil eden bir çubuk çizilir.
public void DrawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, arkanın rengini, genişliğini ve tarzını belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, elipsin sınırlarını tanımlar.
startAngle
float
Derecede açı, x-axis’ten arkanın başlangıç noktasına kadar saat açısı ile ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden arkanın noktasını sona erdirmek için saat açısı ile ölçülür.
Exceptions
pen’ is null
DrawArc(Pen, int, int, int, int, int, int)
Bir elipsin bir kısmını temsil eden bir çubuk, bir çift koordinat, bir genişlik ve bir yükseklik tarafından belirlenir.
public void DrawArc(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, arkanın rengini, genişliğini ve tarzını belirler.
x
int
Ellipseyi tanımlayan sağ üst köşedeki x-koordinasyonu.
y
int
Y-koordinasyonu, ellipsi tanımlayan sağ üst köşedeki y-koordinasyonu.
width
int
Ellipse’yi tanımlayan düz açı genişliği.
height
int
Ellipse’yi tanımlayan düz açı yüksekliği.
startAngle
int
Derecede açı, x-axis’ten arkanın başlangıç noktasına kadar saat açısı ile ölçülür.
sweepAngle
int
Derecelerde açı, startAngle’ parametresinden arkanın noktasını sona erdirmek için saat açısı ile ölçülür.
Exceptions
pen’ is null.
DrawArc(Yüzük, Yüzük, Yüzük, Yüzük)
Aspose.Imaging.Rectangle yapısı tarafından belirlenen bir elipsin bir kısmını temsil eden bir çubuk çizilir.
public void DrawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, arkanın rengini, genişliğini ve tarzını belirler.
rect
Rectangle
Aspose.Imaging.RectangleF yapısı, elipsin sınırlarını tanımlar.
startAngle
float
Derecede açı, x-axis’ten arkanın başlangıç noktasına kadar saat açısı ile ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden arkanın noktasını sona erdirmek için saat açısı ile ölçülür.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawBezier(Yüzey, Yüzey, Yüzey, Yüzey, Yüzey, Yüzey, Yüzey, Yüzey)
Bézier çizgisi, noktaları temsil eden dört koordinat çifti tarafından tanımlanır.
public void DrawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve tarzını belirler.
x1
float
Kuruşun başlangıç noktasındaki x-koordinat.
y1
float
Kurşun başlangıç noktası y koordinasyonu.
x2
float
Kuruşun ilk kontrol noktasındaki x-koordinat.
y2
float
Y-koordinasyon, eğrinin ilk kontrol noktasıdır.
x3
float
İkinci kontrol noktasının x-koordinasyonu.
y3
float
Y-koordinasyonu, eğrinin ikinci kontrol noktası.
x4
float
Kuruşun son noktasındaki x-koordinat.
y4
float
Y-koordinasyonu, eğrinin son noktasıdır.
Exceptions
pen’ is null.
DrawBezier(Pen, PointF, PointF ve PointF)
Dört Aspose.Imaging.PointF yapıları tarafından tanımlanan Bézier spline çizgisi.
public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve tarzını belirler.
pt1
PointF
Aspose.Imaging.PointF yapısı, eğrinin başlangıç noktasını temsil eder.
pt2
PointF
Aspose.Imaging.PointF yapısı, eğrinin ilk kontrol noktasıdır.
pt3
PointF
Aspose.Imaging.PointF yapısı, eğrinin ikinci kontrol noktasını temsil eder.
pt4
PointF
Aspose.Imaging.PointF yapısı, eğrinin son noktasını temsil eder.
Exceptions
pen’ is null.
DrawBezier(Bir nokta, bir nokta, bir nokta)
Dört Aspose.Imaging.Point yapıları tarafından tanımlanan Bézier spline çizgisi.
public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)
Parameters
pen
Pen
Aspose.Imaging.Pen yapısı, eğrinin rengini, genişliğini ve tarzını belirler.
pt1
Point
Aspose.Imaging.Point yapısı, eğrinin başlangıç noktasını temsil eder.
pt2
Point
Aspose.Imaging.Point yapısı, eğrinin ilk kontrol noktasını temsil eder.
pt3
Point
Aspose.Imaging.Point yapısı, eğrinin ikinci kontrol noktasını temsil eder.
pt4
Point
Aspose.Imaging.Point yapısı, eğrinin son noktasını temsil eder.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawBeziers(Pen, nokta[])
Aspose.Imaging.Point yapısının bir yelpazesinden Bézier splines bir dizi çekiyor.
public void DrawBeziers(Pen pen, Point[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve tarzını belirler.
points
Point
[…]
Aspose.Imaging.Point yapıları, eğriliği belirleyen noktaları temsil eder.
Exceptions
pen’ is null.-or-
points’ is null.
DrawBeziers(Pen ve PointF[])
Aspose.Imaging.PointF yapılarının bir yelpazesinden Bézier splines bir dizi çekiyor.
public void DrawBeziers(Pen pen, PointF[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve tarzını belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları, eğriliği belirleyen noktaları temsil eder.
Exceptions
pen’ is null.-or-
points’ is null.
DrawClosedCurve(Pen ve PointF[])
Aspose.Imaging.PointF yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline çizilir.Bu yöntem, varsayılan 0.5 ve Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void DrawClosedCurve(Pen pen, PointF[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
Exceptions
pen’ is null.-or-
points’ is null.
DrawClosedCurve(Pen ve PointF[…], Floransa)
Aspose.Imaging.PointF yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline çizgisi belirli bir gerilim kullanılarak çizilir.Bu yöntem varsayılan Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void DrawClosedCurve(Pen pen, PointF[] points, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawClosedCurve(Pen, nokta[])
Aspose.Imaging.Point yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline çekilir.Bu yöntem, varsayılan 0.5 ve Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void DrawClosedCurve(Pen pen, Point[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
Exceptions
pen’ is null.-or-
points’ is null.
DrawClosedCurve(Pen, nokta[…], Floransa)
Aspose.Imaging.Point yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline çizgisi belirli bir gerilim kullanılarak çizilir.Bu yöntem varsayılan Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void DrawClosedCurve(Pen pen, Point[] points, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen ve PointF[])
Aspose.Imaging.PointF yapılarının belirli bir dizi aracılığıyla bir kardinal spline sürer.Bu yöntem 0.5’in varsayılan gerilimini kullanır.
public void DrawCurve(Pen pen, PointF[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen ve PointF[…], Floransa)
Bir kardinal spline, belirli bir gerginlik kullanarak Aspose.Imaging.PointF yapılarının belirli bir dizi aracılığıyla çizilir.
public void DrawCurve(Pen pen, PointF[] points, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları, eğriliği tanımlayan noktaları temsil eder.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen ve PointF[…], int , int)
Aspose.Imaging.PointF yapılarının belirli bir aralığı aracılığıyla bir kardinal çerçeve çizilir. çizim aralığın başlangıcından itibaren başlar.Bu yöntem 0.5’in varsayılan gerilimini kullanır.
public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
offset
int
point’ parametrelerinin aralığında ilk öğeden eğrinin başlangıç noktasına geçin.
numberOfSegments
int
Başlangıç noktasından sonra bölüm sayısı eğriliğe dahil edilmelidir.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen ve PointF[…], int , int , float)
Aspose.Imaging.PointF yapılarının belirli bir aralığı aracılığıyla bir kardinal spline çekilir. çizim aralığın başlangıcından itibaren indirim başlar.
public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
offset
int
point’ parametrelerinin aralığında ilk öğeden eğrinin başlangıç noktasına geçin.
numberOfSegments
int
Başlangıç noktasından sonra bölüm sayısı eğriliğe dahil edilmelidir.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen, nokta[])
Aspose.Imaging.Point yapılarının belirli bir dizi aracılığıyla bir kardinal spline çizilir.
public void DrawCurve(Pen pen, Point[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen, nokta[…], Floransa)
Bir kardinal spline, belirli bir gerginlik kullanarak Aspose.Imaging.Point yapılarının belirli bir dizi aracılığıyla çizilir.
public void DrawCurve(Pen pen, Point[] points, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawCurve(Pen, nokta[…], int , int , float)
Bir kardinal spline, belirli bir gerginlik kullanarak Aspose.Imaging.Point yapılarının belirli bir dizi aracılığıyla çizilir.
public void DrawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, float tension)
Parameters
pen
Pen
Aspose.Imaging.Pen, eğrinin rengini, genişliğini ve yüksekliğini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
offset
int
point’ parametrelerinin aralığında ilk öğeden eğrinin başlangıç noktasına geçin.
numberOfSegments
int
Başlangıç noktasından sonra bölüm sayısı eğriliğe dahil edilmelidir.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
pen’ is null.-or-
points’ is null.
DrawEllipse(Pen, RectangleF)
Aspose.Imaging.RectangleF ile tanımlanan bir ellipse çekilir.
public void DrawEllipse(Pen pen, RectangleF rect)
Parameters
pen
Pen
Aspose.Imaging.Pen, elipsin rengi, genişliği ve tarzını belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, elipsin sınırlarını tanımlar.
Exceptions
pen’ is null.
DrawEllipse(Kalem, Kalem, Kalem, Kalem ve Kalem)
Bir elips, bir çift koordinat, bir yükseklik ve bir genişlik tarafından belirlenmiş bir sınırlı düz açı ile tanımlanır.
public void DrawEllipse(Pen pen, float x, float y, float width, float height)
Parameters
pen
Pen
Aspose.Imaging.Pen, elipsin rengi, genişliği ve tarzını belirler.
x
float
Ellipse’yi tanımlayan kenar düzlemin üst sol köşesinin x-koordinasyonu.
y
float
Y-koordinasyonu, ellipseyi tanımlayan kenar düzlemin sol üst köşesinin y-koordinasyonu.
width
float
Ellipse’yi tanımlayan sınır düzeni genişliği.
height
float
Ellipse’yi tanımlayan sınır düzeni yüksekliği.
Exceptions
pen’ is null.
DrawEllipse(Pen, Rectangle)
Aspose.Imaging.Rectangle yapısı ile belirlenen bir ellipse çizilir.
public void DrawEllipse(Pen pen, Rectangle rect)
Parameters
pen
Pen
Aspose.Imaging.Pen, elipsin rengi, genişliği ve tarzını belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, elipsin sınırlarını tanımlar.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawEllipse(Pen , int , int , int , int , int)
Bir elips, bir çift koordinat, bir yükseklik ve bir genişlik tarafından belirlenmiş bir sınırlı düz açı ile tanımlanır.
public void DrawEllipse(Pen pen, int x, int y, int width, int height)
Parameters
pen
Pen
Aspose.Imaging.Pen, elipsin rengi, genişliği ve tarzını belirler.
x
int
Ellipse’yi tanımlayan kenar düzlemin üst sol köşesinin x-koordinasyonu.
y
int
Y-koordinasyonu, ellipseyi tanımlayan kenar düzlemin sol üst köşesinin y-koordinasyonu.
width
int
Ellipse’yi tanımlayan sınır düzeni genişliği.
height
int
Ellipse’yi tanımlayan sınır düzeni yüksekliği.
Exceptions
pen’ is null.
DrawImage(Görüntüleme PointF)
Açıklanan Aspose.Imaging.Graphics.Image’i, orijinal fiziksel boyutunu kullanarak, belirtilen konumda çizin.
public void DrawImage(Image sourceImage, PointF point)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
point
PointF
Aspose.Imaging.PointF yapısı çizilmiş görüntü üst sol köşesini temsil eder.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme, Float, Float)
Açıklanan Aspose.Imaging.Graphics.Image’i, orijinal fiziksel boyutunu kullanarak, belirtilen konumda çizin.
public void DrawImage(Image sourceImage, float x, float y)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
float
Görüntünün üst sol köşesinin x-koordinasyonu.
y
float
Görüntünün üst sol köşesinin y-koordinasyonu.
Exceptions
sourceImage’ is null.
DrawImage(Görüntü, RectangleF)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, RectangleF rect)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, çekilen görüntünün konumunu ve boyutunu belirler.
Exceptions
sourceImage’ is null.
DrawImage(Görüntü, Rectangle, GraphicsUnit)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectDestination
Rectangle
Hedefe doğru yönü.
graphicsUnit
GraphicsUnit
Grafik birimidir.
Exceptions
sourceImage’ is null.
DrawImage(Görüntü, RectangleF, GraphicsUnit)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectDestination
RectangleF
Hedefe doğru yönü.
graphicsUnit
GraphicsUnit
Grafik birimidir.
Exceptions
sourceImage’ is null.
DrawImage(Görüntü, Rectangle, GraphicsUnit, ImageAttributes)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectDestination
Rectangle
Hedefe doğru yönü.
graphicsUnit
GraphicsUnit
Grafik birimidir.
imageAttributes
ImageAttributes
Görüntü özellikleri vardır.
Exceptions
sourceImage’ is null.
DrawImage(Fotoğraf, RectangleF, GraphicsUnit, ImageAttributes)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectDestination
RectangleF
Giriş yapmak için doğru yönü.
graphicsUnit
GraphicsUnit
Grafik birimidir.
imageAttributes
ImageAttributes
Görüntü özellikleri vardır.
Exceptions
sourceImage’ is null.
DrawImage(Fotoğraf, Rectangle, Rectangle, GraphicsUnit)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectSource
Rectangle
Doğru kaynağı var.
rectDestination
Rectangle
Doğrudan hedefe gidiyoruz.
graphicsUnit
GraphicsUnit
Grafik birimidir.
Exceptions
sourceImage’ is null.
DrawImage(Fotoğraf, RectangleF, RectangleF, GraphicsUnit)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectSource
RectangleF
Doğru kaynağı var.
rectDestination
RectangleF
Doğrudan hedefe gidiyoruz.
graphicsUnit
GraphicsUnit
Grafik birimidir.
Exceptions
sourceImage’ is null.
DrawImage(Fotoğraf, Rectangle, Rectangle, GraphicsUnit, ImageAttributes)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectSource
Rectangle
Doğru kaynağı var.
rectDestination
Rectangle
Doğrudan hedefe gidiyoruz.
graphicsUnit
GraphicsUnit
Grafik birimidir.
imageAttributes
ImageAttributes
Görüntü özellikleri vardır.
Exceptions
sourceImage’ is null.
DrawImage(Görüntü, RectangleF, RectangleF, GraphicsUnit, ImageAttributes)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rectSource
RectangleF
Doğrudan kaynağıdır.
rectDestination
RectangleF
Hedefe doğru yönü.
graphicsUnit
GraphicsUnit
Kullanılacak grafik birimi.
imageAttributes
ImageAttributes
Görüntüleri kullanmak için kullanılır.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme, nokta[])
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, Point[] destPoints)
Parameters
image
Image
Çekmek için resim.
destPoints
Point
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
DrawImage(Görüntüleme, nokta[…], Rectangle için)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect)
Parameters
image
Image
Çekmek için resim.
destPoints
Point
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
Rectangle
Doğrudan kaynağıdır.
DrawImage(Görüntüleme, nokta[…], Rectangle , GraphicsUnit)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)
Parameters
image
Image
Çekmek için resim.
destPoints
Point
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
Rectangle
Doğrudan kaynağıdır.
srcUnit
GraphicsUnit
ölçüm birimleri vardır.
DrawImage(Görüntüleme, nokta[…], Rectangle, GraphicsUnit, Görüntü Atribütleri)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttributes)
Parameters
image
Image
Çekmek için resim.
destPoints
Point
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
Rectangle
Doğrudan kaynağıdır.
srcUnit
GraphicsUnit
ölçüm birimleri vardır.
imageAttributes
ImageAttributes
Görüntü özellikleri vardır.
DrawImage(Görüntüleme PointF[])
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, PointF[] destPoints)
Parameters
image
Image
Çekmek için resim.
destPoints
PointF
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
Exceptions
Görüntü
DrawImage(Görüntüleme PointF[…], RectangleF)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect)
Parameters
image
Image
Çekmek için resim.
destPoints
PointF
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
RectangleF
Doğrudan kaynağıdır.
DrawImage(Görüntüleme PointF[…], RectangleF , GraphicsUnit)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
Parameters
image
Image
Çekmek için resim.
destPoints
PointF
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
RectangleF
Doğrudan kaynağıdır.
srcUnit
GraphicsUnit
ölçüm birimleri vardır.
DrawImage(Görüntüleme PointF[…], RectangleF, GraphicsUnit, Görüntü Atribütleri)
Belirlenmiş konumda ve belirlenmiş boyutta belirlenmiş image’in belirlenmiş kısmını çizin.
public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttributes)
Parameters
image
Image
Çekmek için resim.
destPoints
PointF
[…]
Bir paralelogramı tanımlayan üç PointF yapısının bir dizi.
srcRect
RectangleF
Doğrudan kaynağıdır.
srcUnit
GraphicsUnit
ölçüm birimleri vardır.
imageAttributes
ImageAttributes
Görüntü özellikleri vardır.
DrawImage(Fotoğraf, Float, Float, Float)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, float x, float y, float width, float height)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
float
Görüntünün üst sol köşesinin x-koordinasyonu.
y
float
Görüntünün üst sol köşesinin y-koordinasyonu.
width
float
Çekilen resmin genişliği.
height
float
Çekilen resmin yüksekliği.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme, nokta)
Açıklanan Aspose.Imaging.Graphics.Image’i, orijinal fiziksel boyutunu kullanarak, belirtilen konumda çizin.
public void DrawImage(Image sourceImage, Point point)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
point
Point
Aspose.Imaging.Point yapısı, çekilen görüntüün sol üst köşesinin konumunu temsil eder.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme , int , int)
Belirlenen görüntü, orijinal fiziksel boyutunu kullanarak, bir koordinat çift tarafından belirtilen konumda çizilir.
public void DrawImage(Image sourceImage, int x, int y)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
int
Görüntünün üst sol köşesinin x-koordinasyonu.
y
int
Görüntünün üst sol köşesinin y-koordinasyonu.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme, Rectangle)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, Rectangle rect)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, çekilen görüntünün konumunu ve boyutunu belirler.
Exceptions
sourceImage’ is null.
DrawImage(Görüntüleme, int, int, int)
Belirlenen Aspose.Imaging.Graphics.Image’i belirlenen konumda ve belirlenen boyutla çizin.
public void DrawImage(Image sourceImage, int x, int y, int width, int height)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
int
Görüntünün üst sol köşesinin x-koordinasyonu.
y
int
Görüntünün üst sol köşesinin y-koordinasyonu.
width
int
Çekilen resmin genişliği.
height
int
Çekilen resmin yüksekliği.
Exceptions
sourceImage’ is null.
DrawImageUnscaled(Görüntüleme, nokta)
Belirli bir yerde orijinal fiziksel boyutunu kullanarak belirli bir görüntü çeker.
public void DrawImageUnscaled(Image sourceImage, Point point)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
point
Point
Aspose.Imaging.Point yapısı, çizilmiş görüntüün sol üst köşesini belirler.
Exceptions
sourceImage’ is null.
DrawImageUnscaled(Görüntüleme , int , int)
Belirlenen görüntü, bir koordinat çiftinin belirlediği yerde orijinal fiziksel boyutunu kullanarak çizilir.
public void DrawImageUnscaled(Image sourceImage, int x, int y)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
int
Görüntünün üst sol köşesinin x-koordinasyonu.
y
int
Görüntünün üst sol köşesinin y-koordinasyonu.
Exceptions
sourceImage’ is null.
DrawImageUnscaled(Görüntüleme, Rectangle)
Belirli bir yerde orijinal fiziksel boyutunu kullanarak belirli bir görüntü çeker.
public void DrawImageUnscaled(Image sourceImage, Rectangle rect)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rect
Rectangle
Aspose.Imaging.Rectangle, çekilen görüntüün üst sol köşesini belirler.Rektangle’ın X ve Y özellikleri, üst sol köşesini belirler.
Exceptions
sourceImage’ is null.
DrawImageUnscaled(Görüntüleme, int, int, int)
Belirli bir yerde orijinal fiziksel boyutunu kullanarak belirli bir görüntü çeker.
public void DrawImageUnscaled(Image sourceImage, int x, int y, int width, int height)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
x
int
Görüntünün üst sol köşesinin x-koordinasyonu.
y
int
Görüntünün üst sol köşesinin y-koordinasyonu.
width
int
Parametreler kullanılmıyor.
height
int
Parametreler kullanılmıyor.
Exceptions
sourceImage’ is null.
DrawImageUnscaledAndClipped(Görüntüleme, Rectangle)
Belirlenmiş görüntüyü ölçeklenmeden kaydırın ve gerekirse, belirlenmiş düz açıda uyum sağlamak için kaydırın.
public void DrawImageUnscaledAndClipped(Image sourceImage, Rectangle rect)
Parameters
sourceImage
Image
Birlikte çekilecek resim.
rect
Rectangle
Aspose.Imaging.Rectangle hangi resim çizmek için.
Exceptions
sourceImage’ is null.
DrawLine(Pen, nokta ve nokta)
İki Aspose.Imaging.Point yapısını birbirine bağlayan bir çizgi çiziyor.
public void DrawLine(Pen pen, Point point1, Point point2)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizginin rengini, genişliğini ve tarzını belirler.
point1
Point
Aspose.Imaging.Point yapısı, bağlantı kurmak için ilk noktayı temsil eder.
point2
Point
Aspose.Imaging.Point yapısı, bağlantı kurmak için ikinci noktayı temsil eder.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawLine(Pen, PointF ve PointF)
İki Aspose.Imaging.PointF yapısını birbirine bağlayan bir çizgi çiziyor.
public void DrawLine(Pen pen, PointF point1, PointF point2)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizginin rengini, genişliğini ve tarzını belirler.
point1
PointF
Aspose.Imaging.PointF yapısı, bağlantı kurmak için ilk noktayı temsil eder.
point2
PointF
Aspose.Imaging.PointF yapısı, bağlantı kurmak için ikinci noktayı temsil eder.
Exceptions
pen’ is null.
DrawLine(Pen , int , int , int , int , int)
Koordinat çiftleri tarafından belirtilen iki noktayı birbirine bağlayan bir çizgi çizir.
public void DrawLine(Pen pen, int x1, int y1, int x2, int y2)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizginin rengini, genişliğini ve tarzını belirler.
x1
int
Birinci noktanın x-koordinasyonu
y1
int
Birinci noktanın y-koordinasyonu
x2
int
İkinci noktanın x koordinasyonu.
y2
int
İkinci noktanın y-koordinasyonu
Exceptions
pen’ is null.
DrawLine(Kalem, Kalem, Kalem, Kalem ve Kalem)
Koordinat çiftleri tarafından belirtilen iki noktayı birbirine bağlayan bir çizgi çizir.
public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizginin rengini, genişliğini ve tarzını belirler.
x1
float
Birinci noktanın x-koordinasyonu
y1
float
Birinci noktanın y-koordinasyonu
x2
float
İkinci noktanın x koordinasyonu.
y2
float
İkinci noktanın y-koordinasyonu
Exceptions
pen’ is null.
DrawLines(Pen, nokta[])
Aspose.Imaging.Point yapılarının bir dizi bağlayan bir dizi çizgi segmentini çiziyor.
public void DrawLines(Pen pen, Point[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizgi segmentlerinin rengini, genişliğini ve tarzını belirler.
points
Point
[…]
Aspose.Imaging.Point, bağlantı noktalarını temsil eden yapıların bir dizi.
Exceptions
pen’ is null.-or-
points’ is null.
point’ aralığı 2’den az nokta içerir.
DrawLines(Pen ve PointF[])
Aspose.Imaging.PointF yapılarının bir dizi bağlayan bir dizi çizgi segmentini çiziyor.
public void DrawLines(Pen pen, PointF[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, çizgi segmentlerinin rengini, genişliğini ve tarzını belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları, bağlantı noktalarını temsil eder.
Exceptions
pen’ is null.-or-
points’ is null.
point’ aralığı 2’den az nokta içerir.
DrawPath(Çerçeve, Grafik)
Aspose.Imaging.GraphicsPath için bir çerçeve
public void DrawPath(Pen pen, GraphicsPath path)
Parameters
pen
Pen
Aspose.Imaging.Pen, yolun rengini, genişliğini ve tarzını belirler.
path
GraphicsPath
Görüntüleme.Grafik Çekme Yolu.
Examples
Bu örnekler, bir görüntü yüzeyinde figürler oluşturmak ve manipüle etmek için GraphicsPath ve Graphics sınıfını kullanır. Örnek yeni bir görüntü oluşturur (tiff tipi), yüzeyi temizler ve GraphicsPath sınıfının yardımıyla yolları çeker.
//Create an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
{
//Create an instance of TiffOptions and set its various properties
Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
//Set the source for the instance of ImageOptions
tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Color.Wheat);
//Create an instance of GraphicsPath class
Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();
//Create an instance of Figure class
Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();
//Add Shapes to Figure object
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));
//Add Figure object to GraphicsPath
graphicspath.AddFigure(figure);
//Draw path with Pen object of color Black
graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.-or-
path’ is null.
DrawPie(Pen, RectangleF, yüzen, yüzen)
Bir Aspose.Imaging.RectangleF yapısı ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir peş şeklinde çizilir.
public void DrawPie(Pen pen, RectangleF rect, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, peynir şeklinin rengi, genişliği ve tarzını belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, gövde şeklinin geldiği elipsini tanımlayan kenar düzeni temsil eder.
startAngle
float
Çerçeve, x-axis’ten pie şeklinin ilk tarafına kadar saatlik derecelerde ölçülür.
sweepAngle
float
Angle, startAngle’ parametresinden pie şeklinin ikinci tarafına kadar saatlik derecede ölçülür.
Exceptions
pen’ is null.
DrawPie(Kalem, Kalem, Kalem, Kalem, Kalem, Kalem ve Kalem)
Bir koordinat çift, bir genişlik, bir yükseklik ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir ayak şekli çizgiler.
public void DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, peynir şeklinin rengi, genişliği ve tarzını belirler.
x
float
Bağlantı düzleminin üst sol köşesinin x-koordinasyonu, ayak şeklinin geldiği elipsini tanımlar.
y
float
Yukarı-sol köşesinin y-koordinasyonu, gövde şeklinin geldiği ellipseyi tanımlayan kenar düz köşesidir.
width
float
Bounding rectangle genişliği, pie şeklinin geldiği elipsini tanımlar.
height
float
Bounding rectangle’ın yüksekliği, pie şeklinin geldiği elipsini tanımlar.
startAngle
float
Çerçeve, x-axis’ten pie şeklinin ilk tarafına kadar saatlik derecelerde ölçülür.
sweepAngle
float
Angle, startAngle’ parametresinden pie şeklinin ikinci tarafına kadar saatlik derecede ölçülür.
Exceptions
pen’ is null.
DrawPie(Yüzük, Yüzük, Yüzük, Yüzük)
Bir Aspose.Imaging.Rectangle yapısı ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir peynir şekli çizgiler.
public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, peynir şeklinin rengi, genişliği ve tarzını belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, peynir şeklinin geldiği elipsini tanımlayan sınırlı rektangleyi temsil eder.
startAngle
float
Çerçeve, x-axis’ten pie şeklinin ilk tarafına kadar saatlik derecelerde ölçülür.
sweepAngle
float
Angle, startAngle’ parametresinden pie şeklinin ikinci tarafına kadar saatlik derecede ölçülür.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawPie(Pen, int, int, int, int, int, int)
Bir koordinat çift, bir genişlik, bir yükseklik ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir ayak şekli çizgiler.
public void DrawPie(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
pen
Pen
Aspose.Imaging.Pen, peynir şeklinin rengi, genişliği ve tarzını belirler.
x
int
Bağlantı düzleminin üst sol köşesinin x-koordinasyonu, ayak şeklinin geldiği elipsini tanımlar.
y
int
Yukarı-sol köşesinin y-koordinasyonu, gövde şeklinin geldiği ellipseyi tanımlayan kenar düz köşesidir.
width
int
Bounding rectangle genişliği, pie şeklinin geldiği elipsini tanımlar.
height
int
Bounding rectangle’ın yüksekliği, pie şeklinin geldiği elipsini tanımlar.
startAngle
int
Çerçeve, x-axis’ten pie şeklinin ilk tarafına kadar saatlik derecelerde ölçülür.
sweepAngle
int
Angle, startAngle’ parametresinden pie şeklinin ikinci tarafına kadar saatlik derecede ölçülür.
Exceptions
pen’ is null.
DrawPolygon(Pen ve PointF[])
Aspose.Imaging.PointF yapılarının bir dizi tarafından tanımlanan bir poligon çiziyor.
public void DrawPolygon(Pen pen, PointF[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, poligonun rengini, genişliğini ve tarzını belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapılarının aralığı, poligonun dikeylerini temsil eder.
Exceptions
pen’ is null.-or-
points’ is null.
DrawPolygon(Pen, nokta[])
Aspose.Imaging.Point yapısının bir dizi tarafından tanımlanan bir poligon çiziyor.
public void DrawPolygon(Pen pen, Point[] points)
Parameters
pen
Pen
Aspose.Imaging.Pen, poligonun rengini, genişliğini ve tarzını belirler.
points
Point
[…]
Aspose.Imaging.Point yapılarının aralığı, poligonun dikeylerini temsil eder.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawRectangle(Pen, RectangleF)
Aspose.Imaging.RectangleF yapısı ile belirlenmiş bir düz açı çizilir.
public void DrawRectangle(Pen pen, RectangleF rect)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemin rengi, genişliği ve tarzını belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, çizilecek düz açıyı temsil eder.
Exceptions
pen’ is null.
DrawRectangle(Pen, Rectangle)
Aspose.Imaging.Rectangle yapısı ile belirlenmiş bir düz açı oluşturur.
public void DrawRectangle(Pen pen, Rectangle rect)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemin rengi, genişliği ve tarzını belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, çizilecek düz açıyı temsil eder.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
pen’ is null.
DrawRectangle(Kalem, Kalem, Kalem, Kalem ve Kalem)
Bir koordinat çift, bir genişlik ve bir yükseklik tarafından belirlenen bir düz açı çizilir.
public void DrawRectangle(Pen pen, float x, float y, float width, float height)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemin rengi, genişliği ve tarzını belirler.
x
float
Çekmek için düzlemin sol üst köşesinin x-koordinasyonu.
y
float
Y-koordinasyonu çizmek için sağ üst köşedeki üst-sol köşede.
width
float
Çekmek için düz açı genişliği.
height
float
Çekmek için düzlemin yüksekliği.
Exceptions
pen’ is null.
DrawRectangle(Pen , int , int , int , int , int)
Bir koordinat çift, bir genişlik ve bir yükseklik tarafından belirlenen bir düz açı çizilir.
public void DrawRectangle(Pen pen, int x, int y, int width, int height)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemin rengi, genişliği ve tarzını belirler.
x
int
Çekmek için düzlemin sol üst köşesinin x-koordinasyonu.
y
int
Y-koordinasyonu çizmek için sağ üst köşedeki üst-sol köşede.
width
int
Çekmek için düz açı genişliği.
height
int
Çekmek için düzlemin yüksekliği.
Exceptions
pen’ is null.
DrawRectangles(Pen, RectangleF[])
Aspose.Imaging.RectangleF yapıları tarafından belirtilen bir dizi düz açı çekilir.
public void DrawRectangles(Pen pen, RectangleF[] rects)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemlerin çizgilerinin rengi, genişliği ve tarzını belirler.
rects
RectangleF
[…]
Aspose.Imaging.RectangleF yapılarının aralığı çizilecek düzlemleri temsil eder.
Exceptions
pen’ is null.-or-
rects’ is null.
DrawRectangles(Pen, Rectangle[])
Aspose.Imaging.Rectangle yapıları tarafından belirtilen bir dizi düz açı çiziyor.
public void DrawRectangles(Pen pen, Rectangle[] rects)
Parameters
pen
Pen
Aspose.Imaging.Pen, düzlemlerin çizgilerinin rengi, genişliği ve tarzını belirler.
rects
Rectangle
[…]
Aspose.Imaging.Rectangle yapılar çizilecek düzlemleri temsil eder.
Examples
Bu örnek Pen nesnelerinin oluşturulmasını ve kullanıldığını gösterir. örnek yeni bir Görüntü oluşturur ve Görüntü yüzeyinde Rectangles çizir.
//Create an instance of BmpOptions and set its various properties
Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
bmpOptions.BitsPerPixel = 24;
//Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
//Second Boolean parameter determines if the file to be created IsTemporal or not
bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"C:\temp\sample.bmp", false);
//Create an instance of Image at specified Path
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
{
//Create an instance of Graphics and initialize it with Image object
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear the Graphics sutface with White Color
graphics.Clear(Aspose.Imaging.Color.White);
//Create an instance of Pen with color Red and width 5
Aspose.Imaging.Pen pen = new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 5f);
//Create an instance of HatchBrush and set its properties
Aspose.Imaging.Brushes.HatchBrush brush = new Aspose.Imaging.Brushes.HatchBrush();
brush.BackgroundColor = Aspose.Imaging.Color.Wheat;
brush.ForegroundColor = Aspose.Imaging.Color.Red;
//Create an instance of Pen
//initialize it with HatchBrush object and width
Aspose.Imaging.Pen brusedpen = new Pen(brush, 5);
//Draw Rectangles by specifying Pen object
graphics.DrawRectangles(pen, new[]
{
new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(210, 210), new Aspose.Imaging.Size(100, 100)),
new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(110, 110), new Aspose.Imaging.Size(100, 100)),
new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(310, 310), new Aspose.Imaging.Size(100, 100))
});
//Draw Rectangles by specifying Pen object
graphics.DrawRectangles(brusedpen, new[]
{
new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(310, 110), new Aspose.Imaging.Size(100, 100)),
new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(110, 310), new Aspose.Imaging.Size(100, 100))
});
// save all changes.
image.Save();
}
Exceptions
pen’ is null.-or-
rects’ is null.
DrawString(Çerçeve, Font, Brush, Float, Float)
Belirlenmiş Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile belirlenen metin çubuğunu belirlenmiş konumda sürükleyin.
public void DrawString(string s, Font font, Brush brush, float x, float y)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
x
float
Çekilen metnin üst sol köşesinin x-koordinasyonu.
y
float
Yazının üst sol köşesinin y-koordinasyonu.
Exceptions
brush’ is null.-or-
s’ is null.
DrawString(Çerçeve, Font, Brush ve PointF)
Belirlenmiş Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile belirlenen metin çubuğunu belirlenmiş konumda sürükleyin.
public void DrawString(string s, Font font, Brush brush, PointF point)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
point
PointF
Aspose.Imaging.PointF yapısı, çizilmiş metnin sol üst köşesini belirler.
Examples
Bu örnek, Görüntü yüzeyinde ilkel şekiller oluşturmak için Görüntü sınıfını kullanır. işlemi göstermek için, örnek PNG biçiminde yeni bir Görüntü oluşturur ve Görüntü yüzeyinde ilkel şekiller çeker Görüntü sınıfı tarafından sunulan çizim yöntemlerini kullanarak
//Creates an instance of FileStream
using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
{
//Create an instance of PngOptions and set its various properties
Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();
//Set the Source for PngOptions
pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);
//Create an instance of Image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
{
//Create and initialize an instance of Graphics class
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
//Clear Graphics surface
graphics.Clear(Aspose.Imaging.Color.Wheat);
//Draw an Arc by specifying the Pen object having Black color,
//a Rectangle surrounding the Arc, Start Angle and Sweep Angle
graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);
//Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));
//Draw a Curve by specifying the Pen object having Green color and an array of Points
graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });
//Draw an Ellipse using the Pen object and a surrounding Rectangle
graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));
//Draw a Line
graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));
//Draw a Pie segment
graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);
//Draw a Polygon by specifying the Pen object having Red color and an array of Points
graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });
//Draw a Rectangle
graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));
//Create a SolidBrush object and set its various properties
Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
brush.Color = Color.Purple;
brush.Opacity = 100;
//Draw a String using the SolidBrush object and Font, at specific Point
graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));
// save all changes.
image.Save();
}
}
Exceptions
brush’ is null.-or-
s’ is null.
DrawString(Çizgi, Çizgi, Çizgi, Çizgi, Çizgi, Çizgi)
Belirlenen konumda belirtilen Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile belirlenen Aspose.Imaging.StringFormat’ın biçimlendirme özelliklerini kullanarak belirlenmiş metin çubuğunu çizin.
public void DrawString(string s, Font font, Brush brush, float x, float y, StringFormat format)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
x
float
Çekilen metnin üst sol köşesinin x-koordinasyonu.
y
float
Yazının üst sol köşesinin y-koordinasyonu.
format
StringFormat
Aspose.Imaging.StringFormat, çizilmiş metne uygulanan çizgi alanlama ve uyum gibi biçimlendirme özelliklerini belirler.
Exceptions
brush’ is null.-or-
s’ is null.
DrawString(Çerçeve, Font, Brush, PointF, StringFormat)
Belirlenen konumda belirtilen Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile belirlenen Aspose.Imaging.StringFormat’ın biçimlendirme özelliklerini kullanarak belirlenmiş metin çubuğunu çizin.
public void DrawString(string s, Font font, Brush brush, PointF point, StringFormat format)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
point
PointF
Aspose.Imaging.PointF yapısı, çizilmiş metnin sol üst köşesini belirler.
format
StringFormat
Aspose.Imaging.StringFormat, çizilmiş metne uygulanan çizgi alanlama ve uyum gibi biçimlendirme özelliklerini belirler.
Exceptions
brush’ is null.-or-
s’ is null.
DrawString(Çerçeve, Font, Brush, RectangleF)
Belirlenmiş metin çubuğunu belirlenmiş düz açıdan belirlenmiş Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile çizin.
public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
layoutRectangle
RectangleF
Aspose.Imaging.RectangleF yapısı, çekilen metnin konumunu belirler.
Exceptions
brush’ is null.-or-
s’ is null.
DrawString(String, Font, Brush, RectangleF, StringFormat)
Belirlenmiş Aspose.Imaging.Brush ve Aspose.Imaging.Font nesneleri ile Belirlenmiş Aspose.Imaging.StringFormat’ın biçimlendirme özelliklerini kullanarak belirlenmiş metin çubuğunu belirleyin.
public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)
Parameters
s
string
Çekmek için çerçeve.
font
Font
Aspose.Imaging.Font, satırın metin biçimini tanımlayan bir kaynak.
brush
Brush
Aspose.Imaging.Brush, çizilmiş metnin rengini ve dokusunu belirler.
layoutRectangle
RectangleF
Aspose.Imaging.RectangleF yapısı, çekilen metnin konumunu belirler.
format
StringFormat
Aspose.Imaging.StringFormat, çizilmiş metne uygulanan çizgi alanlama ve uyum gibi biçimlendirme özelliklerini belirler.
Exceptions
brush’ is null.-or-
s’ is null.-or-
brush’ is null.
EndUpdate()
Başlangıç güncellemesi çağrıldıktan sonra başlatılan grafik işlemlerinin kaydedilmesi sona erer. önceki grafik işlemleri bu yöntemi çağırdığınızda hemen uygulanır.
public void EndUpdate()
FillClosedCurve(Bıçak, PointF[])
Aspose.Imaging.PointF yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline eğrinin içini doldurur.Bu yöntem, varsayılan 0.5 ve Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void FillClosedCurve(Brush brush, PointF[] points)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
Exceptions
brush’ is null.-or-
points’ is null.
FillClosedCurve(Bıçak, PointF[…], • FillMode)
Kapalı bir kardinal spline eğrinin içini, Aspose.Imaging.PointF yapılarının bir dizi tarafından tanımlanan, belirtilen doldurma modunu kullanarak doldurur.
public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillMode)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
fillMode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, eğrinin nasıl doldurulduğunu belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillClosedCurve(Bıçak, PointF[…], FillMode , Float)
Kapalı bir kardinal spline eğrinin içini, Aspose.Imaging.PointF yapılarının bir dizi tarafından belirlenmiş doldurma modunu ve gerilimini kullanarak doldurur.
public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode, float tension)
Parameters
brush
Brush
Bir Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapıları spline tanımlayan bir dizi.
fillmode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, eğrinin nasıl doldurulduğunu belirler.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillClosedCurve(Bıçak, Point[])
Aspose.Imaging.Point yapılarının bir dizi tarafından tanımlanan kapalı bir kardinal spline eğrinin içini doldurur.Bu yöntem, varsayılan 0.5 ve Aspose.Imaging.FillMode.Alternate doldurma modunu kullanır.
public void FillClosedCurve(Brush brush, Point[] points)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
Exceptions
brush’ is null.-or-
points’ is null.
FillClosedCurve(Bıçak, Point[…], • FillMode)
Kapalı bir kardinal spline eğrinin içini, Aspose.Imaging.Point yapılarının bir dizi tarafından tanımlanan, belirtilen doldurma modunu kullanarak doldurur.Bu yöntem 0.5’in varsayılan gerilimini kullanır.
public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
fillmode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, eğrinin nasıl doldurulduğunu belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillClosedCurve(Bıçak, Point[…], FillMode , Float)
Kapalı bir kardinal spline eğrinin içini Aspose.Imaging.Point yapılarının bir dizi tarafından tanımlanan, belirtilen doldurma modunu ve gerilimini kullanarak doldurur.
public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode, float tension)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısını belirleyen bir dizi.
fillmode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, eğrinin nasıl doldurulduğunu belirler.
tension
float
0.0F’den daha büyük veya eşit değeri, eğrinin gerginliğini belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillEllipse(Sürücü, RectangleF)
Aspose.Imaging.RectangleF yapısı tarafından belirlenen bir sınırlı düz açı tarafından tanımlanan bir elipsin içini doldurur.
public void FillEllipse(Brush brush, RectangleF rect)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, elipsini tanımlayan sınırlı düz açıyı temsil eder.
Exceptions
brush’ is null.
FillEllipse(Sıvı, Sıvı, Sıvı, Sıvı)
Bir elipsin içini, bir çift koordinat, bir genişlik ve bir yükseklik tarafından belirlenen bir sınırlı düz açı ile tanımlar.
public void FillEllipse(Brush brush, float x, float y, float width, float height)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
float
Ellipse’yi tanımlayan kenar düzlemin üst sol köşesinin x-koordinasyonu.
y
float
Y-koordinasyonu, ellipseyi tanımlayan kenar düzlemin sol üst köşesinin y-koordinasyonu.
width
float
Ellipse’yi tanımlayan sınır düzeni genişliği.
height
float
Ellipse’yi tanımlayan sınır düzeni yüksekliği.
Exceptions
brush’ is null.
FillEllipse(Bıçak, Rectangle)
Aspose.Imaging.Rectangle yapısının belirlediği bir kuyruklu düz açıdan tanımlanan bir elipsin içini doldurur.
public void FillEllipse(Brush brush, Rectangle rect)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, elipsini tanımlayan sınırlı düz açıyı temsil eder.
Exceptions
brush’ is null.
FillEllipse(Bıçak, int, int, int)
Bir elipsin içini, bir çift koordinat, bir genişlik ve bir yükseklik tarafından belirlenen bir sınırlı düz açı ile tanımlar.
public void FillEllipse(Brush brush, int x, int y, int width, int height)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
int
Ellipse’yi tanımlayan kenar düzlemin üst sol köşesinin x-koordinasyonu.
y
int
Y-koordinasyonu, ellipseyi tanımlayan kenar düzlemin sol üst köşesinin y-koordinasyonu.
width
int
Ellipse’yi tanımlayan sınır düzeni genişliği.
height
int
Ellipse’yi tanımlayan sınır düzeni yüksekliği.
Exceptions
brush’ is null.
FillPath(Grafik, GraphicsPath)
Bir Aspose.Imaging.GraphicsPath’ın içini doldur.
public void FillPath(Brush brush, GraphicsPath path)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
path
GraphicsPath
Aspose.Imaging.GraphicsPath, doldurma yolunu temsil eder.
Exceptions
brush’ is null.-or-
path’ is null.
FillPie(Yüzük, Yüzük, Yüzük, Yüzük)
Aspose.Imaging.RectangleF yapısı ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir pie bölümünün içini doldurur.
public void FillPie(Brush brush, Rectangle rect, float startAngle, float sweepAngle)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, ayak bölümünün geldiği elipsini tanımlayan sınırlı düz açıyı temsil eder.
startAngle
float
Derecede açı, x-axis’ten pie bölümünün ilk tarafına kadar saatlik olarak ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden pie bölümünün ikinci tarafına kadar saat açısı ile ölçülür.
Examples
Aşağıdaki örnek, bireysel GIF bloklarından animasyonlu bir GIF görüntüsünü nasıl oluşturacağınızı gösterir.
string dir = "c:\\temp\\";
// Create a GIF image 100 x 100 px.
// The first block is fully black by default.
using (Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock firstBlock = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100))
using (Aspose.Imaging.FileFormats.Gif.GifImage gifImage = new Aspose.Imaging.FileFormats.Gif.GifImage(firstBlock))
{
// The first circle is red
Aspose.Imaging.Brushes.SolidBrush brush1 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
// The second circle is black
Aspose.Imaging.Brushes.SolidBrush brush2 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Black);
// Gradually inscrease the angle of the red arc shape.
for (int angle = 10; angle <= 360; angle += 10)
{
Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);
Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(block);
gr.FillPie(brush1, block.Bounds, 0, angle);
gifImage.AddBlock(block);
}
// Gradually inscrease the angle of the black arc and wipe out the red arc.
for (int angle = 10; angle <= 360; angle += 10)
{
Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);
Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(block);
gr.FillPie(brush2, block.Bounds, 0, angle);
gr.FillPie(brush1, block.Bounds, angle, 360 - angle);
gifImage.AddBlock(block);
}
gifImage.Save(dir + "animated_radar.gif");
}
Exceptions
brush’ is null.
FillPie(RektangleF, Float, Float)
Aspose.Imaging.RectangleF yapısı ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir pie bölümünün içini doldurur.
public void FillPie(Brush brush, RectangleF rect, float startAngle, float sweepAngle)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, pie bölümünün geldiği elipsini tanımlayan sınırlı düz açıyı temsil eder.
startAngle
float
Derecede açı, x-axis’ten pie bölümünün ilk tarafına kadar saatlik olarak ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden pie bölümünün ikinci tarafına kadar saat açısı ile ölçülür.
Exceptions
brush’ is null.
FillPie(Yüzme, Yüzme, Yüzme, Yüzme, Yüzme, Yüzme)
Bir parça koordinat, bir genişlik, bir yükseklik ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir parça bölümün içini doldurur.
public void FillPie(Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
float
Bağlantı düzleminin üst sol köşesinin x-koordinasyonu, pie bölümünün geldiği elipsini tanımlar.
y
float
Bağlantı düzleminin üst sol köşesinin y-koordinasyonu, ayak bölümünün geldiği elipsini tanımlar.
width
float
Bounding rectangle genişliği, pie bölümünün geldiği elipsini tanımlar.
height
float
Bounding rectangle’ın yüksekliği, pie bölümünün geldiği elipsini tanımlar.
startAngle
float
Derecede açı, x-axis’ten pie bölümünün ilk tarafına kadar saatlik olarak ölçülür.
sweepAngle
float
Derecelerde açı, startAngle’ parametresinden pie bölümünün ikinci tarafına kadar saat açısı ile ölçülür.
Exceptions
brush’ is null.
FillPie(Sürücü, int, int, int, int, int)
Bir parça koordinat, bir genişlik, bir yükseklik ve iki radyal çizgiler tarafından belirlenen bir elips tarafından tanımlanan bir parça bölümün içini doldurur.
public void FillPie(Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
int
Bağlantı düzleminin üst sol köşesinin x-koordinasyonu, pie bölümünün geldiği elipsini tanımlar.
y
int
Bağlantı düzleminin üst sol köşesinin y-koordinasyonu, ayak bölümünün geldiği elipsini tanımlar.
width
int
Bounding rectangle genişliği, pie bölümünün geldiği elipsini tanımlar.
height
int
Bounding rectangle’ın yüksekliği, pie bölümünün geldiği elipsini tanımlar.
startAngle
int
Derecede açı, x-axis’ten pie bölümünün ilk tarafına kadar saatlik olarak ölçülür.
sweepAngle
int
Derecelerde açı, startAngle’ parametresinden pie bölümünün ikinci tarafına kadar saat açısı ile ölçülür.
Exceptions
brush’ is null.
FillPolygon(Bıçak, PointF[])
Aspose.Imaging.PointF yapıları ve Aspose.Imaging.FillMode.Alternate tarafından belirlenen bir dizi nokta ile tanımlanan bir poligonun içini doldurur.
public void FillPolygon(Brush brush, PointF[] points)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapılarının aralığı, doldurmak için poligonun dikeylerini temsil eder.
Exceptions
brush’ is null.-or-
points’ is null.
FillPolygon(Bıçak, PointF[…], • FillMode)
Aspose.Imaging.PointF yapıları tarafından belirtilen bir dizi nokta ile tanımlanan bir poligonun içini doldur, belirtilen doldurma modunu kullanır.
public void FillPolygon(Brush brush, PointF[] points, FillMode fillMode)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
PointF
[…]
Aspose.Imaging.PointF yapılarının aralığı, doldurmak için poligonun dikeylerini temsil eder.
fillMode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, doldurmanın tarzını belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillPolygon(Bıçak, Point[])
Aspose.Imaging.Point yapıları ve Aspose.Imaging.FillMode.Alternate tarafından belirlenen bir dizi nokta ile tanımlanan bir poligonun içini doldurur.
public void FillPolygon(Brush brush, Point[] points)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısının aralığı, doldurmak için poligonun dikeylerini temsil eder.
Exceptions
brush’ is null.-or-
points’ is null.
FillPolygon(Bıçak, Point[…], • FillMode)
Aspose.Imaging.Point yapıları tarafından belirtilen bir dizi nokta ile tanımlanan bir poligonun içini doldur, belirtilen doldurma modunu kullanır.
public void FillPolygon(Brush brush, Point[] points, FillMode fillMode)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
points
Point
[…]
Aspose.Imaging.Point yapısının aralığı, doldurmak için poligonun dikeylerini temsil eder.
fillMode
FillMode
Aspose.Imaging.FillMode listesinin üyesi, doldurmanın tarzını belirler.
Exceptions
brush’ is null.-or-
points’ is null.
FillRectangle(Bıçak, Rectangle)
Aspose.Imaging.Rectangle yapısı ile belirlenen bir düz açıın içini doldurur.
public void FillRectangle(Brush brush, Rectangle rect)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
Rectangle
Aspose.Imaging.Rectangle yapısı, doldurulması gereken düz açıyı temsil eder.
Exceptions
brush’ is null.
FillRectangle(Sürücü, RectangleF)
Aspose.Imaging.RectangleF yapısı ile belirlenen bir düz açı içini doldurur.
public void FillRectangle(Brush brush, RectangleF rect)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rect
RectangleF
Aspose.Imaging.RectangleF yapısı, doldurulması gereken düz açıyı temsil eder.
Exceptions
brush’ is null.
FillRectangle(Sıvı, Sıvı, Sıvı, Sıvı)
Bir düz açıdan bir çift koordinat, bir genişlik ve bir yükseklik ile belirlenmiş içini doldurur.
public void FillRectangle(Brush brush, float x, float y, float width, float height)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
float
x-koordinat üst sol köşesi düz açı doldurmak için.
y
float
Y-koordinat üst sol köşesi düz açı doldurmak için.
width
float
Doldurmak için düz açı genişliği.
height
float
Doldurmak için düz açı yüksekliği.
Exceptions
brush’ is null.
FillRectangle(Bıçak, int, int, int)
Bir düz açıdan bir çift koordinat, bir genişlik ve bir yükseklik ile belirlenmiş içini doldurur.
public void FillRectangle(Brush brush, int x, int y, int width, int height)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
x
int
x-koordinat üst sol köşesi düz açı doldurmak için.
y
int
Y-koordinat üst sol köşesi düz açı doldurmak için.
width
int
Doldurmak için düz açı genişliği.
height
int
Doldurmak için düz açı yüksekliği.
Exceptions
brush’ is null.
FillRectangles(Bıçak, Rectangle[])
Aspose.Imaging.Rectangle yapıları tarafından belirtilen bir dizi düzlemin içlerini doldurur.
public void FillRectangles(Brush brush, Rectangle[] rects)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rects
Rectangle
[…]
Aspose.Imaging.Rectangle yapılar, doldurulması gereken düzlemleri temsil eder.
Exceptions
brush’ is null or
rects’ is null.
FillRectangles(Sürücü, RectangleF[])
Aspose.Imaging.RectangleF yapıları tarafından belirtilen bir dizi düzlemin içlerini doldurur.
public void FillRectangles(Brush brush, RectangleF[] rects)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
rects
RectangleF
[…]
Aspose.Imaging.Rectangle yapılar, doldurulması gereken düzlemleri temsil eder.
Exceptions
brush’ is null or
rects’ is null.
FillRegion(Brush, Bölge)
Bir Aspose.Imaging.Region’un içini doldur.
public void FillRegion(Brush brush, Region region)
Parameters
brush
Brush
Aspose.Imaging.Brush, doldurmanın özelliklerini belirler.
region
Region
Aspose.Imaging.Region, doldurulması gereken alanı temsil eder.
Exceptions
brush’ is null.-or-
region’ is null.
~Graphics()
protected ~Graphics()
MeasureString(Çerçeve, Çerçeve, SizeF, StringFormat)
Belirlenmiş parametrelerle belirlenmiş metin çubuğunu ölçer
public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)
Parameters
text
string
ölçülmesi gereken metin.
font
Font
ölçmek için yazı tipi.
layoutArea
SizeF
Layout alanı için.
stringFormat
StringFormat
Çerçeve biçimi.
Returns
Piksel boyutu ölçülen metin çubuğu
MultiplyTransform(Matrix)
Bu Aspose.Imaging.Matrix’in yerel geometrik dönüşümünü temsil eden Aspose.Imaging.Matrix’i belirlenen Aspose.Imaging.Matrix’e göre çoğaltır.
public void MultiplyTransform(Matrix matrix)
Parameters
matrix
Matrix
Aspose.Imaging.Matrix ile geometrik dönüşüm çoğaltmak için.
MultiplyTransform(Matrix ve MatrixOrder)
Aspose.Imaging.Matrix, bu Aspose.Imaging.Grafiklerin yerel geometrik dönüşümünü belirlenen sırada Aspose.Imaging.Matrix ile çoğaltır.
public void MultiplyTransform(Matrix matrix, MatrixOrder order)
Parameters
matrix
Matrix
Aspose.Imaging.Matrix ile geometrik dönüşüm çoğaltmak için.
order
MatrixOrder
Aspose.Imaging.MatrixOrder hangi amaçla iki matris çoğaltmak için belirlenir.
ResetTransform()
Aspose.Imaging.Graphics.Mülkiyeti kimliğe dönüştürür.
public void ResetTransform()
RotateTransform(Floransa)
Yerel geometrik dönüşü belirlenen miktarla döndürür.Bu yöntem dönüşü dönüşü önler.
public void RotateTransform(float angle)
Parameters
angle
float
Dönüşün açısıdır.
RotateTransform(Sürücü, MatrixOrder)
Yerel geometrik dönüşümü belirli sırada belirtilen miktarla döndürür.
public void RotateTransform(float angle, MatrixOrder order)
Parameters
angle
float
Dönüşün açısıdır.
order
MatrixOrder
Aspose.Imaging.MatrixOrder, rotasyon matrisini eklemek veya önlemek için gerekli olup olmadığını belirtir.
ScaleTransform(Yüzme , Yüzme)
Yerel geometrik dönüşümü belirlenen miktarlarla ölçün.Bu yöntem, ölçekleme matrisini dönüşümüne bağlar.
public void ScaleTransform(float sx, float sy)
Parameters
sx
float
Transformasyonun x-axis yönünde ölçülmesi gereken miktar.
sy
float
Y-axis yönünde dönüşümün ölçülmesi gereken miktar.
ScaleTransform(Sürücü, Sürücü, MatrixOrder)
Yerel geometrik dönüşümünü belirlenen sırada belirtilen miktarlarla ölçün.
public void ScaleTransform(float sx, float sy, MatrixOrder order)
Parameters
sx
float
Transformasyonun x-axis yönünde ölçülmesi gereken miktar.
sy
float
Y-axis yönünde dönüşümün ölçülmesi gereken miktar.
order
MatrixOrder
Aspose.Imaging.MatrixOrder, ölçekleme matrisini eklemek veya önlemek için gerekli olup olmadığını belirtir.
TranslateTransform(Yüzme , Yüzme)
Yerel geometrik dönüşümü belirlenen boyutlara göre çevirir.Bu yöntem çeviriyi dönüşümüne bağlar.
public void TranslateTransform(float dx, float dy)
Parameters
dx
float
Çeviri değeri x.
dy
float
Y’de çevirinin değeri.
TranslateTransform(Sürücü, Sürücü, MatrixOrder)
Yerel geometrik dönüşümü belirli boyutlara göre belirli sırada çevirir.
public void TranslateTransform(float dx, float dy, MatrixOrder order)
Parameters
dx
float
Çeviri değeri x.
dy
float
Y’de çevirinin değeri.
order
MatrixOrder
Çeviri uygulayacak sipariş (prepend veya append)