Represents a PSD text layer.
Namespace:
Aurigma.GraphicsMill.Codecs.Psd
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public class PsdTextFrame : PsdFrame, ITextSettings
The text layer is a particular case of a raster layer. It always contains the bitmap with a rasterized text string, as well as:
Typically you get an instance of this class in the following way:
The following code reads a PSD file, iterates through its layers, and writes some information about text layer to the console:
//create PSD reader
using (var reader = new PsdReader(@"Images\BusinessCard.psd"))
{
//read layers and check for a text layer
for (int i = 0; i < reader.Frames.Count; i++)
{
using (var frame = reader.Frames[i])
{
if (frame.Type == FrameType.Text)
{
var textFrame = (PsdTextFrame) frame;
Console.WriteLine("Font name: " + textFrame.Font.Name);
Console.WriteLine("Font size: " + textFrame.Font.Size);
Console.WriteLine("Text caps: " + textFrame.Caps);
Console.WriteLine("Text justification: " + textFrame.Justification);
Console.WriteLine("Paragraph first line indent: " + textFrame.Paragraph.FirstLineIndent);
Console.WriteLine("Text tracking: " + textFrame.Tracking);
Console.WriteLine("Text box: " + textFrame.TextBox);
break;
}
}
}
}