PsdProcessor.TextCallback Property

Gets or sets the callback function that processes text layers. The function should accept an alias for the calling object, a PsdTextFrame, and a string and return a Text. It is convenient to use lambda expressions as demonstrated below.

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

Syntax

C#
public Func<PsdProcessor, PsdTextFrame, string, Text> TextCallback { get; set; }

Examples

C#
var psdProcessor = new PsdProcessor();

psdProcessor.TextCallback = (processor, textFrame, textString) =>
{
    var text = processor.ProcessText(textFrame);
    text.String = textString;

    text.Brush = new SolidBrush(RgbColor.DarkRed);

    return text;
};

psdProcessor.Render(@"Images\BusinessCard.psd", @"Images\Output\RedText.pdf");

See Also

Reference