java.lang.Object
com.aspose.words.SoftEdgeFormat
public class SoftEdgeFormat
Use the Example:
DocumentBuilder builder = new DocumentBuilder();
Shape shape = builder.insertShape(ShapeType.RECTANGLE, 200.0, 200.0);
// Apply soft edge to the shape.
shape.getSoftEdge().setRadius(30.0);
builder.getDocument().save(getArtifactsDir() + "Shape.SoftEdge.docx");
// Load document with rectangle shape with soft edge.
Document doc = new Document(getArtifactsDir() + "Shape.SoftEdge.docx");
shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
// Check soft edge radius.
Assert.assertEquals(30, shape.getSoftEdge().getRadius());
// Remove soft edge from the shape.
shape.getSoftEdge().remove();
// Check radius of the removed soft edge.
Assert.assertEquals(0, shape.getSoftEdge().getRadius());
| Property Getters/Setters Summary | ||
|---|---|---|
double | getRadius() | |
void | setRadius(double value) | |
| Gets or sets a double value that represents the length of the radius for a soft edge effect in points (pt). The default value is 0.0. | ||
| Method Summary | ||
|---|---|---|
void | remove() | |
|
Removes |
||
| Property Getters/Setters Detail |
|---|
getRadius/setRadius | |
public double getRadius() / public void setRadius(double value) | |
Example:
Shows how to set limit for image resolution.Document doc = new Document(getMyDir() + "Rendering.docx"); SvgSaveOptions saveOptions = new SvgSaveOptions(); saveOptions.setMaxImageResolution(72); doc.save(getArtifactsDir() + "SvgSaveOptions.MaxImageResolution.svg", saveOptions);
Example:
Shows how to work with soft edge formatting.DocumentBuilder builder = new DocumentBuilder(); Shape shape = builder.insertShape(ShapeType.RECTANGLE, 200.0, 200.0); // Apply soft edge to the shape. shape.getSoftEdge().setRadius(30.0); builder.getDocument().save(getArtifactsDir() + "Shape.SoftEdge.docx"); // Load document with rectangle shape with soft edge. Document doc = new Document(getArtifactsDir() + "Shape.SoftEdge.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check soft edge radius. Assert.assertEquals(30, shape.getSoftEdge().getRadius()); // Remove soft edge from the shape. shape.getSoftEdge().remove(); // Check radius of the removed soft edge. Assert.assertEquals(0, shape.getSoftEdge().getRadius());
| Method Detail |
|---|
remove | |
public void remove() | |
Example:
Shows how to work with soft edge formatting.DocumentBuilder builder = new DocumentBuilder(); Shape shape = builder.insertShape(ShapeType.RECTANGLE, 200.0, 200.0); // Apply soft edge to the shape. shape.getSoftEdge().setRadius(30.0); builder.getDocument().save(getArtifactsDir() + "Shape.SoftEdge.docx"); // Load document with rectangle shape with soft edge. Document doc = new Document(getArtifactsDir() + "Shape.SoftEdge.docx"); shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true); // Check soft edge radius. Assert.assertEquals(30, shape.getSoftEdge().getRadius()); // Remove soft edge from the shape. shape.getSoftEdge().remove(); // Check radius of the removed soft edge. Assert.assertEquals(0, shape.getSoftEdge().getRadius());
Example:
Shows how to set limit for image resolution.Document doc = new Document(getMyDir() + "Rendering.docx"); SvgSaveOptions saveOptions = new SvgSaveOptions(); saveOptions.setMaxImageResolution(72); doc.save(getArtifactsDir() + "SvgSaveOptions.MaxImageResolution.svg", saveOptions);