Text.Create Method

Creates an appropriate text object based on the specified PSD text layer and Graphics.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public static Text Create(
	PsdTextFrame psdTextFrame,
	Graphics graphics
)

Parameters

psdTextFrame

Type: Aurigma.GraphicsMill.Codecs.Psd.PsdTextFrame

A PSD text layer to get text from.
graphics

Type: Aurigma.GraphicsMill.AdvancedDrawing.Graphics

A Graphics to get settings from.

Return Value

The appropriate descendant of the Text class.

Examples

C#
using (var psdReader = new PsdReader(@"Images\Graphics3.psd"))
using (var pdfWriter = new PdfWriter(@"Images\Output\out.pdf"))
using (var graphics = pdfWriter.GetGraphics())
{
    pdfWriter.AddPage(psdReader.Width, psdReader.Height, psdReader.DpiX, psdReader.DpiY);
    foreach (var frame in psdReader.Frames)
    {
        if (frame.Type == FrameType.Text)
        {
            var text = Text.Create((PsdTextFrame)frame, graphics);
            graphics.DrawText(text);
        }
    }
    pdfWriter.Close();
}

See Also

Reference

Manual