Fill
Innehåll
[
Dölj
]Font.Fill property
Hämtar fyllningsformatering förFont
.
public Fill Fill { get; }
Exempel
Visar hur man konverterar tillbaka fyllningarna till heldragen fyllning.
Document doc = new Document(MyDir + "Two color gradient.docx");
// Hämta Fill-objekt för teckensnittet för den första körningen.
Fill fill = doc.FirstSection.Body.Paragraphs[0].Runs[0].Font.Fill;
// Kontrollera fyllningsegenskaperna för teckensnittet.
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The fill is transparent at {0}%", fill.Transparency * 100);
// Ändra fyllningstyp till Helfärgad med enhetlig grön färg.
fill.Solid();
Console.WriteLine("\nThe fill is changed:");
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The fill transparency is {0}%", fill.Transparency * 100);
doc.Save(ArtifactsDir + "Drawing.FillSolid.docx");
Se även
- class Fill
- class Font
- namnutrymme Aspose.Words
- hopsättning Aspose.Words