java.lang.Object
com.aspose.words.ReflectionFormat
public class ReflectionFormat
Use the
| Property Getters/Setters Summary | ||
|---|---|---|
double | getBlur() | |
void | setBlur(double value) | |
| Gets or sets a double value that specifies the degree of blur effect applied to the reflection effect in points. The default value is 0.0. | ||
double | getDistance() | |
void | setDistance(double value) | |
| Gets or sets a double value that specifies the amount of separation of the reflected image from the object in points. The default value is 0.0. | ||
double | getSize() | |
void | setSize(double value) | |
| Gets or sets a double value between 0.0 and 1.0 representing the size of the reflection as a percentage of the reflected object. The default value is 0.0. | ||
double | getTransparency() | |
void | setTransparency(double value) | |
| Gets or sets a double value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency for the reflection effect. The default value is 0.0. | ||
| Method Summary | ||
|---|---|---|
void | remove() | |
|
Removes |
||
| Property Getters/Setters Detail |
|---|
getBlur/setBlur | |
public double getBlur() / public void setBlur(double value) | |
Example:
Shows how to interact with reflection shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply reflection effect to the shape. shape.getReflection().setTransparency(0.37); shape.getReflection().setSize(0.48); shape.getReflection().setBlur(17.5); shape.getReflection().setDistance(9.2); doc.save(getArtifactsDir() + "Shape.Reflection.docx"); doc = new Document(getArtifactsDir() + "Shape.Reflection.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check reflection effect attributes. Assert.assertEquals(0.37d, shape.getReflection().getTransparency(), 0.01d); Assert.assertEquals(0.48d, shape.getReflection().getSize(), 0.01d); Assert.assertEquals(17.5d, shape.getReflection().getBlur(), 0.01d); Assert.assertEquals(9.2d, shape.getReflection().getDistance(), 0.01d); // Remove reflection effect from the shape. shape.getReflection().remove(); Assert.assertEquals(0, shape.getReflection().getTransparency()); Assert.assertEquals(0, shape.getReflection().getSize()); Assert.assertEquals(0, shape.getReflection().getBlur()); Assert.assertEquals(0, shape.getReflection().getDistance());
getDistance/setDistance | |
public double getDistance() / public void setDistance(double value) | |
Example:
Shows how to interact with reflection shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply reflection effect to the shape. shape.getReflection().setTransparency(0.37); shape.getReflection().setSize(0.48); shape.getReflection().setBlur(17.5); shape.getReflection().setDistance(9.2); doc.save(getArtifactsDir() + "Shape.Reflection.docx"); doc = new Document(getArtifactsDir() + "Shape.Reflection.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check reflection effect attributes. Assert.assertEquals(0.37d, shape.getReflection().getTransparency(), 0.01d); Assert.assertEquals(0.48d, shape.getReflection().getSize(), 0.01d); Assert.assertEquals(17.5d, shape.getReflection().getBlur(), 0.01d); Assert.assertEquals(9.2d, shape.getReflection().getDistance(), 0.01d); // Remove reflection effect from the shape. shape.getReflection().remove(); Assert.assertEquals(0, shape.getReflection().getTransparency()); Assert.assertEquals(0, shape.getReflection().getSize()); Assert.assertEquals(0, shape.getReflection().getBlur()); Assert.assertEquals(0, shape.getReflection().getDistance());
getSize/setSize | |
public double getSize() / public void setSize(double value) | |
Example:
Shows how to interact with reflection shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply reflection effect to the shape. shape.getReflection().setTransparency(0.37); shape.getReflection().setSize(0.48); shape.getReflection().setBlur(17.5); shape.getReflection().setDistance(9.2); doc.save(getArtifactsDir() + "Shape.Reflection.docx"); doc = new Document(getArtifactsDir() + "Shape.Reflection.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check reflection effect attributes. Assert.assertEquals(0.37d, shape.getReflection().getTransparency(), 0.01d); Assert.assertEquals(0.48d, shape.getReflection().getSize(), 0.01d); Assert.assertEquals(17.5d, shape.getReflection().getBlur(), 0.01d); Assert.assertEquals(9.2d, shape.getReflection().getDistance(), 0.01d); // Remove reflection effect from the shape. shape.getReflection().remove(); Assert.assertEquals(0, shape.getReflection().getTransparency()); Assert.assertEquals(0, shape.getReflection().getSize()); Assert.assertEquals(0, shape.getReflection().getBlur()); Assert.assertEquals(0, shape.getReflection().getDistance());
getTransparency/setTransparency | |
public double getTransparency() / public void setTransparency(double value) | |
Example:
Shows how to interact with reflection shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply reflection effect to the shape. shape.getReflection().setTransparency(0.37); shape.getReflection().setSize(0.48); shape.getReflection().setBlur(17.5); shape.getReflection().setDistance(9.2); doc.save(getArtifactsDir() + "Shape.Reflection.docx"); doc = new Document(getArtifactsDir() + "Shape.Reflection.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check reflection effect attributes. Assert.assertEquals(0.37d, shape.getReflection().getTransparency(), 0.01d); Assert.assertEquals(0.48d, shape.getReflection().getSize(), 0.01d); Assert.assertEquals(17.5d, shape.getReflection().getBlur(), 0.01d); Assert.assertEquals(9.2d, shape.getReflection().getDistance(), 0.01d); // Remove reflection effect from the shape. shape.getReflection().remove(); Assert.assertEquals(0, shape.getReflection().getTransparency()); Assert.assertEquals(0, shape.getReflection().getSize()); Assert.assertEquals(0, shape.getReflection().getBlur()); Assert.assertEquals(0, shape.getReflection().getDistance());
| Method Detail |
|---|
remove | |
public void remove() | |
Example:
Shows how to interact with reflection shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply reflection effect to the shape. shape.getReflection().setTransparency(0.37); shape.getReflection().setSize(0.48); shape.getReflection().setBlur(17.5); shape.getReflection().setDistance(9.2); doc.save(getArtifactsDir() + "Shape.Reflection.docx"); doc = new Document(getArtifactsDir() + "Shape.Reflection.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check reflection effect attributes. Assert.assertEquals(0.37d, shape.getReflection().getTransparency(), 0.01d); Assert.assertEquals(0.48d, shape.getReflection().getSize(), 0.01d); Assert.assertEquals(17.5d, shape.getReflection().getBlur(), 0.01d); Assert.assertEquals(9.2d, shape.getReflection().getDistance(), 0.01d); // Remove reflection effect from the shape. shape.getReflection().remove(); Assert.assertEquals(0, shape.getReflection().getTransparency()); Assert.assertEquals(0, shape.getReflection().getSize()); Assert.assertEquals(0, shape.getReflection().getBlur()); Assert.assertEquals(0, shape.getReflection().getDistance());