ThreeDFormat — Aspose.Slides FOSS for Java API Reference
Enumerations ThreeDFormat třída představuje 3‑D formátovací vlastnosti pro tvar. Rozšiřuje PVIObject a implementuje IThreeDFormat a 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 | Nastavení horního zkosení. |
getBevelBottom() | IShapeBevel | Enumerations | Nastavení spodního zkosení. |
getContourWidth() / setContourWidth(double) | double | Číst/Zapisovat | Šířka obrysu v bodech. |
getContourColor() | IColorFormat | Enumerations | Barva obrysu. |
getExtrusionHeight() / setExtrusionHeight(double) | double | Číst/Zapisovat | Výška extruze v bodech. |
getExtrusionColor() | IColorFormat | Enumerations | Barva extruze. |
getDepth() / setDepth(double) | double | Číst/Zapisovat | Hloubka 3‑D efektu. |
getCamera() | ICamera | Enumerations | Nastavení kamery. |
getLightRig() | ILightRig | Enumerations | Nastavení osvětlení. |
getMaterial() / setMaterial(MaterialPresetType) | MaterialPresetType | Číst/Zapisovat | Předvolba materiálu (matný, plast, kov, atd.). |
Příklady použití
Aplikovat 3‑D efekt na tvar
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);Načíst 3‑D vlastnosti
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();