Enum LightRigType

LightRigType enumeration

Represents a preset light right that can be applied to a shape

public enum LightRigType

Values

NameValueDescription
Balanced0Balanced
BrightRoom1Bright room
Chilly2Chilly
Contrasting3Contrasting
Flat4Flat
Flood5Flood
Freezing6Freezing
Glow7Glow
Harsh8Harsh
LegacyFlat19LegacyFlat1
LegacyFlat210LegacyFlat2
LegacyFlat311LegacyFlat3
LegacyFlat412LegacyFlat4
LegacyHarsh113LegacyHarsh1
LegacyHarsh214LegacyHarsh2
LegacyHarsh315LegacyHarsh3
LegacyHarsh416LegacyHarsh4
LegacyNormal117LegacyNormal1
LegacyNormal218LegacyNormal2
LegacyNormal319LegacyNormal3
LegacyNormal420LegacyNormal4
Morning21Morning
Soft22Soft
Sunrise23Sunrise
Sunset24Sunset
ThreePoint25Three point
TwoPoint26Two point
None27No light rig.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Charts;
    using Aspose.Cells.Drawing;
    using System;

    public class LightRigTypeDemo
    {
        public static void LightRigTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();

            // Add a new worksheet to the workbook
            Worksheet worksheet = workbook.Worksheets[0];

            // Add sample data to the worksheet
            worksheet.Cells["A1"].PutValue("Category");
            worksheet.Cells["A2"].PutValue("A");
            worksheet.Cells["A3"].PutValue("B");
            worksheet.Cells["A4"].PutValue("C");

            worksheet.Cells["B1"].PutValue("Value");
            worksheet.Cells["B2"].PutValue(10);
            worksheet.Cells["B3"].PutValue(20);
            worksheet.Cells["B4"].PutValue(30);

            // Add a chart to the worksheet
            int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 15, 5);
            Chart chart = worksheet.Charts[chartIndex];

            // Set the chart data range
            chart.SetChartDataRange("A1:B4", true);

            // Access the first series in the chart
            Series series = chart.NSeries[0];

            // Access the shape properties of the series
            ShapePropertyCollection shapeProperties = series.ShapeProperties;

            // Check if the series has 3D format data
            if (shapeProperties.HasFormat3D())
            {
                // Access the 3D format properties
                Format3D format3D = shapeProperties.Format3D;

                // Set the surface lighting type to Balanced
                format3D.SurfaceLightingType = LightRigType.Balanced;

                // Set the lighting angle
                format3D.LightingAngle = 45.0;
            }

            // Save the workbook
            workbook.Save("LightRigTypeExample.xlsx");
            workbook.Save("LightRigTypeExample.pdf");
            // Output the results
            Console.WriteLine("LightRigType example applied and workbook saved as 'LightRigTypeExample.xlsx'.");
        }
    }
}

See Also