SoftEdgeFormat

SoftEdgeFormat class

Rappresenta la formattazione del bordo sfumato per un oggetto.

public class SoftEdgeFormat

Proprietà

NomeDescrizione
Radius { get; set; }Ottiene o imposta un valore double che rappresenta la lunghezza del raggio per un effetto bordo morbido in punti (pt). Il valore predefinito è 0.0.

Metodi

NomeDescrizione
Remove()RimuoveSoftEdgeFormat dall’oggetto padre.

Osservazioni

Utilizzare ilSoftEdge proprietà per accedere alle proprietà del bordo morbido di un oggetto. Non si creano istanze diSoftEdgeFormat classe direttamente.

Esempi

Mostra come lavorare con la formattazione soft edge.

DocumentBuilder builder = new DocumentBuilder();
Shape shape = builder.InsertShape(ShapeType.Rectangle, 200, 200);

// Applica un bordo morbido alla forma.
shape.SoftEdge.Radius = 30;

builder.Document.Save(ArtifactsDir + "Shape.SoftEdge.docx");

// Carica un documento di forma rettangolare con bordo sfumato.
Document doc = new Document(ArtifactsDir + "Shape.SoftEdge.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
SoftEdgeFormat softEdgeFormat = shape.SoftEdge;

// Controlla il raggio del bordo morbido.
Assert.AreEqual(30, softEdgeFormat.Radius);

// Rimuovi il bordo morbido dalla forma.
softEdgeFormat.Remove();

// Controlla il raggio del bordo morbido rimosso.
Assert.AreEqual(0, softEdgeFormat.Radius);

Guarda anche