java.lang.Object
com.aspose.words.GlowFormat
public class GlowFormat
- extends java.lang.Object
Represents the glow formatting for an object.
Use the ShapeBase.Glow property to access glow properties of an object.
You do not create instances of the GlowFormat class directly.
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());
|
Property Getters/Setters Summary |
java.awt.Color | getColor() | |
void | setColor(java.awt.Color value) | |
|
Gets or sets a java.awt.Color object that represents the color for a glow effect.
The default value is Black .
|
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 GlowFormat from the parent object.
|
|
Property Getters/Setters Detail |
getColor/setColor | |
public java.awt.Color getColor() / public void setColor(java.awt.Color value)
|
-
Gets or sets a java.awt.Color object that represents the color for a glow effect.
The default value is Black .
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)
|
-
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.
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)
|
-
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.
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());
remove | |
public void remove() |
-
Removes GlowFormat from the parent object.
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());
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.