Tile Picture as a Texture inside the Shape
Possible Usage Scenarios
When the picture is small and does not cover the entire surface of the shape without losing its quality, then you have the option to tile it. Tiling fills the shape surface with a small image by repeating them as if they are tiles.
Tile Picture as a Texture inside the Shape
You can fill the shape surface with some image and tile it using the Shape.Fill.TextureFill.IsTiling property and setting it true. Please see the following sample code, its sample Excel file as well as the screenshot for a reference.
Screenshot
Sample Code
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Load sample Excel file | |
Workbook wb = new Workbook(sourceDir + "sampleTextureFill_IsTiling.xlsx"); | |
//Access first worksheet | |
Worksheet ws = wb.Worksheets[0]; | |
//Access first shape inside the worksheet | |
Shape sh = ws.Shapes[0]; | |
//Tile Picture as a Texture inside the Shape | |
sh.Fill.TextureFill.IsTiling = true; | |
//Save the output Excel file | |
wb.Save(outputDir + "outputTextureFill_IsTiling.xlsx"); |