Color2
Contenuti
[
Nascondere
]Stroke.Color2 property
Definisce un secondo colore per un tratto.
public Color Color2 { get; set; }
Osservazioni
Il valore predefinito per aShape
è White .
Esempi
Mostra come elaborare le caratteristiche dei tratti di forma.
Document doc = new Document(MyDir + "Shape stroke pattern border.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Stroke stroke = shape.Stroke;
// I tratti possono avere due colori, utilizzati per creare un motivo definito da dati di immagini bicolore.
// I tratti con un solo colore non utilizzano la proprietà Color2.
Assert.AreEqual(Color.FromArgb(255, 128, 0, 0), stroke.Color);
Assert.AreEqual(Color.FromArgb(255, 255, 255, 0), stroke.Color2);
Assert.NotNull(stroke.ImageBytes);
File.WriteAllBytes(ArtifactsDir + "Drawing.StrokePattern.png", stroke.ImageBytes);
Guarda anche
- class Stroke
- spazio dei nomi Aspose.Words.Drawing
- assemblea Aspose.Words