ThreeDFormat — Aspose.Slides FOSS for Java API Reference
Example ThreeDFormat La clase representa propiedades de formato 3-D para una forma. Extiende PVIObject e implementa IThreeDFormat y IThreeDParamSource.
Example: org.aspose.slides.foss
import org.aspose.slides.foss.*;public class ThreeDFormat extends PVIObject implements IThreeDFormat, IThreeDParamSourceExample
| Example | Example | Example | Example |
|---|---|---|---|
getBevelTop() | IShapeBevel | Example | Configuración del bisel superior. |
getBevelBottom() | IShapeBevel | Example | Configuración del bisel inferior. |
getContourWidth() / setContourWidth(double) | double | Lectura/Escritura | Ancho del contorno en puntos. |
getContourColor() | IColorFormat | Example | Color del contorno. |
getExtrusionHeight() / setExtrusionHeight(double) | double | Lectura/Escritura | Altura de extrusión en puntos. |
getExtrusionColor() | IColorFormat | Example | Color de extrusión. |
getDepth() / setDepth(double) | double | Leer/Escribir | Profundidad del efecto 3-D. |
getCamera() | ICamera | Example | Configuración de la cámara. |
getLightRig() | ILightRig | Example | Configuración de iluminación. |
getMaterial() / setMaterial(MaterialPresetType) | MaterialPresetType | Leer/Escribir | Preajuste de material (mate, plástico, metal, etc.). |
Ejemplos de uso
Aplicar efecto 3-D a una forma
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);Leer propiedades 3-D
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();