Brush that determines the color and texture of the drawn text.
point
PointF
PointF structure that specifies the upper-left corner of the drawn text.
Exceptions
exception
condition
ArgumentNullException
brush is null. -or- s is null.
Examples
This example demonstrates the use of Font and SolidBrush class to draw strings on Image surface. The example creates a new Image and draw shapes using Figures and GraphicsPath
[C#]//Creates an instance of Imageusing(Aspose.PSD.Imageimage=newAspose.PSD.FileFormats.Psd.PsdImage(500,500)){//Creates and initialize an instance of Graphics classAspose.PSD.Graphicsgraphics=newAspose.PSD.Graphics(image);//Clears Graphics surfacegraphics.Clear(Color.Wheat);//Creates an instance of FontAspose.PSD.Fontfont=newAspose.PSD.Font("Times New Roman",16);//Create an instance of SolidBrush having Red ColorAspose.PSD.Brushes.SolidBrushbrush=newAspose.PSD.Brushes.SolidBrush(Color.Red);//Draw a Stringgraphics.DrawString("Created by Aspose.PSD for .Net",font,brush,newPointF(100,100));// create export options.Aspose.PSD.ImageOptions.GifOptionsoptions=newAspose.PSD.ImageOptions.GifOptions();// save all changesimage.Save("C:\\temp\\output.gif",options);}
Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.
Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat.