図形またはグラフの反射効果の操作

可能な使用シナリオ

Aspose.Cellsは、図形やグラフの反射効果を操作するためのShape.ReflectionEffectプロパティを提供します。これには、異なる結果を得るために設定できる次のサブプロパティが含まれています。

以下のスクリーンショットは、Shapeの反射効果の設定を示しています。

todo:image_alt_text

図形またはグラフの反射効果の操作

次のサンプルコードは、ソースエクセルファイルを読み込み、最初のワークシートの最初の図形にアクセスして、Shape.ReflectionEffectプロパティのサブプロパティを設定し、その後、出力エクセルファイルにブックを保存します。

サンプルコード

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getSharedDataDir(WorkingWithReflectionEffect.class) + "articles/";
// Load your source excel file
Workbook wb = new Workbook(dataDir + "WorkingWithReflectionEffect_in.xlsx");
// Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
// Access first shape
Shape sh = ws.getShapes().get(0);
// Set the reflection effect of the shape
// Set its Blur, Size, Transparency and Distance properties
ReflectionEffect re = sh.getReflection();
re.setBlur(30);
re.setSize(90);
re.setTransparency(0);
re.setDistance(80);
// Save the workbook in xlsx format
wb.save(dataDir + "WorkingWithReflectionEffect_out.xlsx");