ThreeDFormat — Aspose.Slides FOSS for Java API Reference

Example ThreeDFormat کلاس ویژگی‌های قالب‌بندی 3‑بعدی برای یک شکل را نمایندگی می‌کند. این کلاس extends PVIObject و implements IThreeDFormat و IThreeDParamSource.

Example: org.aspose.slides.foss

import org.aspose.slides.foss.*;
public class ThreeDFormat extends PVIObject implements IThreeDFormat, IThreeDParamSource

Example

ExampleExampleExampleExample
getBevelTop()IShapeBevelExampleتنظیمات برجستگی بالا.
getBevelBottom()IShapeBevelExampleتنظیمات برجستگی پایین.
getContourWidth() / setContourWidth(double)doubleخواندن/نوشتنعرض کانتور بر حسب نقطه.
getContourColor()IColorFormatExampleرنگ کانتور.
getExtrusionHeight() / setExtrusionHeight(double)doubleخواندن/نوشتنارتفاع برآمدگی بر حسب نقطه.
getExtrusionColor()IColorFormatExampleرنگ برآمدگی.
getDepth() / setDepth(double)doubleخواندن/نوشتنعمق اثر سه‌بعدی.
getCamera()ICameraExampleتنظیمات دوربین.
getLightRig()ILightRigExampleتنظیمات نورپردازی.
getMaterial() / setMaterial(MaterialPresetType)MaterialPresetTypeخواندن/نوشتنپیش‌تنظیم مواد (مات، پلاستیک، فلز، و غیره).

نمونه‌های استفاده

اعمال اثر سه‌بعدی به یک شکل

import org.aspose.slides.foss.*;

Presentation prs = new Presentation();
IAutoShape shape = prs.getSlides().get(0).getShapes()
    .addAutoShape(ShapeType.RECTANGLE, 50, 50, 200, 100);

IThreeDFormat threeD = shape.getThreeDFormat();
threeD.setDepth(10.0);
threeD.setExtrusionHeight(5.0);
threeD.setMaterial(MaterialPresetType.WARM_MATTE);

prs.save("3d-shape.pptx", SaveFormat.PPTX);

خواندن ویژگی‌های سه‌بعدی

IThreeDFormat threeD = shape.getThreeDFormat();
System.out.println("Depth: " + threeD.getDepth());
System.out.println("Material: " + threeD.getMaterial());

IShapeBevel topBevel = threeD.getBevelTop();
ICamera camera = threeD.getCamera();
ILightRig light = threeD.getLightRig();

همچنین ببینید

 فارسی