PsdProcessor.ShapeCallback Property

Gets or sets the callback function that processes shape layers. The function should accept an alias for the calling object and a PsdShapeFrame and return a ShapeData. 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, PsdShapeFrame, ShapeData> ShapeCallback { get; set; }

Examples

C#
var psdProcessor = new PsdProcessor();

psdProcessor.ShapeCallback = (processor, shapeFrame) =>
{
    var shapeData = processor.ProcessShape(shapeFrame);
    shapeData.Brush = new SolidBrush(RgbColor.DarkRed);

    return shapeData;
};

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

See Also

Reference