Class TilePicOption
Contents
[
Hide
]TilePicOption class
Represents tile picture as texture.
public class TilePicOption
Constructors
Name | Description |
---|---|
TilePicOption() | The default constructor. |
Properties
Name | Description |
---|---|
AlignmentType { get; set; } | Gets or sets the alignment for tiling. |
MirrorType { get; set; } | Gets or sets the mirror type for tiling. |
OffsetX { get; set; } | Gets or sets the X offset for tiling picture. |
OffsetY { get; set; } | Gets or sets the Y offset for tiling picture. |
ScaleX { get; set; } | Gets or sets the X scale for tiling picture. |
ScaleY { get; set; } | Gets or sets the Y scale for tiling picture. |
Examples
using System;
using System.IO;
using Aspose.Cells;
using Aspose.Cells.Drawing;
namespace AsposeCellsExamples
{
public class DrawingClassTilePicOptionDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add a chart for demonstration
int chartIndex = worksheet.Charts.Add(Aspose.Cells.Charts.ChartType.Column, 5, 0, 15, 5);
Aspose.Cells.Charts.Chart chart = worksheet.Charts[chartIndex];
// Set fill type to texture
chart.ChartArea.Area.FillFormat.FillType = Aspose.Cells.Drawing.FillType.Texture;
// Load sample image (replace with actual path)
byte[] imageData = File.ReadAllBytes("sample.png");
chart.ChartArea.Area.FillFormat.TextureFill.ImageData = imageData;
// Create and configure TilePicOption
TilePicOption tileOptions = new TilePicOption();
tileOptions.ScaleX = 50;
tileOptions.ScaleY = 50;
chart.ChartArea.Area.FillFormat.TextureFill.TilePicOption = tileOptions;
// Save the workbook
workbook.Save("TilePicOptionDemo.xlsx");
}
}
}
See Also
- namespace Aspose.Cells.Drawing
- assembly Aspose.Cells