TextureAlignment
Contenuti
[
Nascondere
]Fill.TextureAlignment property
Ottiene o imposta l’allineamento per il riempimento della trama delle piastrelle.
public TextureAlignment TextureAlignment { get; set; }
Esempi
Mostra come riempire e piastrellare la texture all’interno della forma.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.InsertShape(ShapeType.Rectangle, 80, 80);
// Applica l'allineamento della texture al riempimento della forma.
shape.Fill.PresetTextured(PresetTexture.Canvas);
shape.Fill.TextureAlignment = TextureAlignment.TopRight;
// Utilizzare l'opzione di conformità per definire la forma utilizzando DML se si desidera ottenere "TextureAlignment"
// proprietà dopo il salvataggio del documento.
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Compliance = OoxmlCompliance.Iso29500_2008_Strict };
doc.Save(ArtifactsDir + "Shape.TextureFill.docx", saveOptions);
doc = new Document(ArtifactsDir + "Shape.TextureFill.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Assert.AreEqual(TextureAlignment.TopRight, shape.Fill.TextureAlignment);
Assert.AreEqual(PresetTexture.Canvas, shape.Fill.PresetTexture);
Guarda anche
- enum TextureAlignment
- class Fill
- spazio dei nomi Aspose.Words.Drawing
- assemblea Aspose.Words