Kakelbild som en textur inuti formen
Contents
[
Hide
]
Möjliga användningsscenarier
När bilden är liten och inte täcker hela formens yta utan att tappa dess kvalitet, då har du möjlighet att kakla den. Kakelsättning fyller formytan med en liten bild genom att upprepa dem som om de vore brickor.
Kakelbild som en textur inuti formen
Du kan fylla formytan med en bild och kakla den med hjälp avShape.Fill.TextureFill.IsTiling egendom och ställa in denSann . Se följande exempelkod, dessexempel på Excel-fil samt skärmdumpen som referens.
Skärmdump
Exempelkod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |