IGradientFillSettingsScale Property
Gets or sets the scale.

Namespace: Aspose.PSD.FileFormats.Psd.Layers.FillSettings
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 19.9
Syntax
int Scale { get; set; }

Property Value

Type: Int32
The scale.
Examples
The following example demonstrates how to use Scale property to scale FillLayer with gradient.
[C#]

string sourceFileName = "FillLayerGradient.psd";
string output = "scaledImage.png";

using (var image = (PsdImage)Image.Load(sourceFileName))
{
    // getting a fill layer
    FillLayer fillLayer = null;
    foreach (var layer in image.Layers)
    {
        fillLayer = layer as FillLayer;
        if (fillLayer != null)
        {
            break;
        }
    }

    var settings = fillLayer.FillSettings as IGradientFillSettings;

    // update scale value
    settings.Scale = 200;
    fillLayer.Update(); // Updates pixels data

    image.Save(output, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}
See Also