Radius

SoftEdgeFormat.Radius property

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.

public double Radius { get; set; }

Esempi

Mostra come impostare un limite per la risoluzione dell’immagine.

Document doc = new Document(MyDir + "Rendering.docx");

SvgSaveOptions saveOptions = new SvgSaveOptions();
saveOptions.MaxImageResolution = 72;

doc.Save(ArtifactsDir + "SvgSaveOptions.MaxImageResolution.svg", saveOptions);

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