Here we create a PDF document showing how different values of
alpha result in different levels of transparency.
[C#]
using (Doc doc = new Doc()) {
doc.Rect.Inset(20, 20);
doc.FontSize = 300;
for (int i = 1; i <= 10; i++) {
doc.Color.Alpha = 255 / i;
doc.AddText(doc.Color.Alpha.ToString());
doc.Rect.Move(25, -50);
}
doc.Save(Server.MapPath("coloralpha.pdf"));
}
[Visual Basic]
Using doc As New Doc()
doc.Rect.Inset(20, 20)
doc.FontSize = 300
For i As Integer = 1 To 10
doc.Color.Alpha = 255 \ i
doc.AddText(doc.Color.Alpha.ToString())
doc.Rect.Move(25, -50)
Next i
doc.Save(Server.MapPath("coloralpha.pdf"))
End Using

coloralpha.pdf
|