ThreeDFormat — Aspose.Slides FOSS for Java API Reference

The ThreeDFormat class represents 3-D formatting properties for a shape. It extends PVIObject and implements IThreeDFormat and IThreeDParamSource.

Package: org.aspose.slides.foss

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

Properties

PropertyTypeAccessDescription
getBevelTop()IShapeBevelReadTop bevel settings.
getBevelBottom()IShapeBevelReadBottom bevel settings.
getContourWidth() / setContourWidth(double)doubleRead/WriteContour width in points.
getContourColor()IColorFormatReadContour color.
getExtrusionHeight() / setExtrusionHeight(double)doubleRead/WriteExtrusion height in points.
getExtrusionColor()IColorFormatReadExtrusion color.
getDepth() / setDepth(double)doubleRead/WriteDepth of the 3-D effect.
getCamera()ICameraReadCamera settings.
getLightRig()ILightRigReadLighting settings.
getMaterial() / setMaterial(MaterialPresetType)MaterialPresetTypeRead/WriteMaterial preset (matte, plastic, metal, etc.).

Usage Examples

Apply 3-D Effect to a Shape

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);

Read 3-D Properties

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();

See Also