java.lang.Object
com.aspose.words.GlowFormat
public class GlowFormat
Use the
| Property Getters/Setters Summary | ||
|---|---|---|
java.awt.Color | getColor() | |
void | setColor(java.awt.Color value) | |
|
Gets or sets a |
||
double | getRadius() | |
void | setRadius(double value) | |
| Gets or sets a double value that represents the length of the radius for a glow effect in points (pt). The default value is 0.0. | ||
double | getTransparency() | |
void | setTransparency(double value) | |
| Gets or sets the degree of transparency for the glow effect as a value between 0.0 (opaque) and 1.0 (clear). The default value is 0.0. | ||
| Method Summary | ||
|---|---|---|
void | remove() | |
|
Removes |
||
| Property Getters/Setters Detail |
|---|
getColor/setColor | |
public java.awt.Color getColor() / public void setColor(java.awt.Color value) | |
Example:
Shows how to interact with glow shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply glow effect to the shape. shape.getGlow().setColor(new Color(0xFFFA8072)); shape.getGlow().setRadius(30.0); shape.getGlow().setTransparency(0.15); doc.save(getArtifactsDir() + "Shape.Glow.docx"); doc = new Document(getArtifactsDir() + "Shape.Glow.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check glow effect attributes. Assert.assertEquals(new Color((250), (128), (114), (217)).getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(30, shape.getGlow().getRadius()); Assert.assertEquals(0.15d, shape.getGlow().getTransparency(), 0.01d); // Remove glow effect from the shape. shape.getGlow().remove(); Assert.assertEquals(Color.BLACK.getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(0, shape.getGlow().getRadius()); Assert.assertEquals(0, shape.getGlow().getTransparency());
getRadius/setRadius | |
public double getRadius() / public void setRadius(double value) | |
Example:
Shows how to interact with glow shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply glow effect to the shape. shape.getGlow().setColor(new Color(0xFFFA8072)); shape.getGlow().setRadius(30.0); shape.getGlow().setTransparency(0.15); doc.save(getArtifactsDir() + "Shape.Glow.docx"); doc = new Document(getArtifactsDir() + "Shape.Glow.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check glow effect attributes. Assert.assertEquals(new Color((250), (128), (114), (217)).getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(30, shape.getGlow().getRadius()); Assert.assertEquals(0.15d, shape.getGlow().getTransparency(), 0.01d); // Remove glow effect from the shape. shape.getGlow().remove(); Assert.assertEquals(Color.BLACK.getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(0, shape.getGlow().getRadius()); Assert.assertEquals(0, shape.getGlow().getTransparency());
getTransparency/setTransparency | |
public double getTransparency() / public void setTransparency(double value) | |
Example:
Shows how to interact with glow shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply glow effect to the shape. shape.getGlow().setColor(new Color(0xFFFA8072)); shape.getGlow().setRadius(30.0); shape.getGlow().setTransparency(0.15); doc.save(getArtifactsDir() + "Shape.Glow.docx"); doc = new Document(getArtifactsDir() + "Shape.Glow.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check glow effect attributes. Assert.assertEquals(new Color((250), (128), (114), (217)).getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(30, shape.getGlow().getRadius()); Assert.assertEquals(0.15d, shape.getGlow().getTransparency(), 0.01d); // Remove glow effect from the shape. shape.getGlow().remove(); Assert.assertEquals(Color.BLACK.getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(0, shape.getGlow().getRadius()); Assert.assertEquals(0, shape.getGlow().getTransparency());
| Method Detail |
|---|
remove | |
public void remove() | |
Example:
Shows how to interact with glow shape effect.Document doc = new Document(getMyDir() + "Various shapes.docx"); Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Apply glow effect to the shape. shape.getGlow().setColor(new Color(0xFFFA8072)); shape.getGlow().setRadius(30.0); shape.getGlow().setTransparency(0.15); doc.save(getArtifactsDir() + "Shape.Glow.docx"); doc = new Document(getArtifactsDir() + "Shape.Glow.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check glow effect attributes. Assert.assertEquals(new Color((250), (128), (114), (217)).getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(30, shape.getGlow().getRadius()); Assert.assertEquals(0.15d, shape.getGlow().getTransparency(), 0.01d); // Remove glow effect from the shape. shape.getGlow().remove(); Assert.assertEquals(Color.BLACK.getRGB(), shape.getGlow().getColor().getRGB()); Assert.assertEquals(0, shape.getGlow().getRadius()); Assert.assertEquals(0, shape.getGlow().getTransparency());