シェイプ内のテクスチャとして画像を並べて表示
Contents
[
Hide
]
考えられる使用シナリオ
画像が小さく、品質を損なうことなく形状の表面全体をカバーできない場合は、並べて表示するオプションがあります。タイリングは、小さな画像をタイルのように繰り返すことで、形状の表面を小さな画像で埋めます。
シェイプ内のテクスチャとして画像を並べて表示
シェイプ サーフェスを画像で塗りつぶし、Shape.Fill.TextureFill.IsTilingプロパティとその設定真実.次のサンプル コードを参照してください。サンプル Excel ファイル参照用のスクリーンショットと同様に。
スクリーンショット
サンプルコード
This file contains hidden or 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"); |