ThreeDFormat — Aspose.Slides FOSS for Java API Reference
Enumerations ThreeDFormat class représente les propriétés de mise en forme 3-D d’une forme. Elle étend PVIObject et implémente IThreeDFormat et IThreeDParamSource.
Enumerations: org.aspose.slides.foss
import org.aspose.slides.foss.*;public class ThreeDFormat extends PVIObject implements IThreeDFormat, IThreeDParamSourceEnumerations
| Enumerations | Enumerations | Enumerations | Enumerations |
|---|---|---|---|
getBevelTop() | IShapeBevel | Enumerations | Paramètres du biseau supérieur. |
getBevelBottom() | IShapeBevel | Enumerations | Paramètres du biseau inférieur. |
getContourWidth() / setContourWidth(double) | double | Lecture/Écriture | Largeur du contour en points. |
getContourColor() | IColorFormat | Enumerations | Couleur du contour. |
getExtrusionHeight() / setExtrusionHeight(double) | double | Lecture/Écriture | Hauteur d’extrusion en points. |
getExtrusionColor() | IColorFormat | Enumerations | Couleur d’extrusion. |
getDepth() / setDepth(double) | double | Lire/Écrire | Profondeur de l’effet 3-D. |
getCamera() | ICamera | Enumerations | Paramètres de la caméra. |
getLightRig() | ILightRig | Enumerations | Paramètres d’éclairage. |
getMaterial() / setMaterial(MaterialPresetType) | MaterialPresetType | Lire/Écrire | Préréglage de matériau (mat, plastique, métal, etc.). |
Exemples d’utilisation
Appliquer l’effet 3-D à une forme
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);Lire les propriétés 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();