public class SoftEdgeFormat
extends java.lang.Object
Remarks:
Use the ShapeBase.getSoftEdge() property to access soft edge properties of an object. You do not create instances of the SoftEdgeFormat class directly.
Examples:
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());
| Modifier and Type | Method and Description |
|---|---|
double |
getRadius()
Gets a double value that represents the length of the radius for a soft edge effect in points (pt).
|
void |
remove()
Removes
SoftEdgeFormat from the parent object. |
void |
setRadius(double value)
Sets a double value that represents the length of the radius for a soft edge effect in points (pt).
|
public void remove()
SoftEdgeFormat from the parent object.
Examples:
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);
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());
public double getRadius()
Examples:
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);
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());
public void setRadius(double value)
Examples:
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);
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());
value - A double value that represents the length of the radius for a soft edge effect in points (pt).